How to make a ball move round a circle?

Stellaferox

Active Member
Licensed User
Hi all,

I am trying to make a ball move around a printed full circle (say a planetary orbit). How can this be achieved in the simplest way?
I am looking for the graphical implementation. The math I know.
thnx in advance
Marc
 

klaus

Expert
Licensed User
Longtime User
Some questions to better understand what you want to do.
- is the 'printed full circle' drawn on the form ?
- or is it an image on the background ?
- is the ball a simple circle or a bitmap ?
- do you want the ball turn around it's own center ?

A simple way would be to draw the ball on the forelayer of the form, either directly or with the ImageLibEx library.
If you need to turn a bitmap you must use the ImageLibEx library.

But the Sprite library would probably be the right library for your project.
Unfortunately I have never used it.

There exists an example for the Sprite library:
Basic4ppc - Windows Mobile programming and Pocket PC Development

Best regards.
 
Last edited:

Stellaferox

Active Member
Licensed User
Hi Klaus,

Thanx for your answer.
The "ball" is in fact a planet. I am building a graphical representation of the solar system.
The circle of course is the orbit, which in fact is an ellipsoid, which makes it harder with the math.
I want to move the planet around the orbit. I think your suggestion is the right one. I will try this.
At first I will try to make a circle moving. When it works I usually "pimp" the program.
thnx again
Marc
 

bdiscount

Active Member
Licensed User
Just off the top of head you can use array pts for the elipsoid (Form1.polgon etc)and then move planet from pt to pt using the rotation in dzt's lib. just a thought
 
Top