POV-Ray : Newsgroups : povray.advanced-users : how can a square mesh be changed to a rhomboid : Re: how can a square mesh be changed to a rhomboid Server Time
29 Jun 2024 02:15:19 EDT (-0400)
  Re: how can a square mesh be changed to a rhomboid  
From: Warp
Date: 9 Aug 2010 05:52:02
Message: <4c5fcfc2@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.