xxxxxxxxxx
25
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
rotate(0.1);
rect(50,50,100,20);
}
//COMPLETE THE FOLLOWING AND LEAVE YOUR ANSWERS AS COMMENTS:
//1. Play with the values for rotation (Keep them below 6.28 for now!)
//2. What happens if you move the rectangle to (0,0)?
//3. What happens if you add a translation before the rotation?
//4. What if you make the rotation the center of the page?
//5. What if the rotation is controlled by mouseX or mouseY?
//6. What if you change the mode to degrees?
//7. How could the map function help us in this situation? (You might need to make a variable for angle with this one)