Skip to content

Commit

Permalink
Create repository
Browse files Browse the repository at this point in the history
  • Loading branch information
whosawhatsis committed Aug 14, 2020
1 parent 155789a commit 71deb3e
Show file tree
Hide file tree
Showing 14 changed files with 583 additions and 1 deletion.
43 changes: 43 additions & 0 deletions Circumscribed+inscribed/areaWedges.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// file areaWedges.scad
//Prints out wedges making up a circle, and a rectangular enclosure
// (c) 2020 Rich Cameron, CC-BY
// measurements in mm

r = 30;
sides = 6;
thick = 10;
notch = 2;
spacing = 3;

frame = 10;

$fs = .2;
$fa = 2;

for(a = [0:360 / sides:359]) rotate(a) translate([0, spacing / sin(360 / sides), 0]) if(a == 0) for(i = [1, -1]) translate([i * spacing / 3, 0, 0]) intersection() {
translate([i * r, r, 0]) cube(r * 2, center = true);
union() {
linear_extrude(thick / 2) wedge(true);
linear_extrude(thick) wedge();
}
} else {
linear_extrude(thick / 2) wedge(true);
linear_extrude(thick) wedge();
}

if(frame) linear_extrude(thick / 2) translate([1, 1, 0] * (-r - frame - spacing * (1 + 1 / sin(360 / sides)))) difference() {
square([r + frame, r * PI + frame]);
translate([frame, frame, 0]) square([r, r * PI]);
}

module wedge(round = false) {
difference() {
intersection() {
if(round) circle(r);
else circle(r, $fn = sides);
intersection_for(a = [-1, 1]) rotate(a * (90 - 180 / sides)) translate([-r, 0, 0]) square(r * 2);
}
rotate(-180 / sides) translate([0, r / 2, 0]) circle(notch, $fn = 4);
}
rotate(180 / sides) translate([0, r / 2, 0]) circle(notch, $fn = 4);
}
30 changes: 30 additions & 0 deletions Circumscribed+inscribed/circumscribed.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// file circumscribed.scad
// Prints out a circle and its circumscribed specified polygon
// (c) 2020 Rich Cameron, CC-BY
// measurements in mm

wall_thickness = 1.2;
radius = 30;
n = 3; //number of sides of circumscribed polygon
height = 10;

$fs = .2;
$fa = 2;


difference(){
cylinder(h = height, r = radius / cos(180 / n) + wall_thickness, $fn = n);
cylinder(h = height*3, r = radius, $fn = 100, center = true);
};


linear_extrude(wall_thickness * 2) intersection() {
circle(radius);
union() {
rotate(180 / n) translate([0, -wall_thickness, 0]) square([radius, 2 *wall_thickness]);
difference() {
offset(wall_thickness) intersection_for(a = [0, 180 + 360 / n]) rotate(a) translate([-radius * 2, 0, 0]) square(radius * 4);
offset(-wall_thickness) intersection_for(a = [0, 180 + 360 / n]) rotate(a) translate([-radius * 2, 0, 0]) square(radius * 4);
}
}
}
29 changes: 29 additions & 0 deletions Circumscribed+inscribed/inscribed.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// file inscribed.scad
// Prints out a circle and its inscribed specified polygon
// (c) 2020 Rich Cameron, CC-BY
// measurements in mm

wall_thickness = 1.2;
radius = 30;
n = 12; //number of sides of circumscribed polygon
height = 10;

$fs = .2;
$fa = 2;

difference(){
cylinder(h = height, r = radius + wall_thickness, $fn = 100);
cylinder(h = height * 3, r = radius, center = true, $fn = n);
};


linear_extrude(wall_thickness * 2) intersection() {
circle(radius);
union() {
rotate(180 / n) translate([0, -wall_thickness, 0]) square([radius, 2 *wall_thickness]);
difference() {
offset(wall_thickness) intersection_for(a = [0, 180 + 360 / n]) rotate(a) translate([-radius * 2, 0, 0]) square(radius * 4);
offset(-wall_thickness) intersection_for(a = [0, 180 + 360 / n]) rotate(a) translate([-radius * 2, 0, 0]) square(radius * 4);
}
}
}
28 changes: 28 additions & 0 deletions Polygons+Polyhedrons/platonicSolids.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// file platonicSolids.scad
// makes platonic solids of radius size
// (c) 2020 Rich Cameron, CC-BY

