3D triangulation of the surface by points - search

I have an array of 3D points. And according to them, you need to build a triangulation only on the surface of the body, as shown in the figure. Which method is best to use? It will be great if you explain how your proposed method works.
Delaunay's triangulation didn't help

If c++ is fine, you can find in the CGAL library the advancing front surface reconstruction package.

Related

Silhouette below 3D model

There are some 3D applications which can cast shadow or silhouette below 3D models. They render pretty fast and smooth. I wonder what kind of technology is the standard procedure to get 3D model shadow/silhouette.
For example is there any C++ library like libigl or CGAL to get shadow/silhouette pretty fast? Or maybe GLSL shading is used? Any hint would be appreciated on the standard technology stack.
For rendering, it's trivial. Just project the vertices to the surface (for the case of the XY plane, this just entails setting the Z coordinate to 0) and render the triangles. There'll be a lot of overlap, but since you're just rendering that won't matter.
If you're trying to build a set of polygons representing the silhouette shape, you'll need to instead union the projected triangles using something like the Vatti clipping algorithm.
Computing shadows is a vast and uneasy topic. In the real world, light sources are extended and the shadow edges are not sharp (there is penumbra). Then there are cast shadows, and even self-shadows.
If you limit yourself to punctual light sources (hence sharp shadows), there is a simple principle: if you place an observer at the light source, the faces he will see are illuminated by that light source. Conversely, the hidden surfaces are in the shadow.
For correct rendering, the shadowed areas should be back-projected to the scene and painted black.
By nature, the ray-tracing techniques make this process easy to implement.

Need Help to Visualize Atom contact in Delaunay Triangulation

I am new to CGAL . I am working on a school project to compute the Delaunay Triangulation of Protein structure . How can I visualize the DT structure in Mesh lab . I tried using Poison surface reconstruction, but PSR is using constrained DT and adding new edges which is not I want.
I want to visualize the edge contacts between 3d atom points in Delaunay
Triangulation. Could anyone help me.
Poisson surface reconstruction is not using constrained Delaunay Triangulation, it is defining a function which 0-level is meshed using the CGAL surface mesher.
If you want to compute the Delaunay triangulation of a point set, simply use the class Delaunay_triangulation_3. The best way to visualize the triangulation is to display its edges. I don't think meshlab is able to display polylines but I think it is pretty straight forward to modify one of the example provided by CGAL, extract the edges of the triangulation and generate for example a CGO that you can open in PyMol in addition to your protein structure.

Create a polygon from a texture

Let's say I've got a rgba texture, and a polygon class , which constructor takes vector array of verticies coordinates.
Is there some way to create a polygon of this texture, for example, using alpha channel of the texture ...?
in 2d
Absolutely, yes it can be done. Is it easy? No. I haven't seen any game/geometry engines that would help you out too much either. Doing it yourself, the biggest problem you're going to have is generating a simplified mesh. One quad per pixel is going to generate a lot of geometry very quickly. Holes in the geometry may be an issue if you're tracing the edges and triangulating afterwards. Then there's the issue of determining what's in and what's out. Alpha is the obvious candidate, but unless you're looking at either full-on or full-off, you may be thinking about nice smooth edges. That's going to be hard to get right and would probably involve some kind of marching squares over the interpolated alpha. So while it's not impossible, its a lot of work.
Edit: As pointed out below, Unity does provide a method of generating a polygon from the alpha of a sprite - a PolygonCollider2D. In the script reference for it, it mentions the pathCount variable which describes the number of polygons it contains, which in describes which indexes are valid for the GetPath method. So this method could be used to generate polygons from alpha. It does rely on using Unity however. But with the combination of the sprite alpha for controlling what is drawn, and the collider controlling intersections with other objects, it covers a lot of use cases. This doesn't mean it's appropriate for your application.

Blender to Unity, vertex smoothing

I have an object in blender that has sharp corners, and easily distinguishable faces, exactly what I want. However, when I place it in Unity all of the vertices smooth out, and it is impossible to see what you are looking at. How do I get the same object that I have in Blender to show up in unity?
This is tackled here
blender-normal-smoothing-import-problem
Also you can calculate the normals on import via 'Smoothing angle' which will edge break/phong break based on the angles

The difference between triangulation and mesh

I have done some computer graphical programming recently, and I have no experience before. I used the library call CGAL(computer geometry algorithm library). Also, I noticed that there is class for triangulation and also class for mesh. Is mesh just a kind of triangle net? Do they have any differences?
Thanks!
Triangulation is one way to mesh the geometry. And it is also possible to represent geometry in different shapes.

Resources