POV-Ray : Newsgroups : povray.newusers : determining location of an object that has been transformed and rotated : determining location of an object that has been transformed and rotated Server Time
30 Jul 2024 04:15:48 EDT (-0400)
  determining location of an object that has been transformed and rotated  
From: Jeremiah Isaacs
Date: 15 Sep 2004 15:55:01
Message: <web.41489cc265a1a06956b76d0d0@news.povray.org>
I have been hunting around for an answer to this (looking at everything from
vector() to spherical geometry pages), and at this point I am looking in
too many directions at once.   Some guidance would be appreciated.

// Lets say there is a vector
// (could be anything)
#declare SomeVector = <10, 20, 30>

// ..  and an object ...

sphere {
     0, 1

// and I translate it away from the origin

translate z*10

// then I rotate it

rotate SomeVector

}

Where is the center of the sphere after the transformations in <x,y,z>
coordinates?

Now, if I only rotate it by  <10, 20> I think I can figure it out with trig.
 However using all three has me slightly baffled.  I have been digging thru
math.inc, functions.inc, and transforms.inc, and haven't found a funtion to
do this.

And ffor the double whammy, what if I translate and rotate an object an
arbitrary number of times.  How to locate it?

Background:  I have been using povray for a long time, but never intensely.

Thanks - Jeremiah


Post a reply to this message

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