Using 2D point/polygon algorithms on polygons lying on a arbitrary plane

Is there an efficient method to apply 2D point/polygon algorithms on general planar points. For example, I need to triangulate a polygon where the input is a list of ordered points. The algorithm considers that the points are on the XY plane. But to make it more general I would like it to work for polygons in any arbitrary plane. The naïve approach which I could come up with is to represent each and every point in its local polygon plane using a for loop and then triangulate after which I would represent the triangles back in the world coordinate system. To give more background to the question, this is part of a geometry library I am working on which is written in C# and I am looking to solve geometry problems without using any external geometry libraries. The polygon is represented as a degree 1 NURBS curve and hence the control points represent the vertices and the Polygon class is derived from the NURBSCurve class. Considering the following structure, is there any efficient way to implement 2D polygon algorithms for polygons in arbitrary plane.

• A 3D nurbs surface has a underworld that is a 2D function if you map the points in uv space. So delunlay triangulation should work without a problem. Although most apps use some form of marching cubes on edges Feb 10 '21 at 15:36