Hey that's cool jhocking, most people don't show me what they're doing with my stuff, so it's fun to see something in action now and then since I haven't actually put it to any real use myself yet. :-)
I like this verlet code, but I wish it was commented more to explain how it works, and was encapsulated in it's own set of functions seperate from the program that's using it.
I'm gonna have to look this stuff up and learn how to do it myself cause you can get some really fun and useful physics with very little code apparently.
I wonder though... it sounds liek this simulates slip. But is it really simulating torque and all that other stuff? I mean it sure looks like it. I don't see how the turning or accelerating works at a glance though, but when I tried to make the wheels so they could only move up or down it resulted in a car that moved forward only very slowly. I didn't really make a concerted attempt to clean up and understand the code though. I'll have to find that gamasutra article on this and give it another look.
If I understand right, the way this system works is by creating a mass which is made stiff using springs between the vertices. I assume that to save processing speed you're using an invisible impostor object for the collisions. I didn't check to see how you're actually determining if the vertices collide with a surface, though I would assume since the code is so simple that it's using Blitz's collision system. I noticed that the front of the VW intersects things, so that lends credence to my theory that you're using impostors.
Btw, did you know that the only truly stable 3D construct is a tetrahedron? That's a pyramid with a triangular bottom. For example, if you contruct something out of straws with strings attaching them, only the terahedron will be stable. A cube will not be. An old russian mathematician told me that once. :-)
I wonder if that information would be useful in some way in constructing stable objects that require less processing power. At the very least, it seems to me that you may not have to connect every verlet to every other one to create a trusly stable object, you may merely have to divide the object up into a set of connected tetrahedrons.
I'm not sure if that method requires the least number of springs though to make a truly stable object though.
I like this verlet code, but I wish it was commented more to explain how it works, and was encapsulated in it's own set of functions seperate from the program that's using it.
I'm gonna have to look this stuff up and learn how to do it myself cause you can get some really fun and useful physics with very little code apparently.
I wonder though... it sounds liek this simulates slip. But is it really simulating torque and all that other stuff? I mean it sure looks like it. I don't see how the turning or accelerating works at a glance though, but when I tried to make the wheels so they could only move up or down it resulted in a car that moved forward only very slowly. I didn't really make a concerted attempt to clean up and understand the code though. I'll have to find that gamasutra article on this and give it another look.
If I understand right, the way this system works is by creating a mass which is made stiff using springs between the vertices. I assume that to save processing speed you're using an invisible impostor object for the collisions. I didn't check to see how you're actually determining if the vertices collide with a surface, though I would assume since the code is so simple that it's using Blitz's collision system. I noticed that the front of the VW intersects things, so that lends credence to my theory that you're using impostors.
Btw, did you know that the only truly stable 3D construct is a tetrahedron? That's a pyramid with a triangular bottom. For example, if you contruct something out of straws with strings attaching them, only the terahedron will be stable. A cube will not be. An old russian mathematician told me that once. :-)
I wonder if that information would be useful in some way in constructing stable objects that require less processing power. At the very least, it seems to me that you may not have to connect every verlet to every other one to create a trusly stable object, you may merely have to divide the object up into a set of connected tetrahedrons.
I'm not sure if that method requires the least number of springs though to make a truly stable object though.