robotics project 1
Your task is to create a moving image of a human or animal using the https://p5js.org/ system. Here is a link to the processing reference https://p5js.org/reference/ if you need it.
Running your code is done just by hitting the play arrow at the top of the screen.
Create a human or animal figure that moves with the mouse. Here is an example:
function setup() {
createCanvas(500,500);
background(100,100,65);
}
function draw() {
background(100,100,100);
var x = mouseX;
var y = mouseY;
fill(255,0,0);
ellipse(x, y, 20, 20);
rect(x-10,y+10,20,50);
line(x-10,y+10,x-20,y-10);
line(x+10,y+10,x+20,y-10);
fill(0,0,255);
quad(x-10,y+50,x-20,y+80,x-20,y+80,x-30,y+90);
quad(x+10,y+50,x+20,y+70,x+30,y+90,x+20,y+80);
}