22.214.171.124 Rotation behaves very strangely
"When I rotate an object, it dissapears from the image or moves very strangely. Why?"
You need to understand how rotation works in POV-Ray.
Objects are always rotated around the axes. When you rotate, for example,
that means that you are rotating around the X-axis 20 degrees (counter-clockwise). This is independent of the location
of the object: It always rotates around the axis (what is the center of the object anyways? how do you locate it?).
This means that if the object is not centered in the axis, it will orbit this axis like the Moon orbits the Earth
(showing always the same side to the Earth).
It is a very good practice to define all objects centered at the origin (ie. its 'center' is located at
Then you can rotate it arbitrarily. After this you can translate it to its proper location in the scene. It is a good
idea to do this to every object even if you do not rotate it (because you cannot never say if you will rotate it some
What if, after all, you have a very complex object defined, but its center is not at the origin, and you want to
rotate it around its center? Then you can just translate it to the origin, rotate it and then translate it back to its
place. Suppose that the center of the object is located at
<10,20,-30>; you can rotate it this way: