# Spherical Transformations

Transforming with equations

``````//Spherical Transformations

n = 11;
x = Math.Sin(0..180..#n)<1>*Math.Cos(0..360..#n);
y = Math.Sin(0..180..#n)<1>*Math.Sin(0..360..#n);
z = Math.Cos(0..180..#n);

//Sphere
p1 = Point.ByCoordinates(x<1>,y<1>,z<1><2>);

//Sphere Translated and Scaled along Z-Axis
p2 = Point.ByCoordinates(x<1>,y<1>,((0.75+z)/(1.75..2..#n))<1><2>);

//Sphere Translated and Scaled along X-Axis
p3 = Point.ByCoordinates(((x+0.75)*(1..3..#n))<1>,y<1>,z<1><2>);``````

Dome Transformations

``````//Dome Transformations

n = 11;
x = Math.Sin(0..90..#n)<1>*Math.Cos(0..360..#n);
y = Math.Sin(0..90..#n)<1>*Math.Sin(0..360..#n);
z = Math.Cos(0..90..#n);

//Dome
p1 = Point.ByCoordinates((x*(mnx..(mnx+mxs)..#n))<1>,
y<1>,(z/(mnz..(mnz+mxz)..#n))<1><2>);``````
``````u = 0..360..#50;
v = 0..180..#50;
x = (Math.Cos(u) * Math.Sin(v)<1>) * 1.25;
y = (Math.Sin(u) * Math.Sin(v)<1>) * 1.65;
z = Math.Pow(Math.Cos(0..55..#50),8)*-2+2;

NurbsSurface.ByPoints(Point.ByCoordinates(x,y,z));``````

Last updated