188.8.131.52 How can I bend a object?
There is no direct support for bending in POV-Ray, but you can achieve acceptable bending with the Object
Bender by Chris Colefax.
Some objects can be "bent" by just modelling it with other objects. For example a bent cylinder can be
more easily (and accurately) achieved using the intersection of a torus and some limiting objects.
It might be a bit strange why most renderers support bending but POV-Ray does not. To understand this one has to
know how other renderers (the so-called "scanline-renderers" work):
In the so-called "scanline renders" all objects are modelled with triangle meshes (or by primitives such
as NURBS or bezier patches which can be very easily converted to triangles). The "bending" is, in fact,
achieved by moving the vertices of the triangles.
In this context the term "bending" is a bit misleading. Strictly speaking, bending a triangle mesh would
also bend the triangles themselves, not only move their vertices. No renderer can do this. (It can be, however,
simulated by splitting the triangles into smaller triangles, and so the "bending" effect is more accurate,
although not yet perfect.) What these renderers do is not a true bending in the strict mathematical sense, but only an
approximation achieved by moving the vertices of the triangles.
This difference might sound irrelevant, as the result of this kind of "fake" bending usually looks as
good as a true bending. However, it is not irrelevant from the point of view of POV-Ray. This is because POV-Ray does
not represent the objects with triangles, but they are true mathematical surfaces. POV-Ray cannot "fake" a
bending by moving vertices because there are no vertices to move. In practice bending (and other non-linear
transformations) would require the calculation of the intersection of the object surface and a curve (instead of a
straight line), which is pretty hard and many times analytically not possible.
Note that isosurface objects can be modified with proper functions in order to achieve all kinds of transformations
(linear and non-linear) and thus they are not really bound to this limitation. However, achieving the desired
transformation needs some knowledge of mathematics.
See also the variable ior question.