![]() ![]() # The points define the tetrahedron that will bound Numpnts = int(arg) # number of points to generateĭia = float(arg) # the "width" of each point Index = math.floor( random.random() * numPnts) ![]() # Randomly chooses a point from a list of points def pickVert(listOfPnts): import math, random, sys # Returns a point midway between point "p1" and point "p2" def halfStep(p1, p2): # gasket as a RenderMan Points (RiPoints) primitive. # A RenderMan procedural primitive that outputs a Sierpinski Was used to generate the 2D cloud of points. A slightly modified version of the python script "sierpinski.py" (listing 1) The technique usedĪs shown below, the progressive build up of points in a Sierpinski gasket occurs The python code was a direct port from the The python scripts presented in this tutorial generate Sierpinski gaskets renderedĪs RenderMan "Points" and "Blobby's". Algorithmic - Sierpinski Gasket: Python & RenderMan ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |