Page 1 of 1

Rotating objects around each other

PostPosted: Jul 2, 2008 @ 5:57pm
by PointOfLight
I'm sorry to ask such a basic question, and I realize this isn't really even GapiDraw specific, but since I'm using GapiDraw I thought I'd bug you guys first. I have a simple problem where I have an object in the middle of my screen, and when I rotate that object I need several other objects around it to rotate as well. What should make this even easier is that the paths of the ancillary objects is circular. However, when I try to implement a routine to calculate the paths of these objects, they end up orbiting the main object in an elliptical fashion rather than a circular one. If anyone has any code snippets or can point me to a web site explaining the math for what I want to do, I'd very much appreciate it.

PostPosted: Jul 3, 2008 @ 2:37pm
by PointOfLight
I figured out my problem. It turns out that I was using the wrong point on my rotating objects to determine the radius around which they needed to travel. Once I picked the center of the object as the point of reference everything worked fine.

PostPosted: Jul 4, 2008 @ 11:16am
by Johan
Ok glad to hear you solved it!

I have been busy with GapiDraw 3.8 the past days and did not have time to look into it before you resolved it yourself!

Cheers
Johan