We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Shapes not looking smooth .
Page Index Toggle Pages: 1
Shapes not looking smooth . (Read 326 times)
Shapes not looking smooth .
May 25th, 2008, 8:22pm
 
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);

}

Re: Shapes not looking smooth .
Reply #1 - May 25th, 2008, 10:25pm
 
Well, anti-aliasing is turned on and your shapes look smooth. Try removing the smooth() line and you'll see the difference.

So, sorry, I don't see any problem! :-p
Page Index Toggle Pages: 1