-
Notifications
You must be signed in to change notification settings - Fork 1
/
cell5.inc
41 lines (33 loc) · 942 Bytes
/
cell5.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "LongCylinder.inc"
// icosahedron
#declare OuterCell = intersection{
#for( Index, 0, 19 )
#declare F = IFaceArrays[Index];
plane{ PlaneNormDistFromPoints(I[F[0]], I[F[1]], I[F[2]]) +Offset }
#end
#if(Inv2) inverse #end
pigment{ color OutsideColor }
}
#declare InnerCell = intersection{
#for( Index, 0, 19 )
#declare F = IFaceArrays[Index];
plane{ PlaneNormDistFromPoints(I[F[0]], I[F[1]], I[F[2]]) +Offset+Thickness }
#end
#if(Inv2) inverse #end
pigment{ color InsideColor }
}
#declare HollowCell = difference{
object{ OuterCell }
object{ InnerCell }
}
#declare IcosahedronEdges = union{
#for( Index, 0, 29 )
#local EdgeArray = IEdgeArrays[Index];
LongCylinder(I[EdgeArray[0]], I[EdgeArray[1]], Radius)
#end
pigment{color InsideColor}
}
#declare Cell5 = intersection{
object{ HollowCell }
object{ IcosahedronEdges }
}