Final Project
My idea for the OpenSCAD final project is expanding on my bracelet thing I made for the 20 objects. It already looks pretty good and I had written a decent amount of code for it, but I think expanding on it would be pretty interesting. I think I could create something that would look pretty and creative.
What I decided to do with my bracelet is take the idea and make it into some sort of astro-earth looking form with surrounding magnetic field cylinder things. I thought I would make the bracelet into an orb looking thing that has three different kinds of elements to it. One ring will be like the bracelet shape below.
Next, I encoded a large ring made out of cylinders around the bracelet perpendicular to it as seen below.
I wanted to leave some of the cylinders on the outer sides, but bring the ring into the same distance as the bracelet looking design. I coded that some cylinders would stay on the outer sides and changed the second part of it to be translated 180 instead of 360. Which produced this:
Next I added a ring of balls in the middle part:
Once again, I wanted to expand the balls so they would be the same as the other two rings to connect them.
I had to make sure the balls were the same distance all around. This produced the final image.
Above is the design of the object.
Below is the code for this object:
Final Code:
$fn=20;
for(r=[0:30:360])
rotate([0,r,0])translate([0,0,19])join(2)
{ rotate([0,15,0])translate([5,0,0])torus(1,3);
mirror([1,0,0])
rotate([0,15,0])translate([5,0,0])torus(1,3);}
module join(w){
children();
segs=4;
for(i=[0:w/segs:w])
{ planecutX(1+i, 1-(i/w)*0.8)
children(0);
planecutX(-1-i, 1-(i/w)*0.8)
children(1);}}
module planecutX(offs=0,s=0.75)
{rotate([0,-90,0])
translate([0,0,-offs])
mirror([0,0,min(0,sign(offs))])
linear_extrude( abs(offs),scale=max(0,s))
projection(cut = true) {
translate([0,0,offs])rotate([0,90,0])children();
//translate([0,0,-offs])rotate([0,90,0])children();
}}
module torus(r1=1,r2=3)
{rotate_extrude()
translate([r2,0,0])circle(r1);}
for (i = [0:10]) {
echo(360*i/6, sin(360*i/6)*40, cos(360*i/6)*40);
translate([sin(360*i/6)*40, cos(360*i/6)*40, 0 ])
cylinder(h = 5, r=5);
}
for (i = [0 : 0.1 : 6]) {
echo(180*i/6, sin(360*i/6)*20, cos(360*i/6)*20);
translate([sin(360*i/6)*20, cos(360*i/6)*20, 0 ])
cylinder(h = 2, r=2);
}
for ( i = [0 : 0.04 : 20] ){
rotate( i * 50, [1, 0, 0])
translate([0, 20, 0])
sphere(r = 1.2);
}