/
blue.pov
57 lines (50 loc) · 1.75 KB
/
blue.pov
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "projection.inc"
union{
// VERTICES
union{
#for( i, FirstVertex, dimension_size(VertexPoints, 1)-1 )
#local Rank = VertexRanks[i];
#local Rad = RankToVertexRad(Rank);
sphere{ VertexPoints[i]*Factor, Rad
#if(VertexRankParities[i])
pigment{color rgb DarkVertexColor}
#else
pigment{color LightVertexColor}
#end
}
#end
}
// EDGES
union{
#for( i, 0, dimension_size(EdgeIndices, 1)-1 )
#local EdgeIndex = EdgeIndices[i];
#local Edge = EdgeArrays[EdgeIndex];
#local VertexIndex1 = Edge[0];
#local VertexIndex2 = Edge[1];
#local Point1 = VertexPoints[VertexIndex1]*Factor;
#local Point2 = VertexPoints[VertexIndex2]*Factor;
#local Rank1 = VertexRanks[VertexIndex1];
#local Rank2 = VertexRanks[VertexIndex2];
#local Rad1 = RankToEdgeRad(Rank1);
#local Rad2 = RankToEdgeRad(Rank2);
cone{ Point1, Rad1, Point2, Rad2 }
#end
pigment{color rgb .5}
}
// FACES
union{
#for( i, 0, dimension_size(FaceIndices, 1)-1 )
#local FaceIndex = FaceIndices[i];
#local FaceArray = FaceArrays[FaceIndex];
#local LenOfFaceArray = dimension_size(FaceArray, 1);
polygon{ LenOfFaceArray,
#for(VertexIndexInFace, 0, LenOfFaceArray-1)
#local VertexIndexInPolytope = FaceArray[VertexIndexInFace];
VertexPoints[VertexIndexInPolytope]*Factor
#end
}
#end
pigment{color rgbt BlueFaceColor}
}
Rotate()
}