Skip to main content
gamedev.net
🔒 Locked

sine test

Started by andy_s_1 2 replies 700+ views
Original Post
andy_s_1
andy_s_1
what is the easiest way to set up a sine test for my integration methods? im usure where to attatch the sine function to and what to actually input as the sine value? lets say for using basic euler integration where v' = v + a; and x' = x + v'; should a = sin(time)? i just seem to get bland results that do not look correct!
JohnBolton
JohnBolton
That looks right except perhaps the equations should be:
    v' = v + a * time;    x' = x + v' * time;
Also, keep in mind that Euler is not particularly accurate. Try smaller time steps.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
andy_s_1
andy_s_1
yeah i am trying to demonstrate eulers inaccuracies compared with mine.

whne you say a+time do you mean the change in time (delta time)?
JohnBolton
JohnBolton
Quote:
Original post by andy_s_1
whne you say a+time do you mean the change in time (delta time)?


Yes, sorry. I misread your post. time is delta time.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.