Hi, so for my code, I want the heart shape to continuously rotate 360 degrees while keeping its position in the center of the screen. Currently, however, it rotates around the screen for some reason. How can I make it stick to the center?
def setup():
size(800, 600)
frameRate(50)
x = 0
def draw():
global x
background(255)
translate(400, 300)
rotate(radians(x))
createShape()
smooth()
noStroke()
beginShape()
vertex(width/2, height/7*3.2)
bezierVertex(width/2, height/5*1.4, width/10*8, height/7*3, width/2, height/7*5)
vertex(width/2, height/7*3.2)
bezierVertex(width/2, height/5*1.4, width/10*2, height/7*3, width/2, height/7*5)
endShape()
fill(random(255), random(255), random(255))
x = x+1