From e43199f64993a61830710f0dbad7ad688754dbe7 Mon Sep 17 00:00:00 2001 From: Elena of Valhalla'' Grandi Date: Sun, 29 Jun 2014 09:06:42 +0200 Subject: Improved scaling factors --- lib/utils.scad | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'lib/utils.scad') diff --git a/lib/utils.scad b/lib/utils.scad index 6241712..07eb11e 100644 --- a/lib/utils.scad +++ b/lib/utils.scad @@ -1,13 +1,27 @@ + +// constant circumscribed sphere function circ_rad(size) = size * sqrt(3) / 2; -function s2s_d4(size) = circ_rad(size)*4/sqrt(6); +//function s2s_d4(size) = circ_rad(size)*4/sqrt(6); +//function s2s_d6(size) = size; +//function s2s_d8(size) = circ_rad(size)*2/sqrt(2); +//function s2s_d12(size) = circ_rad(size)*4/(sqrt(3)*(1+sqrt(5))); +//function s2s_d20(size) = circ_rad(size)*4/(sqrt(10+2*sqrt(5))); -function s2s_d6(size) = size; +// measured on existing dice (14 mm) -function s2s_d8(size) = circ_rad(size)*2/sqrt(2); +function s2s_d4(size) = size * 1.57; +function s2s_d6(size) = size; +function s2s_d8(size) = size * 1.21; +function s2s_d12(size) = size * 0.86; +function s2s_d20(size) = size * 0.86; -function s2s_d12(size) = circ_rad(size)*4/(sqrt(3)*(1+sqrt(5))); +// measured on existing dice (averaged between sizes) -function s2s_d20(size) = circ_rad(size)*4/(sqrt(10+2*sqrt(5))); +//function s2s_d4(size) = size * 1.40; +//function s2s_d6(size) = size; +//function s2s_d8(size) = size * 1.16; +//function s2s_d12(size) = size * 0.81; +//function s2s_d20(size) = size * 0.78; -- cgit v1.2.3