diff --git a/src/experimental/note.md b/src/experimental/note.md index 9f522d97..09985ed6 100644 --- a/src/experimental/note.md +++ b/src/experimental/note.md @@ -10,4 +10,5 @@ dotSCAD 3.0 Dev New modules/functions -- `some` \ No newline at end of file +- `spherical_coordinate` +- `util/some` diff --git a/src/spherical_coordinate.scad b/src/spherical_coordinate.scad new file mode 100644 index 00000000..295315d5 --- /dev/null +++ b/src/spherical_coordinate.scad @@ -0,0 +1,6 @@ +use <__comm__/__angy_angz.scad>; + +function spherical_coordinate(point) = + let(ayz = __angy_angz([0, 0, 0], point)) + // mathematics, r, theta, phi + [norm(point), ayz[1], ayz[0]]; \ No newline at end of file