Jump to content

Distance on Mesh


Igor

Recommended Posts

if your mesh doesn´t have holes in it and you need just the distance betwen two points, it´s fairly easy to calculate. take a look at the attached file. it basically uses the fact that a real geodesic path unfolds into a straight line in the plane. so, all you have to do is to unfold the curve comming from the shortestPathSop and measure the euclidian distance between both endpoints...

hth.

petz

geodesic_distance.hipnc

  • Like 5
Link to comment
Share on other sites

18 minutes ago, Zybrand said:

Great example Petz thanks. What is the outerproduct function and matrix multiplication for it the first wrangle node? It does not seem to change any of the attributes when I remove it.

it doe´s project the vector onto the plane defined by the point normal. it´s there to make sure that the points of the 1-ring are correctly sorted even on distorted meshes. to see the difference, visualize the local frame (vec_u and vec_v) as attributes.

hth.

petz

Link to comment
Share on other sites

I still don't see a difference in vec_v with or without the * mat so does that mean vec_v is already on the plane defined by the normal? But I can see the difference it makes further down where you are calculating sort_val so I can see the results but I don't fully understand it :). What is the matrix you get from outerpoduct of a vector and itself? Is it the normal direction in matrix form and subtracting that from the ident() gives you the plane you want to project the vector too?

 

thanks,

Zybrand

Link to comment
Share on other sites

51 minutes ago, Zybrand said:

I still don't see a difference in vec_v with or without the * mat so does that mean vec_v is already on the plane defined by the normal? But I can see the difference it makes further down where you are calculating sort_val so I can see the results but I don't fully understand it :). What is the matrix you get from outerpoduct of a vector and itself? Is it the normal direction in matrix form and subtracting that from the ident() gives you the plane you want to project the vector too?

 

thanks,

Zybrand

take a look at the file

project_vec.hipnc

 

  • Like 2
Link to comment
Share on other sites

  • 1 year later...
  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...