# Procedural mesh

**URL:** <https://discourse.threejs.org/t/procedural-mesh/22327>\
**Category:** Questions\
**Tags:** geometry, procedural\
**Created:** [January 11, 2021, 10:28pm UTC](https://discourse.threejs.org/t/procedural-mesh/22327 "2021-01-11T22:28:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)\
**Post date:** [January 12, 2021, 8:12am UTC](https://discourse.threejs.org/t/procedural-mesh/22327/3 "2021-01-12T08:12:44Z")

</div>

> [@jniac](#):
>
> I think i can achieve this from an Icosahedron, by taking some group of 6 faces (w Poisson Disc for regularity), extrude/scale them along the normal, …

For a constructive solution, in which different parameters can be set, a self-defined geometry is useful. I myself would take a sphere with holes as a base. (triangulation according to an algorithm by E. Hartmann)  
[Triangulation sphere with holes](https://discourse.threejs.org/t/triangulation-sphere-with-holes/8213)

The positions of the holes can be defined e.g. via quaternions. [Quaternion - Axis, Angle Visualization](https://discourse.threejs.org/t/quaternion-axis-angle-visualization/1358)

Then you can attach the tentacles. [Inner Geometry (Triangulation)](https://discourse.threejs.org/t/inner-geometry-triangulation/12565)

Example  
[https://hofk.de/main/threejs/Triangulation/InnerGeometrySphereCylinder.html](https://hofk.de/main/threejs/Triangulation/InnerGeometrySphereCylinder.html)

I did it for cylinders. You can use a function of the outside line instead of the cylinder with the linear outside line. Then you have to calculate the normals a little more complicated. But it’s certainly not that hard.

However, you may be able to take a CylinderBufferGeometry and change the distance of the vertices to the centerline (radius) according to a function.

_There are many variants._ 🙂

Inspirations:

[sandbox](https://hofk.de/main/threejs/sandbox/)

[Addon to create special / extended geometries](https://discourse.threejs.org/t/addon-to-create-special-extended-geometries/1855)  
[Addon. Produces almost infinite many time-varying geometries with functions](https://discourse.threejs.org/t/addon-produces-almost-infinite-many-time-varying-geometries-with-functions/262)

[hofk (Klaus Hoffmeister) · GitHub](https://github.com/hofk)

---

_[View the full topic](https://discourse.threejs.org/t/procedural-mesh/22327)._
