From:
I got the code for interlocking Tetrahedron (in color):
"
$fn=30;
v=[
[+1,+1,+1],
[+1,-1,-1],
[-1,+1,-1],
[-1,-1,+1],
];
colors=["red","green","blue","yellow","purple"];
module tetrahedron(len,thick)
{
for(a=[0:2])
for(b=[a+1:3])
hull() {
translate(v[a]*len) sphere(r=thick);
translate(v[b]*len) sphere(r=thick);
}
}
for(i=[0:4])
{
color(colors[i])
rotate([0,-atan(sqrt(5)/2-0.5), i*360/5])
tetrahedron(20,2);
}
"
And elsewhere, I discovered it can also be done by connecting
the vertices of a dodecahedron.
What I'd like to do is add the dodecahedron (transparent) with
the interlocking tetrahedrons to be able to show just how the
vertices connect.
I tried doing it in Blender, but, I can't color the edges.
Without being able to color the edges, it's all black and there's
no clear way to determine easily which edges identify each
tetrahedron (as is shown here).
Anyone?
He also mentions adding the code:
"rotate($t*360)"
but is unclear as to where in the initial code that would go, to work.
Last line? Maybe.
Thanx
--
View this message in context: http://forum.openscad.org/Dodecahedron-Intersecting-Tetrahedra-with-Dodecahedron-tp21222.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Figured out, at least for this code, the rotation:
"
$fn=30;
v=[
[+1,+1,+1],
[+1,-1,-1],
[-1,+1,-1],
[-1,-1,+1],
];
colors=["red","green","blue","yellow","purple"];
module tetrahedron(len,thick)
{
for(a=[0:2])
for(b=[a+1:3])
hull() {
translate(v[a]*len) sphere(r=thick);
translate(v[b]*len) sphere(r=thick);
}
}
for(i=[0:4])
{
color(colors[i])
rotate([0,-atan(sqrt(5)/2-0.5), i360/5])
rotate([0,0,$t360]) translate([0,0,0]) tetrahedron(20,.25); //
(diameter, stick size)
}
"
--
View this message in context: http://forum.openscad.org/Dodecahedron-Intersecting-Tetrahedra-with-Dodecahedron-tp21222p21223.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Add this to your code:
%hull()
for(i=[0:4])
{
rotate([0,-atan(sqrt(5)/2-0.5), i360/5])
rotate([0,0,$t360]) translate([0,0,0])
for(vi=v)
translate(vi*20) sphere(.25);
}
Instead of spheres, you may use a cube for faster display.