POV-Ray : Newsgroups : povray.general : how to make an ellipsoid at exact place? : Re: how to make an ellipsoid at exact place? Server Time
31 Jul 2024 22:18:18 EDT (-0400)
  Re: how to make an ellipsoid at exact place?  
From: Roman Reiner
Date: 20 Aug 2006 12:10:00
Message: <web.44e888224a0349d4b48318060@news.povray.org>
In POVRay all transformations (translating, scaling and rotating) are in
relation to the origin. So scaling an object which isn't located at the
origin will also scale its position. An object not located at the origin
will 'orbit' around the coordinate axes when being rotated.
Hence: Create the objects at the center, scale/rotate there and translate
afterwards.

Also it should be scale <2,1,1> instead of <2,0,0>. POVRay should print out
a warning message about that issue.

box { <3,3,3>,<-3,-3,-3>,
    pigment { color Red }
}
sphere { <0,0,0>,1
    pigment { color Blue }
    scale <2,1,1>
    translate <3,3,3>
}
sphere { <0,0,0>,1
    pigment { color Blue }
    scale <2,1,1>
    translate <-3,-3,-3>
}

or somewhat shorter:

box { -3, 3
    pigment { color Red }
}
sphere { 0,1
    pigment { color Blue }
    scale 2*x
    translate 3
}
sphere { 0,1
    pigment { color Blue }
    scale 2*x
    translate -3
}

Hope this helps

Regards Roman


Post a reply to this message

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