Sign in to follow this  
andy_s_1

sine test

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this