Thursday, January 14, 2021

Genuary 2021 Day 14: "Subdivision"

 Not to be confused with Day 6, "Triangle Subdivision"





I wanted to do something like a Sierpinski triangle for this, maybe on the surface of a sphere. I ended up doing a recursively-defined (i.e. self-similar, i.e. "fractal") object, which in my code I call a "sphereflake". This isn't super deeply recursive, but it's still kind of pretty.

I used my ray-marching code for this, of course, adding in some logic for figuring out the lower bound distance to child geometry. This took longer to get the math right than it should have. I want to add this notion of each primitive having a bounding volume, which should make scene traversal faster.


Tools Used: my ray marcher

Languages Used: Python3

Development Time: ~2 hours

Drawing Time: ~45 minutes

What's Generative Here: The camera is randomly positioned, and the positions of the spheres are determined by recursively defining the shape in terms of itself.

No comments:

Post a Comment