aboutsummaryrefslogtreecommitdiff
path: root/lib/utils.scad
diff options
context:
space:
mode:
authorElena of Valhalla'' Grandi <valhalla@trueelena.org>2014-06-29 09:06:42 +0200
committerElena of Valhalla'' Grandi <valhalla@trueelena.org>2014-06-29 10:50:51 +0200
commite43199f64993a61830710f0dbad7ad688754dbe7 (patch)
tree0dde4d20e0ceb68980e87b49d18fce10749e37ec /lib/utils.scad
parent6e4f99f514806fccef1e7073080e4f769011d8be (diff)
Improved scaling factors
Diffstat (limited to 'lib/utils.scad')
-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;