Polygon Distance Field #67
micycle1
started this conversation in
Show and tell
Replies: 1 comment
-
That is just so cool! Thanks for posting it. Excellent work!
…On Sun, Mar 21, 2021, 12:49 PM Michael Carleton ***@***.***> wrote:
Start with a polygon.
[image: image]
<https://user-images.githubusercontent.com/9304234/111912229-a71b2680-8a60-11eb-866a-c74051965c16.png>
Triangulate!
[image: image]
<https://user-images.githubusercontent.com/9304234/111912241-b306e880-8a60-11eb-9f6d-4e0fe66ba255.png>
Build a directed graph of adjacent triangles starting with some triangle
as the root. Use the building process to insert copies of the triangle
vertices into another tin with certain Z values.
For a given vertex and given triangle, the Z value is computed from the
sum of inter-circumcircle distances from the triangle's parent to the root
triangle + the euclidean distance from the parent's circumcircle to the
vertex.
(Here each triangle is coloured individually based on sum of triangle
inter-circumcircle distances from its circumcircle to the root, which
already looks convincing for such a shape because it is fairly thin
throughout).
[image: image]
<https://user-images.githubusercontent.com/9304234/111912094-088ec580-8a60-11eb-9414-d23750279a15.png>
Interpolate. Apply NaturalNeighborInterpolator to the new Tin, iterating
pixel by pixel to produce a Z value for each pixel.
[image: image]
<https://user-images.githubusercontent.com/9304234/111912126-2bb97500-8a60-11eb-8ca4-e2933960a392.png>
Mask the interpolated distance field with the original polygon.
[image: image]
<https://user-images.githubusercontent.com/9304234/111911599-2d823900-8a5e-11eb-93b0-5d569e3b2daa.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#67>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEWJDYMF2GAG2BA33JKIMJLTEYPTBANCNFSM4ZRXL5WA>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Start with a polygon.
Triangulate!
Build a directed graph of adjacent triangles starting with some triangle as the root. Use the building process to insert copies of the triangle vertices into another tin with certain Z values.
For a given vertex and given triangle, the Z value is computed from the sum of inter-circumcircle distances from the triangle's parent to the root triangle + the euclidean distance from the parent's circumcircle to the vertex.
(Here each triangle is coloured individually based on sum of triangle inter-circumcircle distances from its circumcircle to the root, which already looks convincing for such a shape because it is fairly thin throughout).
Interpolate. Apply
NaturalNeighborInterpolator
to the new Tin, iterating pixel by pixel to produce a Z value for each pixel.Mask the interpolated distance field with the original polygon.
Beta Was this translation helpful? Give feedback.
All reactions