Thingiverse
Sphere Spring (Spherical Spiral)
21
Downloads
11
Likes
0
Makes
Made in OpenScad using sin and cos:
-------
$fn=7;
pi = 3.14;
k = 57.2;//1 radian
iterations = 400;
turns = 10;
c = turns*2;
r = 1.0;//radius 1 (unit sphere)
ti = 0;
tf = pi*k;
td = tf/iterations;//step
for (t=[ti:td:tf-td]) {
//echo(floor(t/td));
t1 = t;
t2 = t+td;
x1 = r * sin(t1) * cos(c*t1);
y1 = r * sin(t1) * sin(c*t1);
z1 = r * cos(t1);
x2 = r * sin(t2) * cos(c*t2);
y2 = r * sin(t2) * sin(c*t2);
z2 = r * cos(t2);
hull() {
translate([x1,y1,z1]) {
sphere(r=0.05, $fa = .1, $fs = .1);
}
translate([x2,y2,z2]) {
sphere(r=0.05, $fa = .1, $fs = .1);
}
}
}
-------
$fn=7;
pi = 3.14;
k = 57.2;//1 radian
iterations = 400;
turns = 10;
c = turns*2;
r = 1.0;//radius 1 (unit sphere)
ti = 0;
tf = pi*k;
td = tf/iterations;//step
for (t=[ti:td:tf-td]) {
//echo(floor(t/td));
t1 = t;
t2 = t+td;
x1 = r * sin(t1) * cos(c*t1);
y1 = r * sin(t1) * sin(c*t1);
z1 = r * cos(t1);
x2 = r * sin(t2) * cos(c*t2);
y2 = r * sin(t2) * sin(c*t2);
z2 = r * cos(t2);
hull() {
translate([x1,y1,z1]) {
sphere(r=0.05, $fa = .1, $fs = .1);
}
translate([x2,y2,z2]) {
sphere(r=0.05, $fa = .1, $fs = .1);
}
}
}
Did you print this model? Sign in and share your make!
Sign in to leave a comment
Sign inNo comments yet – be the first!