import processing.core.*;
import processing.xml.*;
import java.applet.*;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.event.MouseEvent;
import java.awt.event.KeyEvent;
import java.awt.event.FocusEvent;
import java.awt.Image;
import java.io.*;
import java.net.*;
import java.text.*;
import java.util.*;
import java.util.zip.*;
import java.util.regex.*;
public class lineas_y_elipses_con_mov extends PApplet {
int x0 = 10;
int x1 = 20;
int x2 = 30;
int x3 = 40;
public void draw( ){
background(190);
size (200, 200);
background (380); // Sirve para dar color a la ventana
fill (145);
line (x0, 100, 10, 10 );
ellipse (x0, 100, 5, 5 );
x0=x0+1;
fill (35);
line (x1, 100, 10, 10 );
ellipse (x1, 100, 7, 7 ); // los numeros 10 es el tama\u00f1o del circulo
// y los numeros 100 es la posici\u00f3n de coordenada x
x1=x1+1;
fill (161);
line (x2, 100, 10, 10 );
ellipse (x2, 100, 8, 8 );
x2=x2+1;
fill (25);
line (x3, 100, 10, 10 );
ellipse (x3, 100, 10, 10 );
x3=x3+1;
}
static public void main(String args[]) {
PApplet.main(new String[] { "--present", "--bgcolor=#666666", "--stop-color=#cccccc", "lineas_y_elipses_con_mov" });
}
}
No hay comentarios:
Publicar un comentario