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.

DarkBASIC Discussion / sinus balls

Author
Message
HomerS
17
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 5th Mar 2013 20:23
Hi,

I try to make a wave of balls. They have to be wobbeling on the y-as. All the balls together have to make a sinus curve.

I have tryed some code, but it still does not correctly work.

Have a look at my code.



Can someone give me a hint?

Greetings!

Toedeledoki
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 5th Mar 2013 23:14
Quote: " position object d,ox#,cos(m*((d-1)))*100,oz#"

Hint:
Your problem is here, specifically in your argument to cos(). You are MULTIPLYING M, making the angle change rapidly from point to point. You want a more regular adjustment to the angle for each point.

Answer:


Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
HomerS
17
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 7th Mar 2013 22:31
Hello Batman,

TNX for your tip!

I have been fixing the problem.

I changed the code from


into




The little program I now have made a little interactive. You can change the variables.

Look for this code:





Maybe beginners have fun with it?

Now lets change colors!! lol

Greetings!

Toedeledoki
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Mar 2013 04:08
Homer, you might find this interesting as well:

http://forum.thegamecreators.com/?m=forum_view&t=203173&b=1

"You're all wrong. You're all idiots." ~Fluffy Rabbit
HomerS
17
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 9th Mar 2013 23:14
Onely the first text scroll works for me...

That looks great aleready.

Tnx,

Toedeledoki

Login to post a reply

Server time is: 2024-11-21 11:59:19
Your offset time is: 2024-11-21 11:59:19