# Delaunay triangulation to generate abstract networks and nodes

Is it possible to use Delaunay triangulation to generate an image like the below from a raster or vector of an object (in this case, a human heart)? What software and techniques would be required to make something like this? My intention is to make and use something like this in Inkscape without having to draw all the nodes/lines/effects manually.

• Well, you dont need all that much in software department, a modern web browser is enough. Which you probably have. May 8, 2018 at 6:47
• I'd say one challenge here might be that at least this image looks to be 3D and I don't know how you'd automatically generate those slanted polygons. A simpler version would perhaps be doable if Inkscape supports coding... I have no idea. I mean it could probably be faked in this case by piling on the edges. This is fairly random looking mesh after all. May 8, 2018 at 7:04
• @joojaa: Isn't that called Delaunay, not Delunlay? May 8, 2018 at 8:54
• @RudyVelthuis yeah you can fix the spelling if you wish and youll get a feww points of reputation on that May 8, 2018 at 9:54
• I didn't know one gets reps for editing here. <g> May 8, 2018 at 15:10

Your example is a 3D model. You see that there's no connection node in every crossing. Those surfaces which are not straight ahead your face, have apparently denser triangle network.

There's plenty of 3D software which present surfaces as triangles. Some of them allow 2D wireframe exports which have the projections of the triangles as vectors. Unfortunately I have not such software. In every piece I have, exporting a triangle mesh as 2D vector image is disabled.

Without going to 3D you can triangulate a shape. It can be done manually or by using some triangulation software. Delaunay triangulation is one known method to do it somehow optimally. That method is about 90 years old math rule and it's programmed into many pieces of graphics software.

If you have a raster image which uses shading to present 3D forms, you can vectorize (=trace bitmap) it to limited number of greyshades or colors. Then triangulate different areas to different density of triangles. This way you can simulate the shading with density like in your example.

Let's assume you have finally got some triangles. This is how you can add the nodes and the glow effect in Inkscape:

1. The triangles. If they happen to be separate line segments, there's no need to break them. These triangles are closed shapes (actually Inkscape's 3 sided polygons which must at first be converted to paths)

2. Break the triangles to separate line segments

• select all
• if needed, ungroup
• if needed, goto Path > Object to path
• with the node tool select all nodes by dragging over the triangles and holding the shift at the same time
• in tool options bar click "Break path at selected nodes" . goto Path > Break apart; That breaks all triangles to separate line segments
3. Select all, In the stroke style panel give dot start markers to every line

4. Selet all, duplicate all, set to the duplicates 3...5% blur

ADD: In Illustrator you can also break triangles to lines with "Outline" function in the Pathfinder panel. The result is different, you will need more manual work. Paths are cut in every crossing point. Single corners need the scissors tool. Positive side is that duplicating and blurring isn't needed. You can insert effect Stylize > Outer Glow. Arrowhead alignment needs a setting in the Strokes panel to prevent dot clusters where several lines meet at the same point.

ADD2 A simple example which starts in 3D is readable here What program is used to make a triangular mesh illustration?. The given receipe can produce this in few minutes:

• Thanks for your answer. What 3D software would you recommend for the first part (generating the triangles/polygon map given a model)? May 9, 2018 at 7:19
• @JamesHarrison Good 3D software for this purpose (=meets your modelling requirements, skill level and gives also 2D triangle network in usable format) is beyond my knowledge. I recommend to turn to 3D sites. Stack Exchange also has one. Of course you can insert that part to your question also here. My personal recommendation: Try at first triangulation of a 2D image. 3D is another sea itself . It takes weeks to learn how to swim there and months to develop any productivity
– user82991
May 9, 2018 at 8:07