Nature of Code Midterm

I really loved the game Flower. So I decided to make a particle-based flower simulation with toxiclibs’ VerletPhysics2D.

For the midterm I made a flower with several petals, that bends in response to applied force – gravity and wind.

For the final, I would like to make all the petals as small mesh pieces, like fabric, and then make the petals blow away in the wind. The petals would “swirl” in the wind due to moving invisible attractors and repellers. The mesh will gently billow and deform. Ideally I would make an entire field of procedurally generated flowers.

The first step in this project is to choose the physics I want to simulate. Then how the particle clouds will behave. Then what springs, attractors, and repellers will achieve this.

Here’s my overall plan:

Flower overview

I want a world with uniform gravity force, pointing down. So I need two main springs – a visible flower-ground “stem” spring, and an invisible flower-suspension spring. Starting from the attractor example for toxiclibs, I made my basic flower – a single attractor point attached to two springs, and a cluster of petal points that mutually repel but are all attracted to the center.

Then I added a horizontal force to check the behavior.

Added more points to the petals to make them detachable clusters, made the stem a “chain”

Adding particles

I can make bezier curves around the particles for now, but someday they should be a mesh

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s