We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I've been programming on processing for some time, and I've noticed that whenever I watch tutorials online, the smooth() function does make an actual difference, whereas on mine my (mid-2014) MBP Retina (Nvidia GT 750M, 16GB) just doesn't.
Could anyone please help? Here's a couple of screenshots of an ellipse:
without smooth()
with smooth()
Any reason why this could be happening?
Thank you so much!
Regards!
Answers
smooth is on by default
you'll notice a different with noSmooth()
Oh, really? Thank you! And what should I do if I wanna smooth the stroke of that ellipse? It's very rough and not so nice to the eye
try a higher grade of smooth
see reference
Yes, I've done that too. If you draw an ellipse you get that same result as me?
For the default renderer, and I believe for the FX2D too, max quality is 3 or 4:
smooth(4);
https://Processing.org/reference/smooth_.html
is this the old 'alpha-buildup' problem?
https://forum.processing.org/two/discussion/8075/why-are-text-and-graphics-so-ugly-and-blocky
seems like the anti-alias problem of drawing alpha upon alpha. try noLoop() at the end of your draw() function or a background() at the beginning
i just researched this the other day and found that on a retina you want to use a new pixelDensity() function:
i think i love you, FFD8
haha glad i could help! +the reference page for smooth should be updated to suggest pixelDensity() as a related function...