# Triangulation cylinder with holes

The triangulation of the cylinder with holes is similar to that of the sphere. Triangulation sphere with holes
But with different parameters. For the sphere this variant is also in progress.

(UPDATE February 2020: Combination of shapes, see Inner Geometry (Triangulation) )

One variant is integrated in the addon THREEi.
Addon for triangulation of implicit surfaces/ forms with holes

Cylinder with holes and edge adaptation for other cylinders.

In order to allow the correct adjustment, d (rough side length of the triangles) must be specified. The radius is then `d / Math.sin( Math.PI / (div4 * 4) ) / 2`

``````const g = new THREE.BufferGeometry( );

const parameters =  {

d: 0.052, // rough side length of the triangles
div4: 30, // division of the quarter circle
bottom: -1,
div4Btm: 30, // division bottom adaptation, (to quarter, >= div4)
phiBtm: 1.57, // rotation of adaptive-deformed circle (Bottom)
top: 1,
div4Top: 33, // division top adaptation, (to quarter, >= div4)
phiTop: -0.2, // rotation of adaptive-deformed circle (Top)

holes: [
// circular (deformed) hole, 3 elements: [ y, phi, div4Hole ], div4Hole <= div4
[   0.3,  1.6, 12 ],
[  -0.4,  3.7, 14 ],
[  -0.1, -0.9, 18 ],
//points hole,: array of points y, phi, ...  (last point is connected to first)
[ 0.15,0.45, 0.5,0.9, 0.8,0.6, 0.75,-0.2, 0.1,-0.15  ]
]

}

cylinderWithHoles( g, parameters );
``````

These cylinders can then be used to realize inner geometry.

The sphere and the torus will soon be added to this.

4 Likes

Great work!

From now on you can try out the simple example of the inner geometry here. Take the slider!
InnerGeometryCylinder

UPDATE February 2020
see

1 Like

The construction was enhanced.

In the basic version, only cylinders in the central position could be adapted again at the cylinder ends.

Now spheres, cylinders or planes can be docked to the cylinder ends.

The connections can also be made excentrically and at any angle to each other.

``````const parameters = {

// excenter unit: '%' of the radius, 'd' factor to d, 'v' value

d: 0.14, // rough side length of the triangles
div4: 17, // division of the quarter circle

geoBtm: 'plane', // 'plane', 'sphere', 'cylinder' solid to be adapted
bottom:  -4,
div4Btm: 34, // division bottom adaptation, (to quarter, >= div4)
phiBtm: 0.77, // rotation of adaptive-deformed circle (Bottom)
excBtm: 1.2,
excUnitBtm: 'v',
tiltBtm: 0.5, // tilt of bottom adaption ( -PI/2 < tilt < PI/2 )

geoTop: 'cylinder', //  'plane', 'sphere', 'cylinder' solid to be adapted
top: 2,
div4Top: 44, // division top adaptation, (to quarter, >= div4)
phiTop: 0.77, // rotation of adaptive-deformed circle (Top)
excTop: 148,
excUnitTop: '%',
tiltTop: 0.5, // tilt of top adaption ( -PI/2 < tilt < PI/2 )

holes: [

//  hole to conect a sphere:  [ 'sphere', div4AdpSphere, y, phi, exc, unit ]
[ 'sphere', 16, -1.11, 0,  2.686, 'v' ],

// hole to conect a cylinder: [ 'cylinder', div4AdpCylinder, y, phi, exc, unit, tilt, <optional: side> ]
[ 'cylinder', 8,  -2.2, 1.57, 52.898, '%', -0.22, '+-' ], // side is ignored for connected hole

//points hole,: array of points y, phi, ...  (last point is connected to first)
[ 0.15,0.45, 0.5,0.9, 0.8,0.6, 0.75,-0.2, 0.1,-0.15  ]

]

}
``````

Try here - use the slider.
https://hofk.de/main/threejs/Triangulation/TriangulationCylinderWithHolesEnhanced01.html

The goal is to combine the design for elementary bodies and surfaces to create more complex inner geometries.

So far only spheres ( Triangulation sphere with holes ) and cylinders are realized. Torus and polygons are still missing.

Has been further developed and integrated, see
Triangulation sphere with holes - #9 by hofk

1 Like

In former times I always threw away my leg dresses when they had holes in them.
People have been buying jeans like that for a while now - not me!!!
Should a product configurator for hole stockings be created

1 Like

oh lol somebody flagged this, apparently they dont like the holes in cylinders. oh well, their loss.

In my clumsiness , did I come across the flag myself on the first viewing with the smartphone? No idea

I like the sock pattern.

1 Like