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 oso(){ double x=random(320); double y=random(320); // Orejas fill(58,25,25); ellipse(x+50,y+50, 60,60); ellipse(x+170,y+50, 60,60); noFill(); fill(60,10,10) ; ellipse(x+50,y+50, 35,35); ellipse(x+170,y+50, 35,35); // Cabeza fill(110,44,44); ellipse(x+110,y+110, 160,160); noFill(); // Boca fill(231,91,124); ellipse(x+110,y+160, 25, 10); noFill(); fill(101,117,227); ellipse(x+100,y+165, 5,15); noFill(); // Nariz fill(141,32,32); ellipse(x+110,y+115, 20,20); noFill(); // Ojos fill(239,173,173); ellipse(x+80,y+75, 30, 50); ellipse(x+140,y+75, 30, 50); noFill(); fill(0,0,0); ellipse(x+70,y+75, 5,5); ellipse(x+150,y+75, 5,5); noFill(); } void main(){ background(30,56,29); animate(oso,100); }
Canvas not supported.
Programado por
Siff
0 votos
206 descargas
12 usos