Skip to main content

Twisted Polygon Ornament

OCCT category icon with a stylized logo representation

Create an elegant twisted ornament by systematically rotating and scaling hexagonal wire profiles, then connecting them with a lofting operation. This produces a sophisticated spiraling form from simple geometric transformations.

Twisted polygon ornament
Bitbybit Platform

Twisted polygon ornament in Rete

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"ngonWire": {
"id": "ngonWire",
"name": "bitbybit.occt.shapes.wire.createNGonWire",
"customName": "ngon wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"nrCorners": 6,
"radius": 1
},
"inputs": {
"nrCorners": {
"connections": [
{
"node": "numberSlider",
"output": "result",
"data": {}
}
]
}
},
"position": [
-87,
386
]
},
"span": {
"id": "span",
"name": "bitbybit.vector.span",
"customName": "span",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"step": 1,
"min": 0,
"max": 10
},
"inputs": {},
"position": [
-653,
869
]
},
"rotate": {
"id": "rotate",
"name": "bitbybit.occt.transforms.rotate",
"customName": "rotate",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"axis": [
0,
0,
1
],
"angle": 0
},
"inputs": {
"shape": {
"connections": [
{
"node": "ngonWire",
"output": "result",
"data": {}
}
]
},
"angle": {
"connections": [
{
"node": "multiply",
"output": "result",
"data": {}
}
]
}
},
"position": [
1495,
397
]
},
"flatten": {
"id": "flatten",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"async": false,
"drawable": false,
"data": {
"nrLevels": 1
},
"inputs": {
"list": {
"connections": [
{
"node": "span",
"output": "result",
"data": {}
}
]
}
},
"position": [
-84,
910
]
},
"scale": {
"id": "scale",
"name": "bitbybit.occt.transforms.scale",
"customName": "scale",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": true,
"flatten": 0,
"forceExecution": false
},
"factor": 1
},
"inputs": {
"shape": {
"connections": [
{
"node": "rotate",
"output": "result",
"data": {}
}
]
},
"factor": {
"connections": [
{
"node": "add",
"output": "result",
"data": {}
}
]
}
},
"position": [
2165,
650
]
},
"multiply": {
"id": "multiply",
"name": "bitbybit.math.multiply",
"customName": "multiply",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"first": 1,
"second": 9
},
"inputs": {
"first": {
"connections": [
{
"node": "flatten",
"output": "result",
"data": {}
}
]
}
},
"position": [
1013,
-90
]
},
"add": {
"id": "add",
"name": "bitbybit.math.add",
"customName": "add",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"first": 1,
"second": 1
},
"inputs": {
"first": {
"connections": [
{
"node": "flatten",
"output": "result",
"data": {}
}
]
}
},
"position": [
1502,
887
]
},
"ngonWire2": {
"id": "ngonWire2",
"name": "bitbybit.occt.shapes.wire.createNGonWire",
"customName": "ngon wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"nrCorners": 6,
"radius": 1
},
"inputs": {
"center": {
"connections": [
{
"node": "vectorXyz",
"output": "result",
"data": {}
}
]
},
"nrCorners": {
"connections": [
{
"node": "numberSlider",
"output": "result",
"data": {}
}
]
}
},
"position": [
-89,
-19
]
},
"vectorXyz": {
"id": "vectorXyz",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 0.1,
"z": 0
},
"inputs": {},
"position": [
-1801,
-469
]
},
"rotate2": {
"id": "rotate2",
"name": "bitbybit.occt.transforms.rotate",
"customName": "rotate",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"axis": [
0,
0,
1
],
"angle": 0
},
"inputs": {
"shape": {
"connections": [
{
"node": "ngonWire2",
"output": "result",
"data": {}
}
]
},
"angle": {
"connections": [
{
"node": "multiply",
"output": "result",
"data": {}
}
]
}
},
"position": [
1494,
32
]
},
"scale2": {
"id": "scale2",
"name": "bitbybit.occt.transforms.scale",
"customName": "scale",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": true,
"flatten": 0,
"forceExecution": false
},
"factor": 1
},
"inputs": {
"shape": {
"connections": [
{
"node": "rotate2",
"output": "result",
"data": {}
}
]
},
"factor": {
"connections": [
{
"node": "add",
"output": "result",
"data": {}
}
]
}
},
"position": [
2169,
318
]
},
"createList": {
"id": "createList",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "scale2",
"output": "result",
"data": {}
}
]
}
},
"position": [
2661,
293
]
},
"createList2": {
"id": "createList2",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "scale",
"output": "result",
"data": {}
}
]
}
},
"position": [
2660,
470
]
},
"createList3": {
"id": "createList3",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "createList2",
"output": "list",
"data": {}
},
{
"node": "createList",
"output": "list",
"data": {}
}
]
}
},
"position": [
3060,
314
]
},
"flipLists": {
"id": "flipLists",
"name": "bitbybit.lists.flipLists",
"customName": "flip lists",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"clone": true
},
"inputs": {
"list": {
"connections": [
{
"node": "createList3",
"output": "list",
"data": {}
}
]
}
},
"position": [
3881,
273
]
},
"flatten2": {
"id": "flatten2",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"async": false,
"drawable": false,
"data": {
"nrLevels": 2
},
"inputs": {
"list": {
"connections": [
{
"node": "flipLists",
"output": "result",
"data": {}
}
]
}
},
"position": [
4273,
310
]
},
"loftAdvanced": {
"id": "loftAdvanced",
"name": "bitbybit.occt.operations.loftAdvanced",
"customName": "loft advanced",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"makeSolid": false,
"closed": true,
"periodic": false,
"straight": true,
"nrPeriodicSections": 10,
"useSmoothing": false,
"maxUDegree": 3,
"tolerance": 1e-7,
"parType": "approxCentripetal"
},
"inputs": {
"shapes": {
"connections": [
{
"node": "reverse2",
"output": "result",
"data": {}
}
]
}
},
"position": [
7375,
1
]
},
"createList4": {
"id": "createList4",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "flatten2",
"output": "result",
"data": {}
}
]
}
},
"position": [
4658,
309
]
},
"ngonWire3": {
"id": "ngonWire3",
"name": "bitbybit.occt.shapes.wire.createNGonWire",
"customName": "ngon wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"nrCorners": 6,
"radius": 1
},
"inputs": {
"center": {
"connections": [
{
"node": "vectorXyz2",
"output": "result",
"data": {}
}
]
},
"nrCorners": {
"connections": [
{
"node": "numberSlider",
"output": "result",
"data": {}
}
]
}
},
"position": [
-102,
-417
]
},
"vectorXyz2": {
"id": "vectorXyz2",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 0.2,
"z": 0
},
"inputs": {},
"position": [
-1807,
-824
]
},
"rotate3": {
"id": "rotate3",
"name": "bitbybit.occt.transforms.rotate",
"customName": "rotate",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"axis": [
0,
0,
1
],
"angle": 0
},
"inputs": {
"angle": {
"connections": [
{
"node": "multiply",
"output": "result",
"data": {}
}
]
},
"shape": {
"connections": [
{
"node": "ngonWire3",
"output": "result",
"data": {}
}
]
}
},
"position": [
1496,
-340
]
},
"scale3": {
"id": "scale3",
"name": "bitbybit.occt.transforms.scale",
"customName": "scale",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": true,
"flatten": 0,
"forceExecution": false
},
"factor": 1
},
"inputs": {
"factor": {
"connections": [
{
"node": "add",
"output": "result",
"data": {}
}
]
},
"shape": {
"connections": [
{
"node": "rotate3",
"output": "result",
"data": {}
}
]
}
},
"position": [
2172,
-17
]
},
"createList5": {
"id": "createList5",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "scale3",
"output": "result",
"data": {}
}
]
}
},
"position": [
2659,
108
]
},
"createList6": {
"id": "createList6",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "createList7",
"output": "list",
"data": {}
},
{
"node": "createList5",
"output": "list",
"data": {}
}
]
}
},
"position": [
3067,
-4
]
},
"vectorXyz3": {
"id": "vectorXyz3",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 0.3,
"z": 0
},
"inputs": {},
"position": [
-1809,
-1178
]
},
"ngonWire4": {
"id": "ngonWire4",
"name": "bitbybit.occt.shapes.wire.createNGonWire",
"customName": "ngon wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"nrCorners": 6,
"radius": 1
},
"inputs": {
"center": {
"connections": [
{
"node": "vectorXyz3",
"output": "result",
"data": {}
}
]
},
"nrCorners": {
"connections": [
{
"node": "numberSlider",
"output": "result",
"data": {}
}
]
}
},
"position": [
-103,
-822
]
},
"rotate4": {
"id": "rotate4",
"name": "bitbybit.occt.transforms.rotate",
"customName": "rotate",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"axis": [
0,
0,
1
],
"angle": 0
},
"inputs": {
"shape": {
"connections": [
{
"node": "ngonWire4",
"output": "result",
"data": {}
}
]
},
"angle": {
"connections": [
{
"node": "multiply",
"output": "result",
"data": {}
}
]
}
},
"position": [
1496,
-703
]
},
"scale4": {
"id": "scale4",
"name": "bitbybit.occt.transforms.scale",
"customName": "scale",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": true,
"flatten": 0,
"forceExecution": false
},
"factor": 1
},
"inputs": {
"factor": {
"connections": [
{
"node": "add",
"output": "result",
"data": {}
}
]
},
"shape": {
"connections": [
{
"node": "rotate4",
"output": "result",
"data": {}
}
]
}
},
"position": [
2170,
-343
]
},
"createList7": {
"id": "createList7",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "scale4",
"output": "result",
"data": {}
}
]
}
},
"position": [
2657,
-68
]
},
"flipLists2": {
"id": "flipLists2",
"name": "bitbybit.lists.flipLists",
"customName": "flip lists",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"clone": true
},
"inputs": {
"list": {
"connections": [
{
"node": "createList6",
"output": "list",
"data": {}
}
]
}
},
"position": [
3481,
-42
]
},
"flatten3": {
"id": "flatten3",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"async": false,
"drawable": false,
"data": {
"nrLevels": 2
},
"inputs": {
"list": {
"connections": [
{
"node": "flipLists2",
"output": "result",
"data": {}
}
]
}
},
"position": [
3868,
-3
]
},
"createList8": {
"id": "createList8",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "flatten3",
"output": "result",
"data": {}
}
]
}
},
"position": [
4270,
0
]
},
"createList9": {
"id": "createList9",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "removeFirstItem",
"output": "result",
"data": {}
},
{
"node": "removeLastItem",
"output": "result",
"data": {}
}
]
}
},
"position": [
5804,
49
]
},
"flatten4": {
"id": "flatten4",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"async": false,
"drawable": false,
"data": {
"nrLevels": 2
},
"inputs": {
"list": {
"connections": [
{
"node": "createList9",
"output": "list",
"data": {}
}
]
}
},
"position": [
6195,
46
]
},
"createList10": {
"id": "createList10",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "flatten4",
"output": "result",
"data": {}
}
]
}
},
"position": [
6580,
48
]
},
"reverse": {
"id": "reverse",
"name": "bitbybit.lists.reverse",
"customName": "reverse",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"clone": true
},
"inputs": {
"list": {
"connections": [
{
"node": "createList8",
"output": "list",
"data": {}
}
]
}
},
"position": [
4653,
-39
]
},
"reverse2": {
"id": "reverse2",
"name": "bitbybit.lists.reverse",
"customName": "reverse",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"clone": true
},
"inputs": {
"list": {
"connections": [
{
"node": "createList10",
"output": "list",
"data": {}
}
]
}
},
"position": [
6995,
6
]
},
"unifySameDomain": {
"id": "unifySameDomain",
"name": "bitbybit.occt.shapes.shape.unifySameDomain",
"customName": "unify same domain",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"unifyEdges": true,
"unifyFaces": true,
"concatBSplines": true
},
"inputs": {
"shape": {
"connections": [
{
"node": "loftAdvanced",
"output": "result",
"data": {}
}
]
}
},
"position": [
7878,
259
]
},
"numberSlider": {
"id": "numberSlider",
"name": "bitbybit.math.numberSlider",
"customName": "number slider",
"async": false,
"drawable": false,
"data": {
"options": {
"min": 6,
"max": 12,
"step": 1,
"width": 350,
"updateOnDrag": false
},
"number": 6
},
"inputs": {},
"position": [
-1925,
52
]
},
"enableSkybox": {
"id": "enableSkybox",
"name": "bitbybit.babylon.scene.enableSkybox",
"customName": "enable skybox",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"skybox": "city",
"size": 1000,
"blur": 0.3,
"environmentIntensity": 0.7,
"hideSkybox": true,
"enableGroundProjection": false,
"projectedGroundRadius": 20,
"projectedGroundHeight": 3
},
"inputs": {},
"position": [
-654,
1286
]
},
"drawAnyAsync": {
"id": "drawAnyAsync",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"entity": {
"connections": [
{
"node": "unifySameDomain",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "optionsOcctShapeMaterial",
"output": "result",
"data": {}
}
]
}
},
"position": [
8377,
404
]
},
"optionsOcctShapeMaterial": {
"id": "optionsOcctShapeMaterial",
"name": "bitbybit.draw.optionsOcctShapeMaterial",
"customName": "options occt shape material",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"precision": 0.01,
"drawEdges": true,
"edgeColour": "#ffffff",
"edgeWidth": 2
},
"inputs": {
"faceMaterial": {
"connections": [
{
"node": "pbrMetallicRoughness",
"output": "result",
"data": {}
}
]
}
},
"position": [
7877,
673
]
},
"pbrMetallicRoughness": {
"id": "pbrMetallicRoughness",
"name": "bitbybit.babylon.material.pbrMetallicRoughness.create",
"customName": "pbr metallic roughness",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"name": "Custom Material",
"baseColor": "#94ffd1",
"emissiveColor": "#000000",
"metallic": 0.9,
"roughness": 0.3,
"alpha": 1,
"backFaceCulling": false,
"zOffset": 2
},
"inputs": {},
"position": [
7384,
773
]
},
"removeFirstItem": {
"id": "removeFirstItem",
"name": "bitbybit.lists.removeFirstItem",
"customName": "remove first item",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"clone": true
},
"inputs": {
"list": {
"connections": [
{
"node": "createList4",
"output": "list",
"data": {}
}
]
}
},
"position": [
5046,
270
]
},
"removeLastItem": {
"id": "removeLastItem",
"name": "bitbybit.lists.removeLastItem",
"customName": "remove last item",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"clone": true
},
"inputs": {
"list": {
"connections": [
{
"node": "reverse",
"output": "result",
"data": {}
}
]
}
},
"position": [
5046,
-40
]
}
},
"modules": {}
}

