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

What is circle_event.lower_x? #53

Open
lycantropos opened this issue Nov 30, 2020 · 1 comment
Open

What is circle_event.lower_x? #53

lycantropos opened this issue Nov 30, 2020 · 1 comment

Comments

@lycantropos
Copy link

I'm trying to understand the algorithm (btw if there is a formal description -- will be glad to read it) and want to understand what is circle_event.lower_x field, I understand that circle_event class represents circle built during sweeping the plane and from docstring I can see that

lower_x_ - leftmost x-coordinate;

For example, if we have a circle
image
does this point has coordinates (lower_x, center_y) or am I missing something?

If lower_x is the lefmost should it be always to the left of the center_x?

@eadf
Copy link

eadf commented Jul 10, 2021

lower_x is the x coordinate of the circle event plus the radius. It is used for sorting events in the correct order.
Events are processed left to right, i.e low x value first -> higher x value has lower priority.
So I guess the 'lower' part of the name refer to the priority, not the value.

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

No branches or pull requests

2 participants