Testing Waters

Searchâ€¦

Projects

Patterns

Geometry

Lists

Spherical Transformations

Transforming with equations

SphereTransformations.zip

3KB

Binary

//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>);

Asymmetric Vertical Scaling

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 modified 1yr ago

Copy link