[All work](/work?type=work)

# 3D Spanning Trees

This takes the vertices and edges of an OBJ file and finds their minimum spanning tree, turning a connected mesh graph into a much sparser structure.

[Source code](https://github.com/Slaymish/3dSpanningTrees)

Independent development. Java graph algorithms and a Blender add-on.

![Original project render showing a regular mesh edge grid beside two minimum spanning tree structures.](https://cdn.sanity.io/images/qnuj1c4o/production/01220c02f9a0294cbeacd2fcde699a4be0b95637-2690x1080.png?w=1920\&q=80\&auto=format)

I was looking at meshes as graphs, and removing the faces left a useful starting point for finding the smallest collection of edges that still connected all the vertices, with the edge weights determining which connections were kept as the graph became a tree.

The Java implementation used Kruskal's algorithm and a union-find structure to select those edges, then wrote the result back to OBJ so it could be opened in Blender.

I also made a Blender add-on and packaged the Java tool with launch scripts, which gave the same transformation a place inside a modelling workflow as well as a standalone application.

The catalogue date follows the first preserved release on 10 June 2023.

## Outcome

A released geometry utility with OBJ input and output. The example shows the original edge grid alongside two sparse structures produced from it.

[All work](/work?type=work)
