I have a set of points (i think i won't have more than 10 each iteration)
now i must somehow connect them together so they will form some shape, triangles can't overlap. :/
reason i need this is: look at the picture:
theres a ships hull where that yellow thing in center shows the center of gravity, now theres a full blue background and light blue water, we are viewing that hull from underwater. now whenever water plane slices some set of triangles that make hull, and water plane is above center of mass of the ship i need to create additional set of triangles that close, the shape that is below water (i mean i need to produce set of points that lie on waterplane, so when connected to center of mass will produce additional tetrahedrons) - this is needed to properly calculate submerged volume of an object.
so i could be left with that:
i need somehow to grou that to get
or maybe theres a better solution for this?
for now im cutting set of points of a convex solid by set of waterplanes, and store only triangles that are below these waterplanes, then produce tetrahedrons where apex of all is at center of mass point, then i additionally cut each tetrahedron by corresponding waterplane to get actual submerged volume and here comes my acutal problem i need additional set of triangles that close the shape whenever waterplane is above center of mass i need to use these points that are a result of cut to calculate remaining submerged volume.
i rather expect something that is quite fast, coz i am planning to do this more than 50 times per frame.