mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-08 07:46:39 +02:00
refactor
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
use <__comm__/__angy_angz.scad>;
|
|
||||||
|
|
||||||
function spherical_coordinate(point) =
|
function spherical_coordinate(point) =
|
||||||
let(ayz = __angy_angz([0, 0, 0], point))
|
// mathematics [r, theta, phi]
|
||||||
// mathematics, r, theta, phi
|
[
|
||||||
[norm(point), ayz[1], ayz[0]];
|
norm(point),
|
||||||
|
atan2(point[1], point[0]),
|
||||||
|
atan2(point[2], sqrt(point[0]^2 + point[1]^2))
|
||||||
|
];
|
||||||
|
Reference in New Issue
Block a user