xxxxxxxxxx
29
function setup() {
createCanvas(400, 400)
}
var rectRotate = 0
function draw() {
background('yellow')
angleMode(DEGREES)
push()
translate(200,200)
rotate(45)
ellipse(0,0,80,100)
//rest of picture goes here
pop()
push()
rectMode(CENTER) //setting rectangle's x & y to the center
translate(250,50)
rotate(rectRotate)
rect(0,0,30,30)
pop()
rectRotate = rectRotate + 5
rectMode(CORNER) //resets the rects x & y
}