Copy p = Point.ByCoordinates ( Math.DegreesToRadians (( 0 ..( 180 * 8 ).. 10 )) , ( - 10 .. 10 ..# 9 ) < 1 >, ( Math.Sin (( - 90 ..( 180 * 8 ).. 10 ) + ( 0 .. 90 .. 10 ) < 1 > ) * ( - 1.25 .. 1.25 ..# 10 )) < 1 > );
GeometryColor.ByGeometryColor ( NurbsSurface.ByPoints ( Point.ByCoordinates (p.X , (p.Z <- 0.6 ? p.Y + ( - p.Y * (p.Z) * 0.08 ) : p.Y) , p.Z)) .Thicken ( 0.25 ) .Translate ( 0 , 0 , 1.5 ) , Color.ByARGB ( 255 , 255 , 250 , 200 ));
While the code required to create this geometry can be packed into a couple of lines of Design, below is a stepwise elaboration of the process.
Copy // Sine Wave
r = 0 .. 360 ;
x = Math.DegreesToRadians (r);
y = 0 ;
z = Math.Sin (r);
p = Point.ByCoordinates (x , y , z);
Copy // Decrease point count
r = 0 .. 360 .. 10 ;
// Increase Frequency
r = ( 0 .. 360 .. 10 ) * 4 ;
// Increase Amplitude
z = Math.Sin (r) * 1.5 ;
Copy // A range of values along the Y-axis
y = - 10 .. 10 ..# 9 ;
// Repeat waves along the Y-axis
p = Point.ByCoordinates (x , y < 1 >, z);
Copy // Nurbs Surface
s = NurbsSurface.ByPoints (p);
Copy // Increase Z incrementally
z = Math.Sin (r + ( 0 .. 90 ..# 9 ) < 1 > ) * 1.5 ;
// Apply to wave profiles
p = Point.ByCoordinates (x , y < 1 >, z < 1 > );
Copy // Incrementally minimizing amplitude of waves towards the middle
a = List.Flatten ([ 1.5 .. 0 .. # 4 , 0 , 0 .. 1.5 .. # 4 ] ,- 1 );
z = Math.Sin (r + ( 0 .. 90 ..# 9 ) < 1 > ) * a;
Copy // Trough Protrusion
tp = p.Z < - 1.4 ? p.Y + ( - p.Y * (p.Z) * 0.1 ) : p.Y;
pp = Point.ByCoordinates (p.X , tp , p.Z);
Copy // Sine Wave
r = ( 0 .. 360 .. 10 ) * 4 ;
x = Math.DegreesToRadians (r);
y = - 10 .. 10 ..# 9 ;
a = List.Flatten ([ 1.5 .. 0 .. # 4 , 0 , 0 .. 1.5 .. # 4 ] ,- 1 );
z = Math.Sin (r + ( 0 .. 90 ..# 9 ) < 1 > ) * a;
p = Point.ByCoordinates (x , y < 1 >, z < 1 > );
// Trough Protrusion
tp = p.Z <- 1.4 ? p.Y + ( - p.Y * (p.Z) * 0.1 ) : p.Y;
pp = Point.ByCoordinates (p.X , tp , p.Z);
// Nurbs Surface
s = NurbsSurface.ByPoints (pp) .Thicken ( 0.25 );