Created a model of the One World Trade Center antiprism #113
Replies: 2 comments
-
Using the modelling approach shown here https://youtu.be/S5O9ksOGO9A?si=-c-b1SQFuK6qwoEy I created the following result. The approach consists of modelling 4 piramids that are then subtracted from a standard prism shape to create the antiprism. The result is the rotated 180 degrees to let the small top point upwards. Then the prism-shaped base of the tower is added. To make the result more realistic I added the top part and the spike. The code illustrates that it is possible to approximate a piramid shape by extruding with a very small const {draw,drawRectangle,drawCircle,makeCylinder} = replicad
function main()
{
let scale = 1/10
let baseLength = 200*scale;
let topLength = Math.sqrt((2*Math.pow((baseLength/2),2)))
let totalHeight = 1368*scale
let baseHeight = 196.85*scale
let heightTop = (totalHeight-baseHeight)
let cylinderHeight = 50*scale
let spikeHeight = 250*scale
let spikeBaseR = 10*scale
// create 4 piramids to shave off triangles from prism
let pMid1 = drawRectangle(topLength,topLength).sketchOnPlane("XY")
.extrude(heightTop,{extrusionProfile: {profile: "linear", endFactor: 0.01}})
.rotate(45,[0,0]).translate(-baseLength/2,-baseLength/2)
let pMid2 = pMid1.clone().translate(baseLength,0)
let pMid3 = pMid1.clone().translate(0,baseLength)
let pMid4 = pMid1.clone().translate(baseLength,baseLength)
// create straight segment, cut with piramids, rotate and translate
let baseProfile = drawRectangle(baseLength,baseLength).sketchOnPlane("XY")
let towerTop = baseProfile.clone().extrude(heightTop)
towerTop = towerTop.cut(pMid1).cut(pMid2).cut(pMid3).cut(pMid4)
towerTop = towerTop.rotate(180,[0,0,0],[0,1,0]).translate(0,0,totalHeight)
let towerBase = baseProfile.extrude(baseHeight)
let tower = towerBase.fuse(towerTop)
let topCylinder = makeCylinder(topLength/1.8,5).translate(0,0,totalHeight)
tower = tower.fuse(topCylinder);
let spike = drawCircle(spikeBaseR).sketchOnPlane("XY")
spike = spike.extrude(spikeHeight,{extrusionProfile: {profile: "linear", endFactor: 0.01}})
.translate(0,0,totalHeight+cylinderHeight)
tower = tower.fuse(spike)
return [{shape: tower}]} |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Inspired by Matt Parker, https://www.youtube.com/watch?v=a_fTA4UeFls, I created the following model of the One World Trade Center. The model illustrates how to use the
makePolygon
andmakeSolid
functions of Replicad. Modelling this shape was not straightforward. You can tell by the code that I needed some tricks to make it work. The code can be improved to create antiprisms of other regular polygons. This would require a more generic approach to define the rotation of the top plane versus the base plane and to define the faces on the top and bottom. For now I am happy with the result.To make it easier to copy the code I have included it below:
Beta Was this translation helpful? Give feedback.
All reactions