miércoles, noviembre 16



import processing.opengl.*;

void setup() {
  size(400,400,OPENGL);
}

void draw() {
  
  lights();
  noStroke();
  fill(255,0,0);
  background(0);
  translate(width/2,height/2);
  float r = map(mouseX,10,width,0,TWO_PI);
  rotateX(r);
  rotateY(r);
  translate(-50,50,-50);
  sphere(30);
  fill(0,40,255);
  translate(width/2,height/2);
  rotateX(r);
  rotateY(r);
  translate(-10,-10,-10);
  sphere(20);
   
}

No hay comentarios:

Publicar un comentario