How's the pyramid going? Mandelbox! This was a long time coming It was *really* slow using primitive_cube_add The mesh version is...ok It's not high-res I'll try to pre-generate a decently high res example and bring it Did I remember? The class of fractals where points are either "in" or "out": Basic idea: For all the points in the space where we want to draw the fractal: If the point is in: Draw it else: Ignore it An obvious issue here: How many points are in a space? There IS an answer out there somewhere How many points are on your screen? How do these translate into 3D? Ray marching: The more efficient way to handle these Each pixel is a ray Move the rays forward until they hit a point that's "in" How often should we check? Still have to decide how high-res we want it Could do some kind of search to find the exact edge Either way, we can't do ray marching here Not in a Blender script Maybe we could write a custom fragment shader or something Parameters: grid_size, height, extent, step: These define where we'll draw the fractal Escape to infinity: Or some small number of points Points that escape are NOT in Space folding animation Some points escape with repeated folding, others don't Who thought of this? Mandelbox history and website A decision point for class: Do we try to really understand the space folding, or just run with it? Let's at least correlate the video with the code Also: Why radius squared? It's faster to avoid square root I ended up using square root anyway for the colors Otherwise they follow a non-linear pattern They'll change faster in the center Could be ok, but not what I wanted Parameters: Scale: High scale leads to a sparser fractal Negative scale works, but looks different min_radius and fixed_radius: Parameters for the sphere fold Changing them will change the distance the fold occurs at max_iter: Repeat folding longer to see if the point escapes bailout: How far away a point has to be to escape Back to ray marching: Our technique doesn't seem to allow high enough resolution For me at least, Blender crashes with a grid bigger than 500 by 500 Looks like somebody made a fractal in minecraft Ray marching with a fast enough video card would Maybe a good GPU programming project Explanation: https://www.randomoracle.net/webgl/Explorer.html We'll mostly stick to fractals that are a better match for Blender from here out Parameters: 2.0 scale, radius 0.5 1.0, max 40, bailout 16, sphere trim on -1.5 scale, radius 0.5 1.0, max 40, bailout 8 -3 scale, radius 0.2 0.5, max 5, bailout 32