Below is pseudo code and screen shots of the corresponding hand modelling for making an irregular geodesic dome based on lengths of bamboo. There is a function for actually creating the fabrication files for the joints that I’ve not been able to do yet, but it similar to a script I was working on earlier, so I’m confident that I will be able to code it.
Main

Define arrAllPts

Define arrPerimeterPts

Get sphereRadius and draw strSphere
4. Get sides of triangle.
5. Draw triangle.
6. Draw circumcircle of triangle.
7. Move circle and triangle to centre of sphere using circle centre as base point.
8. Draw vertical line from circle to sphere.
9. Move triangle to the top of the vertical line using the bottom of the line as base point.
10. Store the coordinates of the triangle vertex (vPt1, vPt2 and vPt3) in an array, arrAllPts

Repeat until length of arrPerimeterPts = 3

Call function PerimeterPts to get values of arrPerimeterPts from arrAllPts

If a point vPt(x) is a part of arrAllPts and not a part of arrPerimeterPts then call function CreateJoint

End Repeat
Function PerimeterPoints

arrPerimeterPoints = arrAllPts

Loop i through all points in arrPerimeterPts –

Draw a line connecting the point to the apex of strSphere.

For all points on the same side of the line as point arrPerimeterPts(i+1) connect them with a line to arrPerimeterPts(i).

Of these lines find the one with a mid point fartherest from the apex of strSphere

If there are any points in arrPerimeterPts between this point and arrPerimeterPts(i), then remove the intermediate points from the array and draw a line between these two points, else, draw a triangle using these two points as the endpoints of one side using Function1 (also, align the triangle to strSphere using Function3) and insert the resulting third vertex of the triangle between these two points in arrPeremiterPts and arrAllpts.

Next i
Function 1

Select endPoint1 and endPoint2 of the existing line.

Get point1 to define the orientation of the triangle

Get sideLength1 and sideLength2.

Draw a circle circ1 with centre at endPoint1 and radius of sideLength1.

Draw a circle circ2 with centre at endPoint2 and radius of sideLength2.

Find the intersection points intPt1 and intPt2 of circ1 and circ2.

Find the distance between intPt1 and point1 and the distance between intPt2 and point1.

If intPt1 is closer to point1 then endPoint3 = intPt1, else, endPoint3 = intPt2.

Draw and return lines connecting endPoint1 to endPoint2, endPoint2 to endPoint3, and endPoint3 to endPoint1.
Function3

Select endPtOnSrf1, endPtOnSrf2, and endFree of the triangle.

Select the sphere1 on which endPtOnSrf1 and endPtOnSrf2 lie, and select the apexPt of spher1.

Draw a line1 from endPtOnSrf1 and endPtOnSrf2.

Draw a linePerp with start point at endFree and perpendicular to line1.

Draw intPt at the intersection linePerp and line1.

Draw circle on the plane perpendicular to line1 with centre at intPt and radius equal to linePerp.

Trim circle using sphere1 as a cutting object to get arc1.

Compare the distance of the two end points of arc1 to apexPt. endPtOnSrf3 = the end point with greater distance to apexPt.

Draw and return lines connecting endPtOnSrf1 to endPtOnSrf2, endPtOnSrf2 to endPtOnSrf3, and endPtOnSrf3 to endPtOnSrf1.
Leave a Reply