algorithmic modeling for Rhino
Tags:
@WT4, wow this kept me trying for a while and failing.
Doing it with 2 points is quite easy, but 3 is really hard. Now I have found a solution that at least works INSIDE the triangle, which I have found here:
http://answers.unity3d.com/questions/383804/calculate-uv-coordinate...
I have attached a recreation of that in GH. I am sure there are some math pros out there that can solve this.
Good luck!
Sounds like you need some barycentric coordinates...
Wow, ok that is much simpler in a way, except converting from barycentric to cartesian seems somewhat tricky looking at wikipedia.
What would be nice to have would be a "project point on brep" component. Then you could simply use the 3 reference points to create a surface and give them the greyscale value as a Z value. Then project the point to evaluate onto the resulting triangle. That points Z value will then be the value we need. Its kind of the same as the way you suggest, but without introducing a rather unusual (to me at least) coordinate system. It would also allow the point to evaluate to be moved around more easily or to be coming from something else in GH.
I have attached an approximation using a curve projected on a surface:
Thank you your help.
However the point for which the grey value is required is not necessarily in the plane of the other 3 points.
So you mean it has to work completely 3-dimensionally? I got pretty close a few times, but in the end it never worked out. this has to be possible! I will give it another try later.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by