pipeline td visual fx
generating a menger fractal with python for maya click for 2D version
To generate this fractal, python classes were written to subdivide pairs of points into an arbitrary recursive depth based on arbitrary dimensions for the "menger sponge." Going further I rewrote the base class (credit to Sasha Ouellet for most of that) for greater flexibility in altering the shape and methods of division. In generating the ASS file for Arnold 5 for Maya, I exported an example "StandIn" of just a single cube and used that information to write out a whole bunch of cubes for the Menger Sponge.
challenges classes
This "cube" class takes a given center and sidelength, and then subdivides based on certain parameters in each direction.
Here is the main recursive dividing class of the menger fractal. It constructs the menger by calling the Cube class recursively. There are extra functions for sorting the points by position, distorting them with a sine curve, and getting the bounding box.
This is the ASS file generator implementing the above classes.
It took me a long time to rewrite the base class since I kept getting confused with the class oriented system (even though I had the basics straight from Sasha), so I need a better understanding of that whole process. I had fun bumping up the divisions of the menger from 3 to 5.
© 2022
pipeline td visual fx
generating a menger fractal with python for maya To generate this fractal, python classes were written to subdivide pairs of points into an arbitrary recursive depth based on arbitrary dimensions for the "menger sponge." Going further I rewrote the base class (credit to Sasha Ouellet for most of that) for greater flexibility in altering the shape and methods of division. In generating the ASS file for Arnold 5 for Maya, I exported an example "StandIn" of just a single cube and used that information to write out a whole bunch of cubes for the Menger Sponge.
challenges classes
This "cube" class takes a given center and sidelength, and then subdivides based on certain parameters in each direction.
Here is the main recursive dividing class of the menger fractal. It constructs the menger by calling the Cube class recursively. There are extra functions for sorting the points by position, distorting them with a sine curve, and getting the bounding box.
This is the ASS file generator implementing the above classes.
It took me a long time to rewrite the base class since I kept getting confused with the class oriented system (even though I had the basics straight from Sasha), so I need a better understanding of that whole process. I had fun bumping up the divisions of the menger from 3 to 5.
© 2022
pipeline td visual fx
generating a menger fractal with python for maya To generate this fractal, python classes were written to subdivide pairs of points into an arbitrary recursive depth based on arbitrary dimensions for the "menger sponge." Going further I rewrote the base class (credit to Sasha Ouellet for most of that) for greater flexibility in altering the shape and methods of division. In generating the ASS file for Arnold 5 for Maya, I exported an example "StandIn" of just a single cube and used that information to write out a whole bunch of cubes for the Menger Sponge.
challenges classes
This "cube" class takes a given center and sidelength, and then subdivides based on certain parameters in each direction.
Here is the main recursive dividing class of the menger fractal. It constructs the menger by calling the Cube class recursively. There are extra functions for sorting the points by position, distorting them with a sine curve, and getting the bounding box.
This is the ASS file generator implementing the above classes.
It took me a long time to rewrite the base class since I kept getting confused with the class oriented system (even though I had the basics straight from Sasha), so I need a better understanding of that whole process. I had fun bumping up the divisions of the menger from 3 to 5.