size = 35;

rotate(72 * 1) translate([size * 1.2, 0, 0]) tetrahedron(size);
rotate(72 * 2) translate([size * 1.2, 0, 0]) cube(size, center = true);
rotate(72 * 3) translate([size * 1.2, 0, 0]) octahedron(size);
rotate(72 * 4) translate([size * 1.2, 0, 0]) dodecahedron(size);
rotate(72 * 5) translate([size * 1.2, 0, 0]) icosahedron(size);
/**/

/*tetrahedron(size);
translate([-size * 1, 0, 0]) cube(size, center = true);
translate([-size * 2.5, 0, 0]) octahedron(size);
translate([-size * 4, 0, 0]) dodecahedron(size);
translate([-size * 5.5, 0, 0]) icosahedron(size);
/**/


module tetrahedron(size = 1) cylinder(r1 = size / sqrt(2), r2 = 0, h = size, center = true, $fn = 3);

module octahedron(size = 1) hull() for(i = [0, 1]) mirror([0, 0, i]) mirror([i, 0, 0]) tetrahedron(size);

module dodecahedron(size = 1) intersection_for(a = [0:72:360]) rotate([0, a ? atan(2) : 0, a]) cylinder(r = size, h = size, center = true, $fn = 10);

module icosahedron(size = 1) intersection_for(a = [0:120:360], b = [-60, 0, 60]) rotate([0, a ? acos(sqrt(5) / 3) : 0, a]) rotate([0, b ? acos(sqrt(5) / 3) : 0, a ? b : 0]) cylinder(r = size, h = size, $fn = 6, center = true);
18 changes: 18 additions & 0 deletions Polygons+Polyhedrons/puzzlebox.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// file puzzleBox.scad
// Creates a "vase box"with
// internal dimensions that fits
// a tetrahedron with the same
// value of the "size" variable
// (c) Rich Cameron 2020,
// License CC-BY

size = 50;
clearance = 1;
wall = 1;

linear_extrude(wall) square(size + clearance + wall * 2, center = true);

linear_extrude(size + clearance + wall) difference() {
square(size + clearance + wall * 2, center = true);
square(size + clearance, center = true);
}
11 changes: 11 additions & 0 deletions Polygons+Polyhedrons/puzzletetrahedron.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// file puzzletetrahedron.scad
// Creates a "vase box"with internal diameter that fits
// a tetrahedron with the same "size" variable
// (c) Rich Cameron 2020, License CC-BY

size = 50;

rotate([90 - acos(1/3) / 2, 0, 0]) rotate(45) scale(size / 2) {
polyhedron([[1, 1, 1], [-1, -1, 1], [1, -1, -1], [-1, 1, -1]], [[0, 1, 2], [1, 2, 3], [0, 1, 3], [0, 2, 3]]);
%cube(2, center = true);
}
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Geometry
This repository contains 3D printable geometry files. They are explained in associated lesson plans and a Teacher’s Guide, linked at https://www.nonscriptum.com/geometry

This repository contains 3D printable geometry files. They are explained in associated lesson plans and a Teacher’s Guide, linked at https://www.nonscriptum.com/geometry. A user’s forum is hosted at https://groups.google.com/forum/#!forum/3dp_edu_models. This project was supported, in part by grant number 90RE5024, from the U.S. Administration for Community Living, Department of Health and Human Services, Washington, D.C. 20201.
License CC-BY-4.0, with attribution: “Joan Horvath and Rich Cameron (with link to this repository).”

License CC-BY
91 changes: 91 additions & 0 deletions SIne+Cosine/hypotenuse.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
//Program hypotenuse.scad
// (c) Rich Cameron 2020, licensed CC-BY
// All dimensions mm

// Length of the hypotenuse (and gauges on side)
hypotenuse = 120;
// Peg height in Z - one bigger than other
peg = 6;

wall = 4;
// Height of the frame in Z dimension
height = 8;
// Height of the slider in Z dimension (not including pegs)
hypotenuse_height = 4;

//Clearance of pegs
clearance = .25;
// Next function is for future capability- ignore for now
anglegauge = 40;

$fs = .2;
$fa = 2;

