Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Verlet Physics Simulator/Creator program

Author
Message
GeeB
21
Years of Service
User Offline
Joined: 9th Jul 2003
Location:
Posted: 6th Jun 2005 10:54
I remember a wile back seeing a cool spring physics program. I decided to create a program to simulate hinge joints using the verlet approach. They are essentially springs with "infinite strength" and reach their rest lengths instantly. You can use the program to create and simulate your creations. It can also save and load them.
Here is the download link:
http://home.comcast.net/~m.gibeau/VerletPhysics.zip

Have fun.

PS. I’m aware of most of the bugs in the program currently. I might fix them eventually, but not anytime soon (I’m working on another game). Please don’t post about bugs you find. I know they exist, but they shouldn’t bother you much.

Here are a few to watch out for:
-When points are frozen and touch the ground, they tend to fly off to the left. (Don’t build things on the ground!)
-It is quite possible to create perpetual motion by linking points in a way that they will have to be constantly pulled towards their rest length (but will never reach it!)
-the walls are frictionless (they simply stop particles, they will slide however)
geecee3
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location: edinburgh.scotland.
Posted: 6th Jun 2005 11:52
brilliant fun m8, and very interesting.

i'll play with this for ages

cheers m8.

grant.
robo cat
20
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: In a cat litter tray, near you...
Posted: 6th Jun 2005 17:25
Cool way of creating ragdolls. I made an almost identical tech demo about a week ago for my ragdolls without the editor but with angular restraints and without the bugs for perpetual motion. One question though, is it possible to add angular restraints in your program or is it all based entirely on the limb length?

Simple... yet fun!
GeeB
21
Years of Service
User Offline
Joined: 9th Jul 2003
Location:
Posted: 7th Jun 2005 03:11 Edited at: 7th Jun 2005 04:50
Currently it isn't possible to add angular restraints.
I'm not saying it isn't possible (for me to do it) of course. Right now the only thing effecting the points position are the other points positions (one(s) its connected to) since there is no velocity modeled in the simulation. It's all based off of the positions of the particles. Angular restraints are a good idea though... they'll be great on more complicated ragdolls. I'll have to add that sometime later. I might release another version soon which lets you add spring joints as well. The screen size needs to be increased to 1024x768 also.
BenDstraw
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Arizona
Posted: 7th Jun 2005 14:42
If I saw the source code for that I would die of a severe heart attack. Your a genius!!!!

¤§Ben§¤
So your broke, no change. download from Black Lab its FREE*
http://www.blacklabstudios.5gigs.com
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 7th Jun 2005 16:21
He he, Thats cool. Nice work m8

Give a man a fish and feed him for a day, teach a man to fish and feed him his entire life.....
GeeB
21
Years of Service
User Offline
Joined: 9th Jul 2003
Location:
Posted: 8th Jun 2005 08:29 Edited at: 8th Jun 2005 08:31
BenDstraw,
It's actually not very complex at all, just alot of busy work. The particle system takes care of mostly everything. It's sorta a different way of programming movement. I might post the code for the particle system up later so you can see how simple it all is. The most complicated part really is looking at my nasty trigonometry used to move the particles towards each other when they are hinged. If you are interested in the verlet concept I suggest you read the article "Advanced Character Physics" by Thomas Jakobsen... I think thats how you spell his name. Anyway its in the readme file I included (not the article the name). After you read the article you'll be tempted to go create a demo like mine...
BenDstraw
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Arizona
Posted: 8th Jun 2005 09:41
Thank you that would be nice to see. And maybe I can brush up on some trig. I think its funny how hard people think trig is. I was just amazed at 2d physics and how good the program is.

¤§Ben§¤
So your broke, no change. download from Black Lab its FREE*
http://www.blacklabstudios.5gigs.com
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 8th Jun 2005 09:43
http://home.comcast.net/~m.gibeau/VerletPhysics.zip
I hate it when people don't make their link Clickable. I wish this forum did it automatically.

GeeB
21
Years of Service
User Offline
Joined: 9th Jul 2003
Location:
Posted: 8th Jun 2005 12:35
Here is the basic code which controles the particles:



let me explain the variables....
x and y -- the particles x and y positions!
nx and ny -- the particles new x and y positions
xo and yo -- the particles old x and y positions

This is all you need to get the particles moving!
notice how theres no x=x+xvel. Velocity in this case would be:


Here is the main code in the constraint function:



you need this function also (well you don't really)



I know some stuff won't make compleate sense because alot of the code is missing but that should be enough to get particles into your program and joint em together.

Have fun.
BenDstraw
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Arizona
Posted: 8th Jun 2005 16:26
Thanks Ill experiment with some of this to see what happens

¤§Ben§¤
So your broke, no change. download from Black Lab its FREE*
http://www.blacklabstudios.5gigs.com
STALKER
19
Years of Service
User Offline
Joined: 16th Apr 2005
Location: Help! I\'m stuck in the printer!
Posted: 8th Jun 2005 23:01
He he. Good stuff. Made me laugh, and also realise how pathetically lame I am.

>>>>>>>>>>>MIRAGE STUDIOS<<<<<<<<<<<
>>MEDIEVAL CARNIVAL<->GLADIATOR ARENA<<
JOE SCHMO
19
Years of Service
User Offline
Joined: 11th Jul 2005
Location:
Posted: 12th Jul 2005 04:23
@ GeeB

I've been working on verlet physics for around 6months now so I'm no stranger to it all. I'm really keen to ask you a few questions, in particular re the ragdoll demo. I notice that you haven't included your e-mail address in your profile so I'd really appreciate if you could send me an e-mail on stevieATsteviegoodwin.plus.com.

Cheers
Stevie

Login to post a reply

Server time is: 2024-11-22 13:39:15
Your offset time is: 2024-11-22 13:39:15