Welcome
Simple, interactive animations in plain JavaScript.
Posts
Fractal Tree
One of the simplest fractals to create. Playing around with the parameters is fun, though. And with the right parameters, you can get something that doesn’t resemble a tree at all anymore but has quite the beauty to it.
Clustering with Fuzzy C-Means
Imagine, you may have collected data about your customers, such as age, height, body weight, earlobe area, egg consumption. The data definitely was collected with the consent of your users and now you want to figure out if your users can be grouped into a certain number of groups, so you can provide better service to each of them. Most likely, some users won’t fall into exactly one group, so you’d also like to quantify each user’s partial membership in each group.
Soft Body Simulation
Connecting the ends of the rope and additionally enforcing an area constraint, one can get a squishy blob. The area constraints pulls points to the center if the area gets too large, or pushes them outward when it gets too small. Play around with the parameters and see the blob getting more gooey or more firm.
Elastic Rope with Obstacle Collision
By giving the points of a chain some inertia and by replacing a fixed-distance constraint by projections towards the desired link length, one can get a stretchy rope. Smash the rope into the other objects and watch them interact.
Kinematic Chains
By projecting point positions so they respect constraints (minimum distance, maximum distance or exact distance), their velocity implicityly gets manipulated, resulting in seemingly correct impulse transfers when colliding. Or by chaining points together and having them keep a fixed distance to their neighboring points, one can get snake-like chains that follow the first point. Going along the chain back and forth, enforcing the constraint, one can get a chain of which both end points can be set to a desired position and the other points will follow.
Circles in Circles in Gravity
Quite simple and fast simulation of dynamics can be reached with Position Based Dynamics. Instead of modeling forces and masses directly, the focus is on position constraints and projections. Already with very simple rules, one can get impressively realistic-seeming simulations. With enough self-avoiding points, it almost seems like a splashing liquid.
subscribe via RSS