Archived

This topic is now archived and is closed to further replies.

smooth motion

This topic is 4947 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Please try this prog: members.chello.hu/havasvolgyi.zoltan/massexe It must be renamed to exe. It's nothing special, I just want to know if the red points are moving really smoothly on other machines. On my machine they are not moving smoothly. And I don't know why. Thanks in advance [edited by - szinkopa on May 28, 2004 6:33:09 PM]

Share this post


Link to post
Share on other sites
Seems to work fine on mine.

edit: Though one point doesn't move at all. Is it supposed to?

[edited by - Rayno on May 28, 2004 6:54:19 PM]

Share this post


Link to post
Share on other sites
Don''t worry about trojan or anything. It''s harmless code.
In that version the timestep was 1 ms, but the drawing rate was not neccesarily constant, but does it count?

Here is the main loop:


m_TimeStep=0.001;

 //the real time elapsed since beginning of simulation

m_PhysicalTime=m_Time.GetTimeElapsed();
//while the simulation time is before the real time

while(m_LogicalTime<m_PhysicalTime)
{
//the real time elapsed since beginning of simulation

m_PhysicalTime=m_Time.GetTimeElapsed();


//physics update

// m_Physics.SolveEuler(m_TimeStep);

// m_Physics.SolveRK2(m_TimeStep);

m_Physics.SolveRK4(m_TimeStep);
//simulation time update

m_LogicalTime+=m_TimeStep;

}

Draw();
SwapBuffers(pGlWindow->GetHDC());
 
ProcessInput(pGlWindow->GetInput());

Share this post


Link to post
Share on other sites