← Blog index

Generative Art - Project 1 - Ground Truths

Published: 2022.02.09

01/25/2022

First screenshot of prototype Second screenshot of prototype Here are a couple of early screenshots. I was thinking of using what I've learned in the past to simulate bouncing balls on uneven ground, and to either a) have the ground be slowly revealed as more collisions occur, or b) show the paths of all the balls at once to give a sense of where the ground is.

02/07/2022

Here are the notes I took to help me understand collision response in 2D.

Notes on physically based modeling and collision detection

The script samples points from any random function at constant intervals to generate the collision domains. Currently, a Gaussian distribution offsets the ground from a preset height.

If two contiguous line segments form an acute angle, collision response causes balls to fall through the ground. Balls automatically move a small distance away from the surfaces they collide with to mitigate floating-point errors; in some cases, this causes the ball's edge to pass through the other line segment.

In addition, collision handling only occurs between whole timesteps instead of partial ones, which lowers the precision of the calculated motion and exacerbates the previous problem. Moreover, the ball can still phase through the ground where two line segments connect. Finding the closest distance between any point on the ball and the endpoint of a line segment will require more iteration to be accurate.

02/09/2022

This is my final video for project 1. I've composited the paths of 48 bouncing balls and added some sound as well. I decided to work around the collision issues by eliminating two buggy bounce paths from the final render.

A generative art piece that makes use of random numbers, bouncing balls, and collision detection. Created using Python and turtle graphics.

“ClockTicksOneChime” by daveincamas is licensed under CC BY 3.0.

next post