C# create triangle pyramid surface

Hi! I am looking for a logic to create a triangle surface from pyramid points.

I guess I can use NurbsSurface.CreateFromCorners(3 points) to create surface
but I cannot figure out the relationship/logic between 3 points :sweat_smile:
Is there someone who loves to slove sequence problem? haha!

PyramidSrf.gh (10.5 KB)


triangle_pyramid_2021Jan8a.gh (8.0 KB)

1 Like

You could do with conditions, since the points are ordered(brain is too lazy to think about the rules), but also you could archieve this by implementing a delaunay algorithm. It’s not that difficult, the internet is full of examples.
Something like this logic(this will be slower than the first option, but a more global solution) :

1 Like

I recently had to solve the same problem and solved the sequencing using triangular numbers. This is in Python, but might inspire an implementation:


201208_TriangleSubdivision_01.gh (5.5 KB)

2 Likes

Great! didn’t think about delaunay algorithm. I will look for the examples :smiley:

awesome! Thanks for the script!! it is a great help!

1 Like


triangle_pyramid_2021Jan11a.gh (10.0 KB)