POV-Ray : Newsgroups : povray.general : How to store/read the results of rotating a point in space in SDL : How to store/read the results of rotating a point in space in SDL Server Time
30 Jul 2024 16:16:00 EDT (-0400)
  How to store/read the results of rotating a point in space in SDL  
From: Mike the Elder
Date: 31 Oct 2008 08:20:00
Message: <web.490af6c6e21271d2ad9dd8b40@news.povray.org>
Hi folks.  After having been away from the group for a while, I was hoping to
return by posting a really neat image... However, it turns out that I could use
a bit of help producing that image.

I get the feeling that I'm missing something pretty basic in SDL.  Given the
basic nature of what it does, it SEEMS like it should be pretty easy to apply a
rotation to a point in space and get back the result as a standard vector value.

Here's an easy example:

If the point <0,10,3> is rotated 90 degrees about the y axis, the result is
<3,10,0>.

Now, I can store the value of the starting point like this:
#declare POINT1 = <0,10,3>;

....and I can use POINT1 as a value for placing objects, but...

HOW do I code:  #declare POINT2 = ???? //POINT1 rotated in a given way

I could, eventually, accomplish the rotations with a "do-it-yourself" method
based upon basic trig functions, but that seems an awful lot like re-inventing
the wheel in the middle of a wheel factory.  I'm thinking that there's GOT to
be a simple way to do this and that I'm just having an "elder moment".

Thanks in advance for all replies.

Best Regards,
Mike C.


Post a reply to this message

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