I'm on a quest to discover an algorithm that can create the following shape in Three.js. Here is my rough sketch of the expected shape The number of meshes needed to form the 90 degree donut, as well as the thickness and spacing between them, should all be adjustable parameters.
I've attempted to achieve this using TorusGeometry and setting the radial segments to 2, but that approach didn't give me the separate meshes I require, as shown in my desired outcome. After some more research, I came across ShapeGeometry which seems to be the better option.
const generateArc = (padding, thickness, count) => {
const arcShape = new THREE.Shape()
.moveTo( 50, 10 )
.absarc( 10, 10, 40, 0, Math.PI * 2, false );
}
However, I'm struggling to calculate the correct values to generate these individual mesh arcs. Do you think my choice of ShapeGeometry is on the right track? If so, could you guide me on how to create the appropriate mesh shapes using ShapeGeometry?