This week covered Chapter 5 of “The Nature of Code” which introduces us to a very useful library for physics based simulations called Toxiclibs.
I am using Toxiclibs to create my final composition because it is great to produce compositions based on vector fields. However this chapter focused on Toxiclibs classes to simulate soft bodies. Toxiclibs contains it’s own set of particles package called VerletParticles, and springs called VerletSprings. When you first begin a sketch using Toxiclibs you will have to include an import statement for a particular package to reference back to the methods and classes that you are going to use. The reference doc is very extensive and can be found here.
For the chapter, I completed the exercise that asked to develop a softbody cloth using a grid of particles connected by strings. This required once again, much like in the shatter example, the need to arrange particles in a grid separeted by a distance which would equal the rest distance of the spring. Below is a screenshot of the simulation:
For this week’s composition, I decided to still continue with the particle systems and leave the use of toxiclibs for my final composition. I wanted to try something more geometrical and thought that I could come up with an evolving polygon by having particles connect to each other as they moved abt the screen space. In the future, an export of these lines to a CAD software can be incorporated into the application such that the 2D forms could be used as the starting basis of a floor plan. My sketch can be played here.