1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 06:08:31 +01:00

refactor: it's r

This commit is contained in:
Justin Lin 2022-05-07 16:28:35 +08:00
parent ac262336fb
commit 871bee3d50

View File

@ -1,15 +1,15 @@
use <../util/radians.scad>;
use <../util/degrees.scad>;
function _radian_step(b, radian, pow2_dist) =
radians(acos(1 - pow2_dist / (2 * (b * radian) ^ 2)));
function _radian_step(r, pow2_dist) =
radians(acos(1 - pow2_dist / (2 * r ^ 2)));
function _find_radians(b, pow2_dist, init_radian, n) =
[
for(
count = 0, radian = init_radian;
count < n;
count = count + 1, radian = radian + _radian_step(b, radian, pow2_dist)
count = count + 1, radian = radian + _radian_step(b * radian, pow2_dist)
)
radian
];