# How can I implement a Half Edge structure?

**URL:** <https://forum.babylonjs.com/t/how-can-i-implement-a-half-edge-structure/25852>\
**Category:** Questions\
**Created:** [December 7, 2021, 9:48am UTC](https://forum.babylonjs.com/t/how-can-i-implement-a-half-edge-structure/25852 "2021-12-07T09:48:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kidsarow](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kidsarow/32/20373_2.png) [@Kidsarow](https://forum.babylonjs.com/u/Kidsarow)\
**Post date:** [December 7, 2021, 9:48am UTC](https://forum.babylonjs.com/t/how-can-i-implement-a-half-edge-structure/25852/1 "2021-12-07T09:48:39Z")

</div>

Hello!

I need to implement a Half Edge structure in my project but I really don’t understand how can I do it. Do I need to restructure all the component like Facet, Vertices and add Edge, Half Edge ?

I’m currently following this tutorial : `https://www.flipcode.com/archives/The_Half-Edge_Data_Structure.shtml`

I’ve looked how Three JS does it with `https://threejs.org/docs/#examples/en/math/convexhull/HalfEdge`  
But does it mean I need to create a function (for sure) but with arguments Facet and her Vertices ?

Thankfully.

---

<div class="post-metadata">

**Author:** ![Raggar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raggar/32/20672_2.png) [@Raggar](https://forum.babylonjs.com/u/Raggar)\
**Post date:** [December 7, 2021, 10:19am UTC](https://forum.babylonjs.com/t/how-can-i-implement-a-half-edge-structure/25852/2 "2021-12-07T10:19:48Z")

</div>

Have a look at the implementation by @carolhmj

> [@3D Quickhull with Babylon](https://forum.babylonjs.com/t/3d-quickhull-with-babylon/22635):
>
> Hello there! I’ve been building this as one of my assignments for my Computational Geometry class, and I figured it wouldn’t hurt sharing it here! [https://carolhmj.github.io/quickhull-3d/](https://carolhmj.github.io/quickhull-3d/) As the title states, it’s an implementation of the 3D Quickhull algorithm, both on some random point clouds constructed with the PointsCloudSystem, and with a predetermined “model” made out of convex shapes (which was a requirement from the class). In both cases, you just need to press the “Run Quickhull alg…

> <https://github.com/carolhmj/quickhull-3d/blob/main/HalfEdge.js>
