-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add comments explaining compute_bowyer_envelope!
#38
Conversation
for i in 2:num_triangles(all_triangles) | ||
v = get_adjacent(temp_adjacent, I(n + 1), v) | ||
#= | ||
Get the vertex associated with the edge `(point, points[v])` such that the | ||
returned point (the new `v`) forms a positively oriented triangle | ||
with that edge. Then, add the newly found `v` to the envelope. | ||
To be clear, `n+1` is the index of the newly inserted vertex in the triangulation. | ||
=# | ||
v = get_adjacent(temp_adjacent, I(n + 1), v) | ||
push!(envelope, v) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure what this loop is doing - is there some guarantee that all triangles added have n+1
as a vertex, and we're just getting each individual natural neighbour from this loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That loop is building up the "envelope". All triangles will have n+1
as a vertex. I'll draw a picture
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha - that's what I thought was happening but just wanted to confirm. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also have some notes on this here https://juliageometry.github.io/DelaunayTriangulation.jl/dev/applications/interpolation/ and https://danielvandh.github.io/NaturalNeighbours.jl/dev/interpolation_math/. I don't know how much I talk about the internals in either of those links though. The documentation here isn't my best unfortunately |
Thanks! |
I was reading the code here and struggled a bit when interpreting it, so added some comments. Feel free to accept/reject/edit as necessary - some of these may be unnecessary.