Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / moving around a position in 3d space

Author
Message
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 29th Oct 2006 18:46
Hi all.

I'm experimanting with making so that a ball move around a position in 3d space with help of cos and sin. But I don't get it to work, and I've no idea about what is wrong. Can anyone help me?

Raithe
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location:
Posted: 29th Oct 2006 18:58
Im not sure if this is what you are trying to do as im pretty new with dbpro aswell but I modified it like so.....




~Ellusion Games~
xXxLife is like a box of chocalate's there's always one's you dont likexXx
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 30th Oct 2006 10:41
Thanks, but that was not was I was looking for. I'm trying to make so that the small sphere moves in a perfect "orbit" around the larger sphere with the help of cosine and sinus.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 30th Oct 2006 22:22
@Mr X

Here's a 2d example. It can be easily adapted to 3d. This uses a circular orbit, not an elliptical one. If you want an elliptical orbit, you need two different radii.

Circular:



Elliptical:



Enjoy your day.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 31st Oct 2006 00:19


Tutorials:
Array
Functions
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 2nd Nov 2006 09:30
Thanks for your help . I'll take a look at it when I get home.
Ralen
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location:
Posted: 7th Nov 2006 12:33
Here is another MATHLESS method of doing it.

Code with everything commented



Code SANS comments




Login to post a reply

Server time is: 2024-09-25 11:31:00
Your offset time is: 2024-09-25 11:31:00