This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Rotating objects around each other


Rotating objects around each other

Postby PointOfLight » Jul 2, 2008 @ 5:57pm

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.
Eric Pankoke
Programmer
Point Of Light Software
http://www.polsoftware.com/
PointOfLight
pm Member
 
Posts: 525
Joined: Nov 2, 2003 @ 8:39pm


Postby PointOfLight » Jul 3, 2008 @ 2:37pm

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.
Eric Pankoke
Programmer
Point Of Light Software
http://www.polsoftware.com/
PointOfLight
pm Member
 
Posts: 525
Joined: Nov 2, 2003 @ 8:39pm


Postby Johan » Jul 4, 2008 @ 11:16am

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
Johan Sanneblad, M.Sc, Ph.D
GapiDraw Systems Architect
[]
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum