|
![](/i/fill.gif) |
(1) After you rotate the box corner to the xz plane
the coordinates of the corner are now <sqrt(2),a>,
so to get the angle you just convert to polar coordinates,
there's a button for that on my caclulator.
(2) Three spheres form a triangle, the radius
of a circumscribed circle around a triangle is
a*sqrt(3)/3, so you have the first three spheres
by rotating them. Then four spheres form a
tetrahedron, the height of a tetrahedron is
a*sqrt(2/3), so you have the forth sphere.
(3) A sphere fit inside a tetrahedron (the insphere)
has a radius of a*0.5*sqrt(6), so we have the
location of the center sphere. Then the radius
of the circumsphere is a*sqrt(2/3), so that's the
distance from the center to the corners, and
the radius of the inner sphere is that distance
minus the bigger sphere radius.
#include "colors.inc"
global_settings {
assumed_gamma 1.0
max_trace_level 10
}
camera {
location <0.0, 1.5, -5.0>
direction 1.5*z
right x*image_width/image_height
look_at <0.0, 0.5, 0.0>
}
light_source {
<0, 0, 0>
color rgb <1, 1, 1>
translate <-30, 30, -30>
}
// ground plane
plane { y, 0 pigment {checker Tan Gray50}}
// a box with a single rotate
union {
box {0,1 rotate <45,54.73561,90>} // (sqrt 2),1 -> toPolar
cylinder {<0,0,0>,<0,100,0>,0.005} // axis marker
pigment {Red}
translate -x
}
// four spheres (close packed tetrahedral)
#declare sRad = 0.5; // sphere radius
#declare a = 2*sRad; // tetrahedral side length
#declare r = 0.5773503*a; // circumscribed circle radius: a*sqrt(3)/3
#declare h = 0.816496*a; // height of tetrahedron: a*sqrt(2/3)
union {
sphere {<0,sRad,r>,sRad}
sphere {<0,sRad,r>,sRad rotate <0, 120,0>}
sphere {<0,sRad,r>,sRad rotate <0,-120,0>}
sphere {<0,h+sRad,0>,sRad}
// a sphere inside four close packed spheres
#declare ir = 0.204124*a; // inradius: a*0.5*sqrt(6)
#declare cs = 0.6123724*a; // circumsphere radius: a*sqrt(2/3)
sphere {<0,ir+sRad,0>,cs-sRad pigment {Blue}}
pigment {Green transmit 0.5}
translate x
}
Post a reply to this message
|
![](/i/fill.gif) |