Willkommen auf unserem Seminar-Blog

Immer auf dem aktuellen Stand bleiben

Dieser Seminar-Blog befindet sich noch im Aufbau und wird in den kommenden Tagen entsprechend verfeinert.

Member Login

Lost your password?

Registration is closed

Sorry, you are not allowed to register by yourself on this site!

You must either be invited by one of our team member or request an invitation by email at viad.info {at} zhdk {dot} ch.

Lesson 6 – Planets

10. November 2010

the planet earth image is attached to the mouse.
PImage[] imageList = null;    // variable sauber initialisieren

void setup()
{
  size(600,600);      // def. fenstergroesse
  
  imageList = new PImage[4];
  imageList[0] = loadImage("./images/1.png");
  imageList[1] = loadImage("./images/2.png");
  imageList[2] = loadImage("./images/3.png");
  imageList[3] = loadImage("./images/4.png");
}

void draw()
{
  background(0);

  pushMatrix();
    translate(90,100);
    for(int i=0;i < imageList.length-1; i++)
    {
       image(imageList[i],0,0,140,140);
       translate(150,0);
    }
    
  popMatrix();
  
  imageMode(CENTER);
  //rotate(PI/0.3);
  image(imageList[3],mouseX,mouseY,140,140);
}

void mousePressed()
{
  
}

void mouseDragged()
{
 
}

void mouseReleased()
{
  println("released");
}