1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-01 12:30:33 +02:00

add spherical_coordinate

This commit is contained in:
Justin Lin
2021-02-09 10:38:24 +08:00
parent d4042c93e3
commit e61e564c47
2 changed files with 8 additions and 1 deletions

View File

@@ -10,4 +10,5 @@ dotSCAD 3.0 Dev
New modules/functions
- `some`
- `spherical_coordinate`
- `util/some`

View File

@@ -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]];