Array of extruded shapes is too slow

add_library('extruder')
add_library('peasycam')

def setup():
    size(800, 800, P3D)
    background(255)    
    cam = PeasyCam(this, 2000)
    cam.setMinimumDistance(100)
    cam.setMaximumDistance(1000)
    cam.lookAt(0,0,0,500)



def draw():
    circleList = []
    e = extruder(this)
    background(255)    
    circle = createShape(ELLIPSE, 10,10,20,20) 
    circleList.append(circle)
     
    cylinder = e.extrude(circle,100, "box")
    for i in range(20):
        for j in range(20):
            pushMatrix()
            translate(i*10,j*20,0)
            shape(cylinder[0])
            popMatrix()

This seems to work properly, translate is key. If there is a more efficient way please let me know

1 Like