translate([-1 - peg - clearance - wall, 1 + peg + clearance + wall, 0]) hypotenuse(0);
//Following line is for possible future capability
//translate([2 * (-1 - peg) - clearance - wall, 1 + peg + 2 * (clearance + wall), 0]) hypotenuse();
frame();

//%mirror([1, 0, 0]) translate([1, 1, 0] * -(peg/2 + clearance + wall)) square([140, 150]);

module hypotenuse(anglegauge = anglegauge) difference() {
union() {
linear_extrude(height + hypotenuse_height + 1, convexity = 5) difference() {
circle(peg/2);
circle(.2);
}
linear_extrude(height + hypotenuse_height, convexity = 5) translate([0, hypotenuse, 0]) difference() {
circle(peg/2 + .5);
circle(.2);
}
linear_extrude(hypotenuse_height, convexity = 5) difference() {
hull() for(i = [0, 1]) translate([0, i * hypotenuse, 0]) circle(peg/2);
for(i = [0, 1]) translate([0, i * hypotenuse, 0]) circle(.2);
}
if(anglegauge) linear_extrude(hypotenuse_height, convexity = 5) mirror([1, 0, 0]) difference() {
for(i = [0]) translate([0, i * hypotenuse, 0]) intersection() {
difference() {
circle(anglegauge / 100 + sqrt(pow(anglegauge, 2) + pow(peg / 2 + clearance + wall, 2)));
circle(anglegauge / 100 + sqrt(pow(anglegauge, 2) + pow(peg / 2 + clearance + wall, 2)) - wall);
}
translate([0, -(clearance + wall), 0]) {
translate([0, -peg/2, 0]) square(hypotenuse);
hull() for(i = [0, 1]) translate([0, i * hypotenuse, 0]) circle(peg/2);
}
}
for(i = [0, 1]) translate([0, i * hypotenuse, 0]) circle(.2);
for(a = [0:10:90]) rotate(a) translate([anglegauge, -(peg / 2 + clearance + wall), 0]) rotate(-45) square(10);
}
}
if(anglegauge) translate([0, 0, hypotenuse_height]) linear_extrude(hypotenuse_height, center= true, convexity = 5) mirror([1, 0, 0]) intersection() {
translate([peg / 2, -peg/2 - clearance - wall - 1, 0]) square(hypotenuse);
for(a = [0:1:90]) rotate(a) translate([anglegauge, -(peg / 2 + clearance + wall), 0]) rotate(-45) offset(-.01) square(10);
}
translate([0, hypotenuse / 2, 0]) cube([.01, hypotenuse, 1], center = true);
}

module frame() {
difference() {
linear_extrude(height + 1, convexity = 5) difference() {
for(a = [0, 1]) mirror([a, a, 0]) hull() for(i = [0, 1]) translate([0, i * hypotenuse, 0]) circle(peg/2 + clearance + wall);
for(a = [0, 1]) mirror([a, a, 0]) hull() for(i = [0, 1]) translate([0, i * hypotenuse, 0]) circle(peg/2 + clearance + .5 * (1 - a));
}
translate([0, 0, height + 1]) for(a = [0, 1]) mirror([a, a, 0]) {
linear_extrude(height * 2, center = true, convexity = 5) for(i = [0:10:100]) translate([i * -hypotenuse / 100, -peg/2 - clearance - wall, 0]) rotate(45) square(hypotenuse / 100 / sqrt(2), center = true);
linear_extrude(height, center = true, convexity = 5) for(i = [0:100]) translate([i * -hypotenuse / 100, -peg/2 - clearance - wall, 0]) rotate(45) square(hypotenuse / 100 / sqrt(2) * .9, center = true);
}
*for(a = [0, 1]) mirror([a, a, 0]) {
for(i = [0:10]) translate([i * -hypotenuse / 10, -peg/2 - clearance - wall, height + 1]) cube([.1, 1, height * 2], center = true);
for(i = [0:100]) translate([i * -hypotenuse / 100, -peg/2 - clearance - wall, height + 1]) cube([.1, 1, height], center = true);
}
*for(a = [0, 1]) mirror([a, a, 0]) {
for(i = [0:9]) translate([sin(i * 10) * -hypotenuse, peg/2 + clearance + wall, height + 1]) cube([.1, 1, height * 2], center = true);
for(i = [0:50]) translate([sin(i) * -hypotenuse, +peg/2 + clearance + wall, height + 1]) cube([.1, 1, height], center = true);
}
}

linear_extrude(1, convexity = 5) difference() {
hull() for(i = [0, 1]) translate([0, i * hypotenuse, 0]) circle(peg/2 + clearance + wall / 2);
mirror([1, 1, 0]) hull() for(i = [0, 1]) translate([0, i * hypotenuse, 0]) circle(peg/2 + clearance);
}
}
6 changes: 6 additions & 0 deletions Triangles/ExtrudedTriangle.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Creates a triangle with vertices at the three points shown.
// it is thickness thick (mm)

