|
|
Le_Forgeron <lef### [at] freefr> wrote:
> With a shear matrix transform.
> http://www.povray.org/documentation/view/3.6.0/49/
> http://www.f-lohmueller.de/pov_tut/trans/trans_450e.htm
You don't even need a matrix in order to convert a rectangle into a
rhomboid (although the matrix transformation makes it easier to control
more precisely how much the shape is sheared). You can also achieve the
same effect like this (assuming the rectangle is on the xy plane):
rotate z*45
scale <1, .5, 1>
Varying the rotation amount allows you to change the amount of shearing,
but as said, the matrix transformation makes it easier to control it more
precisely. (Also it makes it easier to keep the rhomboid unrotated, if you
don't want the rotation that the above transformation causes. You could
undo the rotation after the scaling, but the exact angle is slightly more
complex to calculate.)
--
- Warp
Post a reply to this message
|
|