1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-08 15:56:42 +02:00
This commit is contained in:
Justin Lin
2022-03-11 15:36:56 +08:00
parent a38fd21f43
commit b07b1b1f3d

View File

@@ -3,5 +3,8 @@ function stereographic_proj_to_plane(point) =
[point.x / n, point.y / n];
function stereographic_proj_to_sphere(point) =
let(n = 1 + point.x ^ 2 + point.y ^ 2)
[2 * point.x / n, 2 * point.y / n, (-1 + point.x ^ 2 + point.y ^ 2) / n];
let(
pp = point * point,
n = 1 + pp
)
[2 * point.x / n, 2 * point.y / n, (-1 + pp) / n];