thickness = 10;

linear_extrude(thickness)polygon([[0,0], [10,17.3],[20,0]]);
28 changes: 28 additions & 0 deletions Triangles/TriangleAngles.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// file Triangle Angles.scad
// Demonstrates that the angles of a triangle sum to 180 degrees
// (c) 2020 Rich Cameron, CC-BY
// measurements in mm

base = 105;
height = 70;
thickness = 20;

top = base * 1.3;

r = 30;

$fs = .1;
$fa = 2;

corners = [[0, 0], [top, height], [base, 0]] - [for(i = [0:2]) [top / 2, height / 2]];

linear_extrude(thickness) {
difference() {
polygon(corners);
for(c = corners) translate(c) circle(r);
}
for(i = [0:2]) translate([i - 1, (i - 1) ? -1 : 1, 0]) intersection() {
polygon(corners);
translate(corners[i]) circle(r);
}
}
35 changes: 35 additions & 0 deletions Triangles/TriangleArea.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// file TraingleArea.scad
//This models consists of a three-part triangle.
// Print out two sets to demonstrate the area of a triangle.
// (c) 2020 Rich Cameron, CC-BY
// measurements in mm

base = 105;
height = 70;
thickness = 20;
twosets = true;

top = base * 1.3; //This is the position of the highest point of the triangle

%translate([0, 0, .1]) square([base, height]);
%color([0, 1, 1, .1]) for(i = [0:base:top]) translate([-i, 0, .1]) polygon([[0, 0], [base, 0], [top, height]]);
#%translate([0, 0, .2]) intersection() {
for(i = [0:base:top]) translate([-i, 0, 0]) polygon([[0, 0], [base, 0], [top, height]]);
square([top % base, height]);
}
color([1, 0, 0, .1]) translate([0, 0, .1]) %square([top % base, height]);

//made triangles thicker for easier handling
linear_extrude(thickness) for(j = twosets ? [0, 1] : [0]) translate(j * [(top % base), height + ceil(top / base) * 2 - 1, 0]) rotate(j * 180) {
for(i = [0:base:top]) translate([0, i / base * 2, 0]) intersection() {
translate([-i, 0, 0]) polygon([[0, 0], [base, 0], [top, height]]);
square([top % base, height]);
}

for(i = [0:base:top]) translate([1 + j * -(base + 2), i / base * 2, 0]) intersection() {
translate([-i, 0, 0]) polygon([[0, 0], [base, 0], [top, height]]);
translate([top % base, 0, 0]) square([base - (top % base), height + ceil(top / base)]);
}
}

echo((((base % base))));
29 changes: 29 additions & 0 deletions Triangles/TriangleAreaBox.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// file TriangleAreaBox.scad
// This model creates a triangular open box that holds together just one
// TriangleArea triangle.
// (c) 2020 Rich Cameron, CC-BY
// measurements in mm

base = 105;
height = 70;
thickness = 20;

$fs = .1;
$fa = 2;

size = [base, height];
wall = 1;
clearance = 1;

linear_extrude(1) offset(clearance + wall) square(size, center = true);

difference() {
linear_extrude(10, convexity = 5) difference() {
offset(wall + clearance) square(size, center = true);
offset(clearance) square(size, center = true);
}
rotate([90, 0, 0]) linear_extrude(100) difference() {
square(size[0] - 15, center = true);
for(i = [0, 1]) mirror([i, 0, 0]) translate([(size[0] - 15) / 2, 0, 0]) scale([.5, 1, 1]) circle(10);
}
}
Loading

0 comments on commit 71deb3e

Please sign in to comment.