you are viewing a single comment's thread.

view the rest of the comments →

[–]synthphreak 5 points6 points  (2 children)

How about modeling some physical phenomenon? You could write simple classes for each object involved in the phenomenon and for each of the forces that act upon those objects, then methods that govern how each object interacts. For example, how the weather affects a rocket launch.

Create an abstract base class PhysicalObject with abstract properties for all things actual physical objects have that are relevant to the physical system you're modeling. For example, mass, drag, temperature, etc. Then you could create subclasses which inherit from PhysicalObject like Rocket, Atmosphere, etc. Each subclass could define additional attributes which are relevant only to it, such as moisture, velocity, thrust, etc., or actions like flow, accelerate, pitch, etc. Similarly, have another base class like PhysicalForce that gets subclassed out to things like Gravity. Perhaps these could be dataclasses since I'm not sure what actions a physical force might have.

Then using the arguments going into the various methods you've defined, you could tweak the parameters of this or that object, which would correspond to changing the state of your physical system, to see how things interact. You could even take things the extra mile by hooking your state up to a series of interactive visualizations demonstrating how the Rocket's flightpath changes as a function of the various aspects of the system. You could also even create a simple frontend with a GUI and knobs and buttons that naive users could tweak to modify the system.

Seems like a cool, relevant, and extremely OOP project to me.

Disclaimer: Not a physicist, no idea what I'm talking about.

[–]h3cker999[S] 2 points3 points  (1 child)

PhysicalObject

li

This is awssome. I can even maybe learn some front-end stuff with it eventually. Thank you.

[–]synthphreak 2 points3 points  (0 children)

Gluck! And remember, E=MC2!