Parametric Shapes

Geometry defined by equations
Associative and Imperative Shape definition
u = 180/2..3*180/2..2;
v = 0..180*2..2;
x = ((3/2) + Math.Sin(u + (2 * v)<1>)) * (Math.Cos(v) + Math.Cos(2 * v)/10);
y = ((3/2) + Math.Sin(u + (2 * v)<1>)) * (Math.Sin(v) + Math.Sin(2 * v)/10);
z = Math.Sin(Math.RadiansToDegrees(Math.Sin(Math.RadiansToDegrees(Math.Cos(u + (2 * v)<1>)<1> + (Math.Cos(12 * u) / 12)))));
s = GeometryColor.ByGeometryColor(NurbsSurface.ByPoints(Point.ByCoordinates(x,y,z)),Color.ByARGB(150,255,150,100));
geometry = [Imperative]
{
a = 0;
b = 0;
arrPoints = [];
for (v in 0..2*180..2)
{
for (u in (180/2)..(3*180/2)..2)
{
x = ((3/2) + Math.Sin(u+(2*v))) * (Math.Cos(v)+Math.Cos(2*v)/10);
y = ((3/2) + Math.Sin(u+(2*v))) * (Math.Sin(v)+Math.Sin(2*v)/10);
z = (Math.Sin(Math.RadiansToDegrees(Math.RadiansToDegrees(Math.Sin(Math.Cos(u+(2*v))+Math.Cos(12*u)/12)))));
arrPoints [a][b] = Point.ByCoordinates(x, y, z);
b = b + 1;
}
a = a + 1;
b = 0;
}
return List.Clean(NurbsCurve.ByPoints(arrPoints),false);
https://pixabay.com/images/id-331944/
Hyperbolic Paraboloid
//Circular Grid of Points
p1 = Point.ByCoordinates(Math.Cos(0..360),Math.Sin(0..360));
p2 = p1.Translate((p1.AsVector())<1>,(-1..10)<2>);
//Equation
a = 5;
b = 8;
z1 = Math.Pow(p2.X,2)/Math.Pow(a,2)-Math.Pow(p2.Y,2)/Math.Pow(b,2);
//Surface
s1 = NurbsSurface.ByPoints(p2.Translate(Vector.ZAxis(),z1));
GeometryColor.ByGeometryColor(s1,Color.ByARGB(255,252,211,3));
Mobius Strip
n = 10;
r = 20;
s = -n..n..#100;
t = 0..360..#100;
x = (r + (s<2> * Math.Cos(t/2)<1>)) * Math.Cos(t);
y = (r + (s<2> * Math.Cos(t/2)<1>)) * Math.Sin(t);
z = s<2> * Math.Sin(t/2)<1>;
points = Autodesk.Point.ByCoordinates(x,y,z);
Mobius = NurbsSurface.ByPoints(points)
Hemisphere
//Parametric Hemisphere
r = 10;
b = 30;
c = 20;
u = 0..360..#b;
v = 0..r..#c;
x = Math.Sqrt(Math.Pow(r,2)<1>-Math.Pow(v<2>,2)<2>)*Math.Cos(u)<1>;
y = Math.Sqrt(Math.Pow(r,2)<1>-Math.Pow(v<2>,2)<2>)*Math.Sin(u)<1>;
z = v;
p = List.FirstItem(Autodesk.Point.ByCoordinates(x<1><2>,y<1><2>,z)<1>);
//Cross Bracing
dr = List.DiagonalRight(p,c);
pr = PolyCurve.ByPoints(List.FilterByBoolMask(dr,List.Count(dr<1>)>1)["in"],false);
dl = List.DiagonalLeft(p,c);
pl = PolyCurve.ByPoints(List.FilterByBoolMask(dl,List.Count(dl<1>)>1)["in"],false);
dh = List.UniqueItems(List.Transpose(p)<1>);
ph = PolyCurve.ByPoints(List.FilterByBoolMask(dh,List.Count(dh<1>)>1)["in"],false);