Toggle navigation
Explora
(current)
Aprende
Crea
Retos
×
Aspectos básicos
void main() {...}
for ( int i = 0 ; i < N ; i++ ) {...}
while (condición) {...}
do {...} while (condición);
if (condición) {...}
if (condición) {...} else {...}
switch (valor) {...}
Mostrar y pedir datos
print()
println()
readInteger()
readDouble()
readChar()
readString()
Funciones matemáticas
abs(n)
log(n)
sqrt(n)
pow(b,e)
floor(n)
ceil(n)
round(n)
sin(n)
cos(n)
tan(n)
asin(n)
acos(n)
atan(n)
random(n)
Funciones gráficas
point(x,y)
line(x1,y1,x2,y2)
ellipse(x,y,w,h)
rect(x,y,w,h)
triangle(x1,y1,x2,y2,x3,y3)
text(msg,x,y)
textWidth(msg)
textSize(n)
background(r,g,b,a)
strokeWeight(n)
stroke(r,g,b,a)
noStroke()
fill(r,g,b,a)
noFill()
image(url, x,y,w,h)
Nuevo
Ayuda
Probar
...
void main (){ //para colorear el fondo background(205,203,21); //dibuja rectangulo rect(40, 40, 80, 40); //dibuja recta line(50, 90, 150, 90); //dibuja elipse ellipse (180, 60, 80, 40); //dibuja elipse verde fill(58,131,49); ellipse (270, 60, 80, 40); //para dibujar sin borde el comando noStroke noStroke(); ellipse (50, 120, 80, 40); //para variar el color del borde comando stroke stroke(227,49,48); ellipse (150, 120, 80, 40); //para dibujar linea de color azul stroke(48,71,227); line(50, 160, 200, 160); //para dibujar circulo azul fill(40,38,163); ellipse (250, 160, 40, 40);}
Canvas not supported.
Programado por
CT1
0 votos
491 descargas
24 usos