MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: RotateShape[Cuboid...


This is because RotateShape and the other graphic transforms work only on
graphics objects built out of Points and Lines and Polygons. Cuboid is drawn
using more primitive graphics code and is not susceptible to such
transformations.

If you build up your cube by combining Polygons you can rotate them. Here is
an example with a partial cube.

side1 = Polygon[{{0, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 0, 1}}];
side2 = Polygon[{{1, 0, 0}, {1, 1, 0}, {1, 1, 1}, {1, 0, 1}}];
side3 = Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1}}];
side4 = Polygon[{{0, 1, 0}, {1, 1, 0}, {1, 1, 1}, {0, 1, 1}}];
cube = {side1, side2, side3, side4};

Show[Graphics3D[cube] ,
  RotateShape[Graphics3D[cube],
                 Pi/4, 0, 0]];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

> From: roelb [mailto:roelb at club-internet.fr]
To: mathgroup at smc.vnet.net
>
> Hi,
> On Mathematica3 for mac, the following input produces 2 rods crossing
> with a 90° angle, as expected. That's OK.
>
> Show[Graphics3D[Cylinder[.3,1,10] ],RotateShape[
>          Graphics3D[Cylinder[.3,1,10 ] ],
>                   0,Pi/2,0]]
>
> But a quite similar RotateSphape input applied to Cuboids doesn't behave
> in the same manner. Why? (I expected the top Cudoid being oriented
> differently than the botton one).
>
> Show[Graphics3D[Cuboid[{-1,-1,0},{1,1,1}]] ,
>   RotateShape[Graphics3D[Cuboid[{-1,-1,1},{1,1,2}]],
>                  0,1,0]]
>
> The mathematica book state that cuboids faces are parallel to the axes.
> Should it means that RotateShape doesn't apply?
>




  • Prev by Date: Re: Urgent
  • Next by Date: Re: Re: Plotting Intersecting Planes
  • Previous by thread: RotateShape[Cuboid...
  • Next by thread: Re: RotateShape[Cuboid...