Skip to content

Latest commit

 

History

History

Jan29_Shapes_No_Touching

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Jan 29 Prompt: Any shape, none can touch

Description

The underlying algorithm is circle-packing. That ensures that none of the shapes touch. For variety, circles are distorted (into blobs) and elongated into ellipses. A few rectangles and triangles are thrown in to break the monotony. The color is a function of the shape's xy position.

Link to all of my Genuary2021 Creations.

Technical

I had two or three related ideas for this one.

  1. Place circle-like shapes, that don't touch. For this, use the circle-packing algorithm, and use noise to distort the circles.

  2. On a fine square grid, each square can either be occupied or not. Place rectilinear shapes that don't touch. This should create a tetris like object grid. (Future work)

  3. Combine both of the above ideas. for a Blob, have to find all the mesh-squares that are 'occupied' and the other mesh squares that are off-limits. (Future work)

Code and Common Modules

Run shapes1.py to recreate these images. Please run this from inside the Processing IDE, since it uses Processing. It also uses a common file called shapes.py which you must import from the common directory.

For most of these, I am using the Processing Framework. Since I mostly code in Python, I use the Python extension of Processing, which is not as popular as its Java version. Also, I sometimes create small resuable code segments which I use in multiple projects. I'm sharing all my genart code, in case others find it useful.

Ram

Link to all of my Genuary2021 Creations.