Jump to content

  • Log In with Google      Sign In   
  • Create Account






Simple Particle Physics

Posted by ericrrichards22, 18 January 2014 · 478 views

C# Physics Particle Physics DirectX 11 SlimDX
As I mentioned last time, I’m going to move on from fiddling with my Terrain class for a little while, and start working on some physics code instead. I bought a copy of Ian Millington’s Game Physics Engine Development some months ago and skimmed through it, but was too busy with other things to really get into the accompanying source code. Now, I do have some free cycles, so I’m planning on working through the examples from the book as my next set of posts.

Once again, the original source code is in C++, rather than C# as I’ll be using. Millington’s code also uses OpenGL and GLUT, rather than DirectX. Consequently, these aren’t going to be such straight ports like I did with most of Frank Luna’s examples; I’ll be porting the core physics code, and then for the examples, I’m just going to have to make something up that showcases the same features.

In any case, we’ll start off with the simple particle physics of Chapters 3 & 4, and build a demo that simulates the ballistics of firing some different types of projectiles. You can find my source for this example on my GitHub page, at https://github.com/ericrrichards/dx11.git.

Here you can see the four projectile types: 1.) a pistol-type round, 2.) a large artillery shell, 3) a fireball, 4.) a bolt from a railgun or energy weapon



Read more »




I think I looked through that book and didn't find anything useful for rotational physics, or else it was all mathematical theory. I read something about needing an "integrator" for a physics engine. Does that mean your engine needs to solve calculus problems?

I am unsure how useful this book will turn out to be; at the least I hope to get a good sense of the concepts underlying other physics engines, so if I end up using something else, at least I'll know what they're talking about.

 

Technically, figuring out the position of a particle from the velocity or acceleration involves calculating one or two integrals...  I really don't understand the FUD around calculus, but then again, I never took a college calculus class; anytime you try to learn math without using it practically, it seems like it is 100x harder to get your head around...

August 2014 »

S M T W T F S
     12
3456789
10111213141516
171819202122 23
24252627282930
31      

Latest Visitors

PARTNERS