How to do different movements
in
Programming Questions
•
4 months ago
Hi I'm new with processing and quite new with programming, This may seem stupid but I can't figure out how to do it. I want the human figure to dissapear in the mouth of the monster(make the monster bigger and the human figure smaller) here is the code, hope you can help me out (;
- color c = color(255);
- PImage img;
- PShape bot;
- void setup() {
- size(680,510);
- img = loadImage("Carretera.jpg");
- bot = loadShape("bot1.svg");
- }
- void draw() {
- background(img);
- translate(width/2, height/2);
- float zoom1 = map(mouseX, 0, width, 0.1, 4.5);
- scale(zoom1);
- shape(bot, -140,-140);
- float zoom = map(mouseX, width, 0, 0.1, 4.5);
- scale(zoom);
- display();
- }
- //Figure
- void display() {
- fill(c);
- //Body
- rect(0,0,20,100);
- rectMode(CENTER);
- //Face
- ellipse(0,-70,60,60);
- ellipse(-18,-75,16,-10);
- ellipse(+18,-75,16,-10);
- ellipse(-0,-65,+5,-15);
- //Arms
- line(-10,-10,-50,-40);
- line(+10,-10,+50,-40);
- //Legs
- line(-10,+50,-20,+80);
- line(+10,+50,+20,+80);
- }
1