Closed martin-henz closed 7 months ago
While breaking down the program to see how the shapes change with each operation, I changed the unit cube to better visualise what the first iteration of the fractal looks like:
const c = translate(scale(cube('#88ccff'), 0.5, 0.5, 0.5), 0.25, 0.25, 0.25);
This is what I saw:
It would appear that the 2 circled portions of the fractal are actually 3 cubes stacked next to each other, and not a single cube. Perhaps that is causing the strangeness seen in the second iteration of the fractal.
Changing center_row
to the following appears to fix the fractal (s
instead of inner_row
):
const center_row = before_frac(f,
s,
before(empty,
s));
Yes, correct. I found the bug too. Here is the correct program:
https://share.sourceacademy.org/lww29
So sorry for the confusion!
Here is a program that should result in a Mosely snowflake:
https://share.sourceacademy.org/lab29
Here is the output.
The red circle indicates a possible bug: a wrongly displaced component.