Untitled
unknown
plain_text
22 days ago
966 B
1
Indexable
Never
(* Parameters *) pileRadius = 0.3; (* Radius of each pile (0.6 m diameter) *) spacing = 1.5; (* Center-to-center spacing between piles *) numRows = 5; (* Number of rows *) numCols = 5; (* Number of columns, can adjust for 22 piles *) (* Pile coordinates *) pilePositions = {}; For[i = 0, i < numRows, i++, For[j = 0, j < numCols, j++, If[Length[pilePositions] < 22, (* Limit to 22 piles *) AppendTo[pilePositions, {i*spacing, j*spacing}]; ]; ]; ]; (* Create pile graphics *) piles = Graphics[{Circle[#, pileRadius] & /@ pilePositions}]; (* Create pile cap *) pileCap = Rectangle[{0, 0}, {spacing*(numRows - 1), spacing*(numCols - 1)}]; (* Combine piles and cap *) Show[ piles, Graphics[{Gray, pileCap}], AspectRatio -> 1, Axes -> True, PlotRange -> {{-1, spacing*(numRows)}, {-1, spacing*(numCols)}}, Frame -> True, FrameLabel -> {"X (m)", "Y (m)"}, PlotLabel -> "Arrangement of 22 Driven Piles with Pile Cap" ]
Leave a Comment