- #1
Krash
I want to model an extremely simplified explosion in a little program I have. All I want to do is accurately model the movement of a single object affected by this explosion in a void.
Here's how I'm thinking about things so far. I'd appreciate it if people could tell me whether I'm on the right track or not.
- Model the "explosion" as an infinite number of forces of equal magnitude, originating from a point in space.
- The movement of the object is along the 3d line between the object's center of mass and the origin of the explosion, and is inversely proportional to it's distance from that origin.
The rotation of the object has me a little stumped, but I think this would be accurate:
- Take the surface of the object nearest the explosion, and find the infinite 3d plane of which it is a part.
- Find the perpendicular distance between that plane and the origin. This becomes the magnitude of the tortional force.
- Find the point on the plane which this perpendicular strikes, and find it's distance from the object's center of mass. This, combined with the above magnitude, allows the calculation of the speed at which the object will now spin.
- The axis of rotation is the line perpendicular to both the extended plane and it's initial perpendicular, passing through the object's center of mass.
Is all that accurate, assuming the object is a regular polyhedron? The calculations would obviously be more complex if I wanted to include such things as gravity, air, temperature, etc, but I don't. I just want a few polygons to fly away from a point in a realistic fashion.
Assuming that it is accurate, can someone point me in the direction of the equations for finding the values I'd need? I'd prefer them in cartesian coordinates, but polar would do...
- Krash
Here's how I'm thinking about things so far. I'd appreciate it if people could tell me whether I'm on the right track or not.
- Model the "explosion" as an infinite number of forces of equal magnitude, originating from a point in space.
- The movement of the object is along the 3d line between the object's center of mass and the origin of the explosion, and is inversely proportional to it's distance from that origin.
The rotation of the object has me a little stumped, but I think this would be accurate:
- Take the surface of the object nearest the explosion, and find the infinite 3d plane of which it is a part.
- Find the perpendicular distance between that plane and the origin. This becomes the magnitude of the tortional force.
- Find the point on the plane which this perpendicular strikes, and find it's distance from the object's center of mass. This, combined with the above magnitude, allows the calculation of the speed at which the object will now spin.
- The axis of rotation is the line perpendicular to both the extended plane and it's initial perpendicular, passing through the object's center of mass.
Is all that accurate, assuming the object is a regular polyhedron? The calculations would obviously be more complex if I wanted to include such things as gravity, air, temperature, etc, but I don't. I just want a few polygons to fly away from a point in a realistic fashion.
Assuming that it is accurate, can someone point me in the direction of the equations for finding the values I'd need? I'd prefer them in cartesian coordinates, but polar would do...
- Krash