From b78716317aafc4dfe6b6dc17ed7d1af5bda6a144 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Thu, 29 Jul 2021 11:30:45 -0400 Subject: [PATCH] first commit --- .DS_Store | Bin 0 -> 6148 bytes guides/.gitignore | 1 + guides/guides.pde | 115 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 .DS_Store create mode 100644 guides/.gitignore create mode 100644 guides/guides.pde diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b310dc3c9523eea908e0a5884352d7552b3ae4ca GIT binary patch literal 6148 zcmeHKOG*Pl5UtW618%a^UE>Lo8+5{Wf~<5UaU==}6OioZKAypqhwwVS*Hwz+47dv- zRnYya>o+qGrn^f-ba`mzB2y8mFo;TJL}(s$op|sBsHMh(Ja0Gi)qT6$j}-cgCcgWb zY~&zM(#YWbFW-OqcWqs-x9uAC>gDz7c6Rf&7{)Ze#_S)z^E5+=kYFGf2nK?IVBjbW z;LN5}=Y}x{1HnKr@WlZ4hlD}Qj-6rIIxv+M0LW`}5$NnCn3Ei{V`m5tL@gC)sp>6; zS~~2>XTm%Xs KF$DuhVBiCX3M`ud literal 0 HcmV?d00001 diff --git a/guides/.gitignore b/guides/.gitignore new file mode 100644 index 0000000..756b22f --- /dev/null +++ b/guides/.gitignore @@ -0,0 +1 @@ +*.svg diff --git a/guides/guides.pde b/guides/guides.pde new file mode 100644 index 0000000..7c413ce --- /dev/null +++ b/guides/guides.pde @@ -0,0 +1,115 @@ +import processing.svg.*; + +int n = 0; + +String NAME = "number_" + str(n); + +float IN = 25.4; +float MM = 96 / IN; + +float RATIO = 4.0 / 3.0; + +//9x12" sheet!!!!! +//Vertical measurements diff for 8 1/2" + +int W = round( ((107 * 2) / IN) * 96); +int H = round( ((99 * 2) / IN) * 96); + +float totalW = 107.0; //mm +float totalH = 99.0; //mm +float pad = 10.0; //mm +float calcH = (totalW - (pad * 2.0)) / RATIO; +float calcTop = (totalH - calcH) / 2.0; + + +float markLeft = (pad / 2.0) * MM; +float markTop = (calcTop - (pad / 2.0)) * MM; +float markRight = (totalW - (pad / 2.0)) * MM; +float markBottom = (totalH - (calcTop - (pad / 2.0))) * MM; + +float frameLeft = pad * MM; +float frameTop = calcTop * MM; +float frameRight = (totalW - pad) * MM; +float frameBottom = (totalH - calcTop) * MM; + +void settings () { + size(W, H, SVG, NAME + ".svg"); +} + +void setup () { + noFill(); + stroke(0); + noLoop(); + println(calcH); +} + +void drawNumber (int num, float x, float y) { + float w = 3.0 * MM; + float h = 4.0 * MM; + + float[] two1 = {x, y + (h / 4.0)}; + float[] two2 = {x + (w / 2.0), y}; + float[] two3 = {x + w, y + (h / 4.0)}; + float[] two4 = {x + (w / 2.0), y + (h * 0.75)}; + + float[] three1 = {x, y + (h * 0.1)}; + float[] three2 = {x + (w / 2.0), y}; + float[] three3 = {x + w, y + (h / 4.0)}; + float[] three4 = {x, y + (h * 0.4)}; + float[] three5 = {x + w, y + (h * 0.7)}; + float[] three6 = {x, y + (h * 0.9)}; + + if ( num == 1 ) { + line(x + (w/2), y, x + (w/2), y + h); + } else if (num == 2) { + curve(x - (w / 2.0), y + (h * 0.75), two1[0], two1[1], two2[0], two2[1], x + w, y + (h * 0.25)); + curve(x, y, two2[0], two2[1], two3[0], two3[1], x + (w * 1.5), y + h); + curve(two2[0], two2[1], two3[0], two3[1], two4[0], two4[1], x, y + h); + line(two4[0], two4[1], x, y + h); + line(x, y + h, x + w, y + h); + } else if (num == 3) { + curve(x - (w / 2.0), y + (h / 2.0), three1[0], three1[1], three2[0], three2[1], x + w, y); + curve(x, y, three2[0], three2[1], three3[0], three3[1], x + (w * 1.5), y + h); + curve(x + w, y - h, three3[0], three3[1], three4[0], three4[1], x - w, y + (h / 2.0)); + curve(x - w, y + (h / 2.0), three4[0], three4[1], three5[0], three5[1], x + (w * 1.25), y + (h * 2.0)); + curve(x + (w / 2.0), y, three5[0], three5[1], three6[0], three6[1], x - w, y + (h / 2.0)); + } else if (num == 4) { + line(x + (w * 0.1), y, x, y + (h / 2.0)); + line(x, y + (h / 2.0), x + w, y + (h / 2.0)); + line(x + (w * 0.9), y, x + (w * 0.9), y + h); + } +} + +void mark (float x, float y) { + float len = (pad / 4.0) * MM; + line(x - len, y, x + len, y); + line(x, y - len, x, y + len); +} + +void marks () { + mark(markLeft, markTop); + mark(markRight, markTop); + mark(markLeft, markBottom); + mark(markRight, markBottom); +} + +void frame () { + line(frameLeft, frameTop, frameRight, frameTop); + line(frameRight, frameTop, frameRight, frameBottom); + line(frameRight, frameBottom, frameLeft, frameBottom); + line(frameLeft, frameBottom, frameLeft, frameTop); +} + +void draw () { + marks(); + + //1234 + drawNumber(4, frameLeft + ((frameRight - frameLeft) / 2.0), 1.0 * MM); + + //frame(); + //bisect + /* + line(0,H/2,W,H/2); + line(W/2,0,W/2,H); + */ +}