-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circle edges are looking 'chunky' #19
Comments
We manually tessellate a shape before drawing it, this could be causing the issue. Ideally this should be done in OpenGL, but we were already facing many issues with OpenGL so just decided to do it manually. Two more things:
|
I don't know opengl either... This is the best I got :-) |
I'm wondering if you couldn't drill into the pygame code to get the opengl pieces for arc/circle/ellipse etc... |
I am also getting the same error. I am using MacBook Pro (without retina display - 1920x1080). But, I think this behaviour is occurring because the background is not cleared at every frame. This is discussed in Processing forum too:
When the background is cleared at every frame, the circles appear smoother. I have observed this behaviour while rendering SVGs in browser too. Redrawing the same SVG multiple times makes the edges of SVG look chunky in browser. @illus0r could you try the following code and check if the edges are still chunky?: from p5 import *
def setup():
size(500, 500)
no_stroke()
background(204)
def draw():
background(204)
fill(random_uniform(255), random_uniform(127), random_uniform(51), 127)
circle((mouse_x, mouse_y), 40)
run() |
I'm getting the same chunky (aliased) result in Ubuntu. Clearing the background doesn't help. |
Ditto. Pixelated circles on a Retina display with p5 0.6.0, with both @marcrleonard's and @parsoyaarihant's snippets. |
Hi, is there any follow up to this? |
Several of these examples actually call mouse_is_pressed multiple times on a single click at 60fps, so they aren't so great for testing because they can write stacked circles (although the randomized width helps. Here is a simpler test:
I can confirm on a retina display with p5 0.6.0 that the resulting circle has the correct size -- it is "32x32", and if you drag a desktop screenshot you get a 74x74 png (because retina), in which the circle is made of 2x2 pixels (because that's the size of the underlying pixel buffer in p5). This is all expected -- the "chunky" part that might be unexpected is the no anti-aliasing / smooth. |
So are there any update for this? |
Test script:
Expected behavior:
The edges of the circle to be smooth. I referenced the GIF in the readme
Actual behavior
When I use the example script, I am seeing very chunky edges. I am on a UHD monitor, and I tried running the script with the pixels 1:1 as well as my normal scaled 150%. I suspect this is some sort of OpenGL thing. Either a scaling issue or a dpi issue.
Please let me know what other information I can provide!
Errors produced (if any):
p5 version:
p5==0.3.0a2
Python version:
Python 3.5
Operating System:
Windows10
The text was updated successfully, but these errors were encountered: