Geometry "wave"

Hi guys,

I am working to replicate a building originally made by 3XN to practise my geometry skills.
I am beginner and I am struggle to create 1 part.


I succeed to do the round base, and create the wood sections, but I have no clue how to do the curvy thing… I tried to find tutorial but it is always mostly showing how to randomise points… I would like to have control over my variation. In 3XN building they seem to have consistency in the curved.curves… It is always same angle, at the same points etc…

thanks for your help!

hi @fbergeronPM5NT

check this: wave_structure.dyn (18.2 KB)

Output:

The Script:

python code:

import clr

clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

from math import sin, pi as PI


topElevation = IN[0]
bottomElevation = IN[1]
waveHeight = IN[2]
radius = IN[3]
n = int(IN[4])
partitionAngle = 360.0/n
side = IN[5]
crests = IN[6]
cs = IN[7]


postLine = list()
for i in range(n):
	topPoint = Point.ByCylindricalCoordinates(cs, i*partitionAngle, topElevation, radius)
	bottomHeight = bottomElevation+waveHeight + (waveHeight/2)*sin(crests*i*2*PI/n)
	bottomPoint = Point.ByCylindricalCoordinates(cs, i*partitionAngle, bottomHeight, radius)
	post = Line.ByStartPointEndPoint(topPoint, bottomPoint)
	
	posX = bottomPoint.X
	posY = bottomPoint.Y
	posZ = bottomPoint.Z
	
	
	origin = Point.ByCoordinates(posX, posY, posZ)
	normal = Vector.ByTwoPoints(bottomPoint, topPoint)
	pl = Plane.ByOriginNormal(origin, normal)
		
	pcs = CoordinateSystem.ByOrigin(posX, posY, posZ+.5*post.Length)
	rpcs = CoordinateSystem.Rotate(pcs, pl, i*partitionAngle)
	
	cuboid = Cuboid.ByLengths(rpcs, side, side, post.Length)
	postLine.append(cuboid)



OUT = postLine

just play around the inputs.
have fun!

-biboy

1 Like

Here is a mathematical approach.

You should be able to build a graph (if you prefer nodes) by referring to the code below.

rd = 20;
ht = 10;

dv = 200;
pt = 0..360..#dv;

//Top Profile
bx = Math.Cos(pt) * rd;
by = Math.Sin(pt) * rd;
tp = Point.ByCoordinates(bx,by,ht);

//Base Profile
//wf = 5;
//wh = 0.1;
bz = Math.Sin(0..360*wf..#200) * wh * rd;
bp = Point.ByCoordinates(bx,by,bz);

//Mullions
ml = 180/(dv*2.5);
mw = ml*2;

//Vericals
r1 = Rectangle.ByWidthLength(Plane.ByOriginNormalXAxis(bp,Vector.ZAxis(),Point.AsVector(bp)),mw,ml);
v1 = r1.ExtrudeAsSolid(Vector.ByTwoPoints(bp,tp));
1 Like

wave.dyn (36.7 KB)

6 Likes

Ohh god you guys are genius ! Thank you so much guys! I will take this part and try to apply it to other patterns ! Thanks again and again !

1 Like