Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wolfram mathematica 关于Mathematica中旋转变换函数的问题_Wolfram Mathematica - Fatal编程技术网

Wolfram mathematica 关于Mathematica中旋转变换函数的问题

Wolfram mathematica 关于Mathematica中旋转变换函数的问题,wolfram-mathematica,Wolfram Mathematica,背景: a = 0; b = 0; c = 0; Manipulate[Graphics3D[ GeometricTransformation[ {Cuboid[{0, 0, 0}, {1, 1, 1}]}, {RotationTransform[x, {1, 1, 0}, {a, b, c}]}], ViewPoint -> Left], {x, 0, 2 \[Pi]}] 我的问题涉及具有以下签名的RotationTransform:

背景:

  a = 0; b = 0; c = 0;
  Manipulate[Graphics3D[
    GeometricTransformation[
     {Cuboid[{0, 0, 0}, {1, 1, 1}]},
     {RotationTransform[x, {1, 1, 0}, {a, b, c}]}], 
    ViewPoint -> Left], {x, 0, 2 \[Pi]}]
我的问题涉及具有以下签名的RotationTransform:

  RotationTransform[x, {1, 1, 0}, {a, b, c}]
文档中说:“围绕定位在点p处的轴w进行3D旋转”,在上面的示例中,w={1,1,0}和p={a,b,c}

令我惊讶的是,无论我给(a,b,c)分配了什么值,旋转的作用都是一样的。我想我不理解文档,在某个地方出错了。我希望对于a,b,c的不同值至少有不同的旋转。更改向量w的行为与预期相同


请解释p的用途。请考虑帮助中的以下示例:

gr={Cuboid[],AbsolutePointSize[10],Opacity[1],{Magenta,Point[{0,0,0}]},   
   {Green,Point[{1,1,1}]}};

p = {1,1,1};
Graphics3D[{{Opacity[.35], Blue, gr}, 
  GeometricTransformation[{Opacity[.85], Red, gr}, 
   RotationTransform[Pi/6, {0, 0, 1}, p]]}, Boxed -> False]

现在是:

p={1,0,0};

也许这会让事情变得更清楚。它确实有效果。我显示了锚定点和轴

Manipulate[
  Module[{w={1,0,0},p={-2,2}},
    Graphics3D[
    {
       {Opacity->.4,GeometricTransformation[
         {Cuboid[{0,0,0}]},RotationTransform[angle,w,{a,b,c}]]
        },

       {Blue,PointSize[0.05],Point[{a,b,c}]},
       {Red,Thick,Line[{{a,b,c},{a,b,c}+w}]}
    },

    ImageSize->300,
    ImagePadding->2,AxesOrigin->{0,0,0},
    ImageMargins->2,ViewAngle->All,
    Axes->True,
    Ticks->None,
    PlotRange->{p,p,p}
    ]
  ],

  {angle,0,2 \[Pi],ImageSize->Tiny},
  {{a,0,"a"},0,1,.1,Appearance->"Labeled",ImageSize->Tiny},
  {{b,0,"b"},0,1,.1,Appearance->"Labeled",ImageSize->Tiny},
  {{c,0,"c"},0,1,.1,Appearance->"Labeled",ImageSize->Tiny},

   ControlPlacement->Left
]

在我自己的例子中复制了它。是的,我现在明白了。谢谢。这正是我所期望的工作方式。那么我在上面的例子中做错了什么?“那么我在上面的例子中做错了什么?”。不确定,它可能是围绕RotationTransform[…]的额外{}。尝试用RotationTransform[x,{1,1,0},{a,b,c}]]更改{RotationTransform[x,{1,1,0},{a,b,c}]],看看它是否会影响代码的版本。我发现x,y,z不正确。通过添加彩色点,并设置视点->前面的东西被清除了很多