mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-22 22:35:18 +02:00
rename
This commit is contained in:
@@ -3,10 +3,10 @@ use <rotate_p.scad>;
|
|||||||
/*
|
/*
|
||||||
size: The size of the rectangle mapping to a sphere.
|
size: The size of the rectangle mapping to a sphere.
|
||||||
point: A point in the rectangle.
|
point: A point in the rectangle.
|
||||||
r: sphere radius.
|
radius: sphere radius.
|
||||||
angle: [za, xa] mapping angles.
|
angle: [za, xa] mapping angles.
|
||||||
*/
|
*/
|
||||||
function tf_sphere(size, point, r, angle = [180, 360]) =
|
function tf_sphere(size, point, radius, angle = [180, 360]) =
|
||||||
let(
|
let(
|
||||||
x = point[0],
|
x = point[0],
|
||||||
y = point[1],
|
y = point[1],
|
||||||
@@ -16,7 +16,7 @@ function tf_sphere(size, point, r, angle = [180, 360]) =
|
|||||||
ylen = size[1],
|
ylen = size[1],
|
||||||
za_step = za / ylen,
|
za_step = za / ylen,
|
||||||
rza = za_step * y,
|
rza = za_step * y,
|
||||||
rzpt = [r * cos(rza), r * sin(rza), 0],
|
rzpt = [radius * cos(rza), radius * sin(rza), 0],
|
||||||
rxpt = rotate_p(rzpt, [xa / xlen * x, 0, 0])
|
rxpt = rotate_p(rzpt, [xa / xlen * x, 0, 0])
|
||||||
)
|
)
|
||||||
rxpt;
|
rxpt;
|
Reference in New Issue
Block a user