mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 01:04:07 +02:00
add spherical_coordinate
This commit is contained in:
@@ -10,4 +10,5 @@ dotSCAD 3.0 Dev
|
|||||||
|
|
||||||
New modules/functions
|
New modules/functions
|
||||||
|
|
||||||
- `some`
|
- `spherical_coordinate`
|
||||||
|
- `util/some`
|
||||||
|
6
src/spherical_coordinate.scad
Normal file
6
src/spherical_coordinate.scad
Normal 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]];
|
Reference in New Issue
Block a user