Advertisement

Moving a Point in space

Started by August 31, 2000 02:00 PM
1 comment, last by Ozz 24 years, 5 months ago
How do I rotate a point around a centerpoint? I want to be able to move the center point and have the circumference point move with it but still be able to rotate around the centerpoint.
If your point is at ( X, Y, Z ):

Rotate your satelite around the origin, for example if it had a unit radius orbit, it starts at ( in the xy plane ) ( 1, 0, 0 ) then moves in time to ( 0, 1, 0 ) and so on.
Add your point's location to the satelite's x, y, z's. so initially satelite is at ( X + 1, Y, 0 ) then in time moves to ( X, Y + 1, 0 ).

Then as your point moves, just add the new X, Y, Z to the satelites origin based location.


Edited by - Antknei on August 31, 2000 3:10:11 PM
Advertisement
If your point coordinates are not at the origin (0, 0) and are world based (meaning they have been already translated) then you would have to move them back to the origin, meaning, subtracting the center point that you have to rotate about, from your point that you want to rotate, then rotate it, and finally translate it back (adding the center point to the point you just rotated). I don''t know if I interpreted your question correctly, but if I did, that''s the way to go, if not then please be more specific.

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

This topic is closed to new replies.

Advertisement