How It Works​

The algorithm creates a twisted ornament by stacking transformed hexagonal profiles. We start with four base hexagons at different heights, then generate eleven iterations where each step rotates by 9 degrees and scales progressively larger. This creates a smooth spiraling form that expands outward as it rises.

The technique uses two separate lists to control the twist direction. After transforming all profiles, we carefully arrange and reverse these lists before connecting them with a lofting operation. The loft creates smooth surfaces between profiles using straight transitions, maintaining crisp edges while achieving an organic twisted appearance. Finally, a unification step cleans up the geometry by merging adjacent faces and edges.

Algorithm Steps​

1. Create four base hexagon wires at heights: 0, 0.1, 0.2, 0.3

2. For each iteration i from 0 to 10:
- Calculate angle = i × 9 degrees
- Calculate scale factor = i + 1
- Transform wires 1 and 2 → add to list1
- Transform wires 3 and 4 → add to list2

3. Process lists:
- Remove first item from list1
- Reverse list2, then remove first and last items

4. Combine lists:
- Merge list2 + list1 → finalList
- Reverse finalList

5. Loft profiles:
- Connect all profiles with straight transitions
- Create closed, non-periodic surface

6. Unify geometry:
- Merge coplanar faces
- Combine adjacent edges

7. Render with metallic material and visible edges

Experiment with the number of polygon corners or rotation angle to create unique variations of this twisted form.