CEngine: Building a Personal Physics Engine (Part 1)

Building a physics engine

I’ve been thinking about going back to school for physics. Not as a career or anything, just as a hobby. If I’m going to spend my free time doing something, learning more about who we are, where we came from, and the universe we live in, seems like a sensible thing to spend time on.

And I learn best by doing! So here I am. And it’s just fun.

I don’t know where this will go, but as long as I’m having fun I’ll keep this going.

Demo

Jan-28-2020 14-57-58.gif

Figure 1: Terminal based physics simulation

What is it?

So far it’s a super bare-bones “physics” engine. It’s actually 3d, but I’m not rendering the depth, so it’s just a 2d slice (z=0).

Right now it supports AABB (axis aligned bounding boxes) (a fancy way of saying a box that can’t rotate). And spheres (point particles). The only force it knows about is gravity, and the conservation of momentum.

Where do I want to go?

Short term I’m reading Game Physics Engine Development (by Ian Millington) and watching Math for Game Developers (by Jorge Rodriguez) both have been immensely useful. I did not realize that rotations in 3d would be so complex! Never heard of a quaternion before reading/watching these resources.

Long term I want to continue programming different things I learn as I continue physics just to make sure I really understand it. I’m excited to eventually move into quantum/relativity. But first I want to make sure the basics.

I also had a couple of ideas for little games:

  • A particle collider game similar to the game “Kerbel Space Program” where you build ever-increasing particle colliders to discover components of the standard model. I’d need to learn a lot more about the history of particle colliders to do this.
  • I never liked Physics Lab in school. I think it would be cool to move Physics Labs to VR. It be cool to “see” the electromagnetic fields as you interact with coils and such

Anyways, thanks for reading. Toodles!

One thought on “CEngine: Building a Personal Physics Engine (Part 1)”

  1. Would love to see your take on this new physics lab. Even if not VR just the idea of seeing wave forms. Noting power loss through attenuation. How wave guides focus and shape. Or even shapes of polarization. Guess that’s a little Emag heavy but it’s what’s difficult to conceptualize.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: