My sketch has a smoth function , it works , but there is something , i think is related to the draw function , that makes the shapes look not smooth , altough the line look smooth.
Im new here , i guess what i've told you doesnt really helps you to know where is my problem.
But has everything is code , and i dont know where is the problem i dont know where to poiny you the problem.
How do you explain whats the problem when you have a question ?
Here's the code :
Code:// setup , configuracion
void setup (){
background (234,10,98);//fondo rojo
size(300,300);//tamaño ventana
smooth();//suvizado
frameRate (30 );
cursor(CROSS);
}
void draw(){
if (keyPressed == true )background(234,10,98); // borrar todo
fill(234,10,98,20);//fade
noStroke();
rect(0,0,width,height);
if(mouseX > width/2){
strokeWeight(20);
stroke(#27FF00 ,50);//linea verde
}
else
{
strokeWeight(20);
stroke(#E4FF00,50);// linea amarillo
}
if(mouseX !=0 && mouseY != 0){//si mouse x e y no es 0
line ( width/2,height/2,mouseX,mouseY);// dibujalo
}
fill(255);
if(mouseX > width/2){
strokeWeight(20);
stroke(#27FF00 );//borde verde de las formas
}
else
{
strokeWeight(20);
stroke(#E4FF00);// borde amarillo de las formas
}
rect(width/4,height/4,width/2,height/2);
ellipse(width/2,230,100,100);
ellipse(width/2,height/5,50,50);
}