Post about "verlet"

Ragdoll Animator

Click here to try out Ragdoll Animator

Very crude example animation: here. Copy/paste it into the textarea at the animator page, then click “Load from textarea.”

For the past two weeks I’ve been working on a simple Verlet-based Animator. Everytime you click “Add Frame” (or press spacebar), the animator tries to predict your next frame by apply motion to the stickman. You can even simulate it in real time by holding spacebar and grabbing the stickman and flinging him around. There’s a lot of other cool things you can do here, but I’ll leave it to you to find out.

Ragdoll Animator, like most of my stuff, was programmed in Processing. Instead of compiling it as a Java Applet this time I instead used Processing.js.

The creation of Ragdoll Animator was made with the help of some of the Processing.js dev team, especially Pomax, who was willing to tolerate my countless questions about code design.

For animators: My animation example is very crude and I’m certain other people are more capable than me at making something neat. Paste your animations at PasteBin and tweet them! I’ll be sure to include animations tweeted in later blog posts.

Source code info after the break.
(more…)

Changes to Curtain

Click here to see How to Make a Fabric Simulator

Click here to see How to Make a Fabric Simulator Part 2

Yesterday and today I made some long needed changes to Curtain‘s code. Most of it is behind the scenes stuff. The most noticeable change will be how it interacts with the mouse. It should now be a lot smoother and when the user is tearing (right clicking), it wont just tear at points it sees the cursor at, but it’ll tear ALL points between the cursor’s current and previous positions. Meaning it’s now a lot easier to slice the curtain in half with just one swipe.

You might also notice changes in the speed since the majority of the changes are optimization. You’ll only notice it if Curtain was laggy or slow for you before this update. To try out the newly optimized Curtain, check it out here. You can also check out its source here or here. To see a list of updates, jump to the end of the post.

(more…)

Verlet Car

Today I’ve further extended the verlet algorithm and created a Car from it. At the moment it’s just a box with wheels, but in the future I’d like to allow weight-shifting to it, so it can be played it be like those motocross games. When and if I finish it, I’ll clean up the code and open-source it on http://www.openprocessing.org/ and http://www.hawkee.com.

Also check out my Twitter: @BlueThen.

Ragdoll Aquarium

Short post here. As promised, here’s the source to the ragdoll applet I released a few weeks back: http://www.openprocessing.org/visuals/?visualID=22598

Press ‘r’ to reset. Click and drag to interact.

In this applet, we make use of the Verlet Integration method from Curtain, and create little ragdolls.

I did my best to comment the code for others to use.

Fun with Ragdolls

Since I finished Curtain, I’ve been experimenting with simulating ragdolls. Click here to play with some ragdolls. For programmers out there interested in the source: hang tight. I haven’t finished cleaning up the source completely yet, but it’ll be released soon (All my sources are released at OpenProcessing).

There’s something about ragdolls that I enjoy a lot. You can swing them, fling them, smash ‘em and put ‘em in a pot. What I made wasn’t exactly full body 3D ragdolls, but it’s set the path for further ragdoll fun for myself. Check the rest of the post for further ragdoll mechanics and what-not. Keep in mind the “constraints”, “masses”, and other stuff involve the algorithms in my Verlet Integration tutorial. (Part 1, Part 2)

(more…)

Updated Curtain and How to Improve Your Verlet Cloth Simulator

Click here to view curtain updated (Most of the update was behind the scene stuff, but tearing was added as well as a few adjustments. Right click and drag to tear. Press ‘r’ to restart, and ‘g’ to toggle gravity).

Click here to view Part 1 (How to build a Verlet Integrated cloth simulator)

So last week I made a blog post discussing how I made Curtain. It described things like the physics and mostly, the Verlet Integration. Today I’d like to go into more detail on how to further improve the Verlet Integration method used by making it more consistent and easier to tune. I’ll also be talking about some of the changes done to Curtain.

(more…)