-
Notifications
You must be signed in to change notification settings - Fork 0
/
shape_octaplex_24cell.pde
32 lines (31 loc) · 2.01 KB
/
shape_octaplex_24cell.pde
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
FourShape octaplex(FourVector center, float r,color col){
FourVector[] points = {new FourVector(0,0,0,-r).add(center),
new FourVector(0,0,0, r).add(center),
new FourVector(0,0,-r,0).add(center),
new FourVector(0,0, r,0).add(center),
new FourVector(0,-r,0,0).add(center),
new FourVector(0, r,0,0).add(center),
new FourVector(-r,0,0,0).add(center),
new FourVector( r,0,0,0).add(center),
new FourVector( 0.5, 0.5, 0.5, 0.5).mult(r).add(center),
new FourVector( 0.5, 0.5, 0.5,-0.5).mult(r).add(center),
new FourVector( 0.5, 0.5,-0.5, 0.5).mult(r).add(center),
new FourVector( 0.5, 0.5,-0.5,-0.5).mult(r).add(center),
new FourVector( 0.5,-0.5, 0.5, 0.5).mult(r).add(center),
new FourVector( 0.5,-0.5, 0.5,-0.5).mult(r).add(center),
new FourVector( 0.5,-0.5,-0.5, 0.5).mult(r).add(center),
new FourVector( 0.5,-0.5,-0.5,-0.5).mult(r).add(center),
new FourVector(-0.5, 0.5, 0.5, 0.5).mult(r).add(center),
new FourVector(-0.5, 0.5, 0.5,-0.5).mult(r).add(center),
new FourVector(-0.5, 0.5,-0.5, 0.5).mult(r).add(center),
new FourVector(-0.5, 0.5,-0.5,-0.5).mult(r).add(center),
new FourVector(-0.5,-0.5, 0.5, 0.5).mult(r).add(center),
new FourVector(-0.5,-0.5, 0.5,-0.5).mult(r).add(center),
new FourVector(-0.5,-0.5,-0.5, 0.5).mult(r).add(center),
new FourVector(-0.5,-0.5,-0.5,-0.5).mult(r).add(center)};
FourLine[] lines = new FourLine[0];
FourFace[] faces = new FourFace[0];
FourShape out = new FourShape(center,points,lines,faces);
out.makeRegularEdges(col);
return out;
}