aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.scad24
1 files changed, 19 insertions, 5 deletions
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;