Skip to content
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

Improved Circle Drawing Algorithm. #13

Merged
merged 2 commits into from
Oct 14, 2020
Merged

Conversation

scottbigbrain
Copy link
Contributor

This new circle drawing algorithm completely fills in the circle, and as far as I know it works for all sizes of circles. It tends to be only about 2x - 3x slower than the previous algorithm. There has been an anomaly with it where there is a small bump on the top of the circle that looks about a pixel high, but other than that there appears to be no problems. The strange bump only occurs when fill=true though. Here are some pictures of the results.
circle_bump_prob2
circle_bump_prob
circle_nofill

@aviks
Copy link
Owner

aviks commented Oct 11, 2020

Thanks. Is this ready to merge now?

@scottbigbrain
Copy link
Contributor Author

It should be good to go, though some improvements could be made.

@aviks aviks merged commit 0bff6c2 into aviks:master Oct 14, 2020
@aviks
Copy link
Owner

aviks commented Oct 14, 2020

Thank you for working on this!

@albinahlback
Copy link
Contributor

This new circle drawing algorithm completely fills in the circle, and as far as I know it works for all sizes of circles. It tends to be only about 2x - 3x slower than the previous algorithm. There has been an anomaly with it where there is a small bump on the top of the circle that looks about a pixel high, but other than that there appears to be no problems. The strange bump only occurs when fill=true though. Here are some pictures of the results.
circle_bump_prob2
circle_bump_prob
circle_nofill

The small bump is not because of your algorithm, but rather how SDL draw lines. See JuliaMultimedia/SimpleDirectMediaLayer.jl#53.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants