It is currently Fri May 26, 2017 8:09 am

All times are UTC - 5 hours




 Page 1 of 1 [ 5 posts ] 
Author Message
 Post subject: Physics VMK 6 - Integrators
PostPosted: Mon Mar 31, 2008 8:36 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
In VMK6A I describe two different types of integrators; Euler and the Improved Euler Integrator.

Excel is used to easily compare the accuracy of the Euler and the improved Euler Inegrators in VMK6B.

In VMK6C we clean up the project and implement a Particle class which will use the Euler Integrator in the next VMK.

VMK6D shows you how to implement the Euler Integrator to simulate motion of many particles. Gravity and Wind moves each particle independently.

In VMK6E I show you how to add a few more effects to the particle class to make them bounce when they hit the ground or shoot out in random directions.


Last edited by Marek on Tue Apr 08, 2008 7:16 pm, edited 2 times in total.

Offline
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 10:54 am 

Joined: Sat Jun 23, 2007 7:56 pm
Posts: 145
Hi,
I've not watched this video yet (am at work) but just wanted to ask if you'll consider talking a bit about Verlet integrators, Say compare them and things like that. (Possibly cover RK4 too?)

I've been looking at RK4. Understand the principle but do not know why the integration uses
variable = 1/6 (a + 2b + 2c + d)
to complete the integration. (Know it has something to do with Taylor series but don't know where the constants 1/6 and 2 come from)

Thanks


Offline
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 6:18 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
In VMK6B I show you how to compare the two integrators that I talk about in VMK6A. You can do the same thing for any other integrator you want to use.

I won't be talking about the RK4 integrator until a little bit later in the series when we start using it to integrate our Force and Torque equations.

To get an explanation of where the co-efficients for RK4 come from, have a look at my university notes on the topic: http://www.marekknows.com/Misc/forum/Notes_Chap6.pdf


Offline
 Profile  
 
 Post subject: At The End of Integrator! About Math::RandomRange() Function
PostPosted: Sun Feb 07, 2010 4:47 am 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 447
Here we are working with the Euler Integrator using the Particle Class,

When you create the iAngle Variable and you are using the Math::RandomRange() function, I have not seen this function implemented anywhere in the videos.


Offline
 Profile  
 
 Post subject:
PostPosted: Tue Feb 09, 2010 6:28 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
Sorry about that, it looks like I forgot to record a video showing the construction of this function. Shown below is the source code used:

//------------------------------------------------------------------------
// Name: randomRange(:)
// Desc: return a random number between iMin and iMax where iMin < iMax
//
int Math::randomRange(int iMin, int iMax) {
   int iReturn;
   if (iMax < iMin) {
      //swap min and max if max < min
      iReturn = iMax;
      iMax = iMin;
      iMin = iReturn;
   }

   iReturn = iMin + (rand()%(1+iMax-iMin));

   return iReturn;

}; //randomRange


For an explanation of the equation used, have a look at the C++ VMK 16 Random Numbers


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron