Closed tamirlav closed 5 years ago
works fine in java
`def setup(): size(550,550)
def draw(): strokeCap(SQUARE) smooth() background(255) translate(width/2,height/2)
circleResolution = int(map(mouseY,0,height,2,80)) radius = mouseX-width/2 + 0.5 angle = TWO_PI/circleResolution beginShape() for i in range(circleResolution): x = cos(angle*i) * radius y = sin(angle*i) * radius line(0,0,x,y) vertex(x,y) endShape(CLOSE)`
works fine in java
`def setup(): size(550,550)
def draw(): strokeCap(SQUARE) smooth() background(255) translate(width/2,height/2)