Skip to content

Instantly share code, notes, and snippets.

@syntagmatic
Last active February 7, 2018 16:58
Show Gist options
  • Save syntagmatic/e6583e486f6df0c86b0f to your computer and use it in GitHub Desktop.
Save syntagmatic/e6583e486f6df0c86b0f to your computer and use it in GitHub Desktop.
Tetraplex
120
2 0 0 0
-2 0 0 0
0 2 0 0
0 -2 0 0
0 0 2 0
0 0 -2 0
0 0 0 2
0 0 0 -2
0 1 0.618034 1.61803
0 -1 0.618034 1.61803
0 1 -0.618034 1.61803
0 1 0.618034 -1.61803
0 -1 -0.618034 1.61803
0 -1 0.618034 -1.61803
0 1 -0.618034 -1.61803
0 -1 -0.618034 -1.61803
0 0.618034 1.61803 1
0 -0.618034 1.61803 1
0 0.618034 -1.61803 1
0 0.618034 1.61803 -1
0 -0.618034 -1.61803 1
0 -0.618034 1.61803 -1
0 0.618034 -1.61803 -1
0 -0.618034 -1.61803 -1
0 1.61803 1 0.618034
0 -1.61803 1 0.618034
0 1.61803 -1 0.618034
0 1.61803 1 -0.618034
0 -1.61803 -1 0.618034
0 -1.61803 1 -0.618034
0 1.61803 -1 -0.618034
0 -1.61803 -1 -0.618034
1 0 1.61803 0.618034
-1 0 1.61803 0.618034
1 0 -1.61803 0.618034
1 0 1.61803 -0.618034
-1 0 -1.61803 0.618034
-1 0 1.61803 -0.618034
1 0 -1.61803 -0.618034
-1 0 -1.61803 -0.618034
0.618034 0 1 1.61803
-0.618034 0 1 1.61803
0.618034 0 -1 1.61803
0.618034 0 1 -1.61803
-0.618034 0 -1 1.61803
-0.618034 0 1 -1.61803
0.618034 0 -1 -1.61803
-0.618034 0 -1 -1.61803
1.61803 0 0.618034 1
-1.61803 0 0.618034 1
1.61803 0 -0.618034 1
1.61803 0 0.618034 -1
-1.61803 0 -0.618034 1
-1.61803 0 0.618034 -1
1.61803 0 -0.618034 -1
-1.61803 0 -0.618034 -1
0.618034 1.61803 0 1
-0.618034 1.61803 0 1
0.618034 -1.61803 0 1
0.618034 1.61803 0 -1
-0.618034 -1.61803 0 1
-0.618034 1.61803 0 -1
0.618034 -1.61803 0 -1
-0.618034 -1.61803 0 -1
1.61803 1 0 0.618034
-1.61803 1 0 0.618034
1.61803 -1 0 0.618034
1.61803 1 0 -0.618034
-1.61803 -1 0 0.618034
-1.61803 1 0 -0.618034
1.61803 -1 0 -0.618034
-1.61803 -1 0 -0.618034
1 0.618034 0 1.61803
-1 0.618034 0 1.61803
1 -0.618034 0 1.61803
1 0.618034 0 -1.61803
-1 -0.618034 0 1.61803
-1 0.618034 0 -1.61803
1 -0.618034 0 -1.61803
-1 -0.618034 0 -1.61803
1.61803 0.618034 1 0
-1.61803 0.618034 1 0
1.61803 -0.618034 1 0
1.61803 0.618034 -1 0
-1.61803 -0.618034 1 0
-1.61803 0.618034 -1 0
1.61803 -0.618034 -1 0
-1.61803 -0.618034 -1 0
1 1.61803 0.618034 0
-1 1.61803 0.618034 0
1 -1.61803 0.618034 0
1 1.61803 -0.618034 0
-1 -1.61803 0.618034 0
-1 1.61803 -0.618034 0
1 -1.61803 -0.618034 0
-1 -1.61803 -0.618034 0
0.618034 1 1.61803 0
-0.618034 1 1.61803 0
0.618034 -1 1.61803 0
0.618034 1 -1.61803 0
-0.618034 -1 1.61803 0
-0.618034 1 -1.61803 0
0.618034 -1 -1.61803 0
-0.618034 -1 -1.61803 0
1 1 1 1
-1 1 1 1
1 -1 1 1
1 1 -1 1
1 1 1 -1
-1 -1 1 1
-1 1 -1 1
-1 1 1 -1
1 -1 -1 1
1 -1 1 -1
1 1 -1 -1
-1 -1 -1 1
-1 -1 1 -1
-1 1 -1 -1
1 -1 -1 -1
-1 -1 -1 -1
720
0 48
48 50
50 0
48 64
64 0
50 64
48 66
66 0
50 66
48 80
80 0
64 80
48 82
82 0
66 82
80 82
50 83
83 0
64 83
50 86
86 0
66 86
83 86
0 51
51 54
54 0
51 67
67 0
54 67
51 70
70 0
54 70
51 80
67 80
51 82
70 82
54 83
67 83
54 86
70 86
64 67
66 70
1 49
49 52
52 1
49 65
65 1
52 65
49 68
68 1
52 68
49 81
81 1
65 81
49 84
84 1
68 84
81 84
52 85
85 1
65 85
52 87
87 1
68 87
85 87
1 53
53 55
55 1
53 69
69 1
55 69
53 71
71 1
55 71
53 81
69 81
53 84
71 84
55 85
69 85
55 87
71 87
65 69
68 71
2 24
24 27
27 2
24 88
88 2
27 88
24 89
89 2
27 89
24 56
56 2
24 57
57 2
56 57
56 88
57 89
2 26
26 30
30 2
26 91
91 2
30 91
26 93
93 2
30 93
26 56
26 57
56 91
57 93
27 59
59 2
27 61
61 2
59 61
59 88
61 89
30 59
30 61
59 91
61 93
88 91
89 93
3 25
25 29
29 3
25 90
90 3
29 90
25 92
92 3
29 92
25 58
58 3
25 60
60 3
58 60
58 90
60 92
3 28
28 31
31 3
28 94
94 3
31 94
28 95
95 3
31 95
28 58
28 60
58 94
60 95
29 62
62 3
29 63
63 3
62 63
62 90
63 92
31 62
31 63
62 94
63 95
90 94
92 95
4 16
16 17
17 4
16 32
32 4
17 32
16 33
33 4
17 33
16 96
96 4
32 96
16 97
97 4
33 97
96 97
17 98
98 4
32 98
17 100
100 4
33 100
98 100
4 19
19 21
21 4
19 35
35 4
21 35
19 37
37 4
21 37
19 96
35 96
19 97
37 97
21 98
35 98
21 100
37 100
32 35
33 37
5 18
18 20
20 5
18 34
34 5
20 34
18 36
36 5
20 36
18 99
99 5
34 99
18 101
101 5
36 101
99 101
20 102
102 5
34 102
20 103
103 5
36 103
102 103
5 22
22 23
23 5
22 38
38 5
23 38
22 39
39 5
23 39
22 99
38 99
22 101
39 101
23 102
38 102
23 103
39 103
34 38
36 39
6 8
8 10
10 6
8 72
72 6
10 72
8 73
73 6
10 73
8 40
40 6
8 41
41 6
40 41
40 72
41 73
6 9
9 12
12 6
9 74
74 6
12 74
9 76
76 6
12 76
9 40
9 41
40 74
41 76
10 42
42 6
10 44
44 6
42 44
42 72
44 73
12 42
12 44
42 74
44 76
72 74
73 76
7 11
11 14
14 7
11 75
75 7
14 75
11 77
77 7
14 77
11 43
43 7
11 45
45 7
43 45
43 75
45 77
7 13
13 15
15 7
13 78
78 7
15 78
13 79
79 7
15 79
13 43
13 45
43 78
45 79
14 46
46 7
14 47
47 7
46 47
46 75
47 77
15 46
15 47
46 78
47 79
75 78
77 79
10 56
56 8
10 57
57 8
56 72
57 73
8 16
16 24
24 8
16 104
104 8
24 104
16 105
105 8
24 105
16 40
16 41
40 104
41 105
56 104
57 105
72 104
73 105
12 58
58 9
12 60
60 9
58 74
60 76
9 17
17 25
25 9
17 106
106 9
25 106
17 109
109 9
25 109
17 40
17 41
40 106
41 109
58 106
60 109
74 106
76 109
10 18
18 26
26 10
18 107
107 10
26 107
18 110
110 10
26 110
18 42
18 44
42 107
44 110
56 107
57 110
72 107
73 110
14 59
59 11
14 61
61 11
59 75
61 77
11 19
19 27
27 11
19 108
108 11
27 108
19 111
111 11
27 111
19 43
19 45
43 108
45 111
59 108
61 111
75 108
77 111
12 20
20 28
28 12
20 112
112 12
28 112
20 115
115 12
28 115
20 42
20 44
42 112
44 115
58 112
60 115
74 112
76 115
15 62
62 13
15 63
63 13
62 78
63 79
13 21
21 29
29 13
21 113
113 13
29 113
21 116
116 13
29 116
21 43
21 45
43 113
45 116
62 113
63 116
78 113
79 116
14 22
22 30
30 14
22 114
114 14
30 114
22 117
117 14
30 117
22 46
22 47
46 114
47 117
59 114
61 117
75 114
77 117
15 23
23 31
31 15
23 118
118 15
31 118
23 119
119 15
31 119
23 46
23 47
46 118
47 119
62 118
63 119
78 118
79 119
32 40
33 41
24 96
24 97
96 104
97 105
32 104
33 105
25 98
25 100
98 106
100 109
32 106
33 109
34 42
36 44
26 99
26 101
99 107
101 110
34 107
36 110
35 43
37 45
27 96
27 97
96 108
97 111
35 108
37 111
28 102
28 103
102 112
103 115
34 112
36 115
29 98
29 100
98 113
100 116
35 113
37 116
38 46
39 47
30 99
30 101
99 114
101 117
38 114
39 117
31 102
31 103
102 118
103 119
38 118
39 119
88 96
89 97
88 104
89 105
90 98
92 100
90 106
92 109
91 99
93 101
91 107
93 110
88 108
89 111
94 102
95 103
94 112
95 115
90 113
92 116
91 114
93 117
94 118
95 119
35 80
80 32
35 82
82 32
80 96
82 98
40 48
48 32
48 104
48 106
80 104
82 106
37 81
81 33
37 84
84 33
81 97
84 100
41 49
49 33
49 105
49 109
81 105
84 109
38 83
83 34
38 86
86 34
83 99
86 102
42 50
50 34
50 107
50 112
83 107
86 112
43 51
51 35
51 108
51 113
80 108
82 113
39 85
85 36
39 87
87 36
85 101
87 103
44 52
52 36
52 110
52 115
85 110
87 115
45 53
53 37
53 111
53 116
81 111
84 116
46 54
54 38
54 114
54 118
83 114
86 118
47 55
55 39
55 117
55 119
85 117
87 119
48 72
48 74
49 73
49 76
50 72
50 74
51 75
51 78
52 73
52 76
53 77
53 79
54 75
54 78
55 77
55 79
64 72
66 74
64 104
66 106
65 73
68 76
65 105
68 109
64 107
66 112
67 75
70 78
67 108
70 113
65 110
68 115
69 77
71 79
69 111
71 116
67 114
70 118
69 117
71 119
56 64
64 88
64 91
57 65
65 89
65 93
58 66
66 90
66 94
59 67
67 88
67 91
60 68
68 92
68 95
61 69
69 89
69 93
62 70
70 90
70 94
63 71
71 92
71 95
80 88
83 91
81 89
85 93
82 90
86 94
84 92
87 95
1200
3 0 48 50
3 0 48 64
3 0 50 64
3 48 50 64
3 0 48 66
3 0 50 66
3 48 50 66
3 0 48 80
3 0 64 80
3 48 64 80
3 0 48 82
3 0 66 82
3 48 66 82
3 0 80 82
3 48 80 82
3 0 50 83
3 0 64 83
3 50 64 83
3 0 50 86
3 0 66 86
3 50 66 86
3 0 83 86
3 50 83 86
3 0 51 54
3 0 51 67
3 0 54 67
3 51 54 67
3 0 51 70
3 0 54 70
3 51 54 70
3 0 51 80
3 0 67 80
3 51 67 80
3 0 51 82
3 0 70 82
3 51 70 82
3 51 80 82
3 0 54 83
3 0 67 83
3 54 67 83
3 0 54 86
3 0 70 86
3 54 70 86
3 54 83 86
3 0 64 67
3 64 67 80
3 64 67 83
3 0 66 70
3 66 70 82
3 66 70 86
3 1 49 52
3 1 49 65
3 1 52 65
3 49 52 65
3 1 49 68
3 1 52 68
3 49 52 68
3 1 49 81
3 1 65 81
3 49 65 81
3 1 49 84
3 1 68 84
3 49 68 84
3 1 81 84
3 49 81 84
3 1 52 85
3 1 65 85
3 52 65 85
3 1 52 87
3 1 68 87
3 52 68 87
3 1 85 87
3 52 85 87
3 1 53 55
3 1 53 69
3 1 55 69
3 53 55 69
3 1 53 71
3 1 55 71
3 53 55 71
3 1 53 81
3 1 69 81
3 53 69 81
3 1 53 84
3 1 71 84
3 53 71 84
3 53 81 84
3 1 55 85
3 1 69 85
3 55 69 85
3 1 55 87
3 1 71 87
3 55 71 87
3 55 85 87
3 1 65 69
3 65 69 81
3 65 69 85
3 1 68 71
3 68 71 84
3 68 71 87
3 2 24 27
3 2 24 88
3 2 27 88
3 24 27 88
3 2 24 89
3 2 27 89
3 24 27 89
3 2 24 56
3 2 24 57
3 2 56 57
3 24 56 57
3 2 56 88
3 24 56 88
3 2 57 89
3 24 57 89
3 2 26 30
3 2 26 91
3 2 30 91
3 26 30 91
3 2 26 93
3 2 30 93
3 26 30 93
3 2 26 56
3 2 26 57
3 26 56 57
3 2 56 91
3 26 56 91
3 2 57 93
3 26 57 93
3 2 27 59
3 2 27 61
3 2 59 61
3 27 59 61
3 2 59 88
3 27 59 88
3 2 61 89
3 27 61 89
3 2 30 59
3 2 30 61
3 30 59 61
3 2 59 91
3 30 59 91
3 2 61 93
3 30 61 93
3 2 88 91
3 56 88 91
3 2 89 93
3 57 89 93
3 59 88 91
3 61 89 93
3 3 25 29
3 3 25 90
3 3 29 90
3 25 29 90
3 3 25 92
3 3 29 92
3 25 29 92
3 3 25 58
3 3 25 60
3 3 58 60
3 25 58 60
3 3 58 90
3 25 58 90
3 3 60 92
3 25 60 92
3 3 28 31
3 3 28 94
3 3 31 94
3 28 31 94
3 3 28 95
3 3 31 95
3 28 31 95
3 3 28 58
3 3 28 60
3 28 58 60
3 3 58 94
3 28 58 94
3 3 60 95
3 28 60 95
3 3 29 62
3 3 29 63
3 3 62 63
3 29 62 63
3 3 62 90
3 29 62 90
3 3 63 92
3 29 63 92
3 3 31 62
3 3 31 63
3 31 62 63
3 3 62 94
3 31 62 94
3 3 63 95
3 31 63 95
3 3 90 94
3 58 90 94
3 3 92 95
3 60 92 95
3 62 90 94
3 63 92 95
3 4 16 17
3 4 16 32
3 4 17 32
3 16 17 32
3 4 16 33
3 4 17 33
3 16 17 33
3 4 16 96
3 4 32 96
3 16 32 96
3 4 16 97
3 4 33 97
3 16 33 97
3 4 96 97
3 16 96 97
3 4 17 98
3 4 32 98
3 17 32 98
3 4 17 100
3 4 33 100
3 17 33 100
3 4 98 100
3 17 98 100
3 4 19 21
3 4 19 35
3 4 21 35
3 19 21 35
3 4 19 37
3 4 21 37
3 19 21 37
3 4 19 96
3 4 35 96
3 19 35 96
3 4 19 97
3 4 37 97
3 19 37 97
3 19 96 97
3 4 21 98
3 4 35 98
3 21 35 98
3 4 21 100
3 4 37 100
3 21 37 100
3 21 98 100
3 4 32 35
3 32 35 96
3 32 35 98
3 4 33 37
3 33 37 97
3 33 37 100
3 5 18 20
3 5 18 34
3 5 20 34
3 18 20 34
3 5 18 36
3 5 20 36
3 18 20 36
3 5 18 99
3 5 34 99
3 18 34 99
3 5 18 101
3 5 36 101
3 18 36 101
3 5 99 101
3 18 99 101
3 5 20 102
3 5 34 102
3 20 34 102
3 5 20 103
3 5 36 103
3 20 36 103
3 5 102 103
3 20 102 103
3 5 22 23
3 5 22 38
3 5 23 38
3 22 23 38
3 5 22 39
3 5 23 39
3 22 23 39
3 5 22 99
3 5 38 99
3 22 38 99
3 5 22 101
3 5 39 101
3 22 39 101
3 22 99 101
3 5 23 102
3 5 38 102
3 23 38 102
3 5 23 103
3 5 39 103
3 23 39 103
3 23 102 103
3 5 34 38
3 34 38 99
3 34 38 102
3 5 36 39
3 36 39 101
3 36 39 103
3 6 8 10
3 6 8 72
3 6 10 72
3 8 10 72
3 6 8 73
3 6 10 73
3 8 10 73
3 6 8 40
3 6 8 41
3 6 40 41
3 8 40 41
3 6 40 72
3 8 40 72
3 6 41 73
3 8 41 73
3 6 9 12
3 6 9 74
3 6 12 74
3 9 12 74
3 6 9 76
3 6 12 76
3 9 12 76
3 6 9 40
3 6 9 41
3 9 40 41
3 6 40 74
3 9 40 74
3 6 41 76
3 9 41 76
3 6 10 42
3 6 10 44
3 6 42 44
3 10 42 44
3 6 42 72
3 10 42 72
3 6 44 73
3 10 44 73
3 6 12 42
3 6 12 44
3 12 42 44
3 6 42 74
3 12 42 74
3 6 44 76
3 12 44 76
3 6 72 74
3 40 72 74
3 6 73 76
3 41 73 76
3 42 72 74
3 44 73 76
3 7 11 14
3 7 11 75
3 7 14 75
3 11 14 75
3 7 11 77
3 7 14 77
3 11 14 77
3 7 11 43
3 7 11 45
3 7 43 45
3 11 43 45
3 7 43 75
3 11 43 75
3 7 45 77
3 11 45 77
3 7 13 15
3 7 13 78
3 7 15 78
3 13 15 78
3 7 13 79
3 7 15 79
3 13 15 79
3 7 13 43
3 7 13 45
3 13 43 45
3 7 43 78
3 13 43 78
3 7 45 79
3 13 45 79
3 7 14 46
3 7 14 47
3 7 46 47
3 14 46 47
3 7 46 75
3 14 46 75
3 7 47 77
3 14 47 77
3 7 15 46
3 7 15 47
3 15 46 47
3 7 46 78
3 15 46 78
3 7 47 79
3 15 47 79
3 7 75 78
3 43 75 78
3 7 77 79
3 45 77 79
3 46 75 78
3 47 77 79
3 8 10 56
3 8 10 57
3 8 56 57
3 10 56 57
3 8 56 72
3 10 56 72
3 8 57 73
3 10 57 73
3 8 16 24
3 8 16 104
3 8 24 104
3 16 24 104
3 8 16 105
3 8 24 105
3 16 24 105
3 8 16 40
3 8 16 41
3 16 40 41
3 8 40 104
3 16 40 104
3 8 41 105
3 16 41 105
3 8 24 56
3 8 24 57
3 8 56 104
3 24 56 104
3 8 57 105
3 24 57 105
3 8 72 104
3 40 72 104
3 8 73 105
3 41 73 105
3 56 72 104
3 57 73 105
3 9 12 58
3 9 12 60
3 9 58 60
3 12 58 60
3 9 58 74
3 12 58 74
3 9 60 76
3 12 60 76
3 9 17 25
3 9 17 106
3 9 25 106
3 17 25 106
3 9 17 109
3 9 25 109
3 17 25 109
3 9 17 40
3 9 17 41
3 17 40 41
3 9 40 106
3 17 40 106
3 9 41 109
3 17 41 109
3 9 25 58
3 9 25 60
3 9 58 106
3 25 58 106
3 9 60 109
3 25 60 109
3 9 74 106
3 40 74 106
3 9 76 109
3 41 76 109
3 58 74 106
3 60 76 109
3 10 18 26
3 10 18 107
3 10 26 107
3 18 26 107
3 10 18 110
3 10 26 110
3 18 26 110
3 10 18 42
3 10 18 44
3 18 42 44
3 10 42 107
3 18 42 107
3 10 44 110
3 18 44 110
3 10 26 56
3 10 26 57
3 10 56 107
3 26 56 107
3 10 57 110
3 26 57 110
3 10 72 107
3 42 72 107
3 10 73 110
3 44 73 110
3 56 72 107
3 57 73 110
3 11 14 59
3 11 14 61
3 11 59 61
3 14 59 61
3 11 59 75
3 14 59 75
3 11 61 77
3 14 61 77
3 11 19 27
3 11 19 108
3 11 27 108
3 19 27 108
3 11 19 111
3 11 27 111
3 19 27 111
3 11 19 43
3 11 19 45
3 19 43 45
3 11 43 108
3 19 43 108
3 11 45 111
3 19 45 111
3 11 27 59
3 11 27 61
3 11 59 108
3 27 59 108
3 11 61 111
3 27 61 111
3 11 75 108
3 43 75 108
3 11 77 111
3 45 77 111
3 59 75 108
3 61 77 111
3 12 20 28
3 12 20 112
3 12 28 112
3 20 28 112
3 12 20 115
3 12 28 115
3 20 28 115
3 12 20 42
3 12 20 44
3 20 42 44
3 12 42 112
3 20 42 112
3 12 44 115
3 20 44 115
3 12 28 58
3 12 28 60
3 12 58 112
3 28 58 112
3 12 60 115
3 28 60 115
3 12 74 112
3 42 74 112
3 12 76 115
3 44 76 115
3 58 74 112
3 60 76 115
3 13 15 62
3 13 15 63
3 13 62 63
3 15 62 63
3 13 62 78
3 15 62 78
3 13 63 79
3 15 63 79
3 13 21 29
3 13 21 113
3 13 29 113
3 21 29 113
3 13 21 116
3 13 29 116
3 21 29 116
3 13 21 43
3 13 21 45
3 21 43 45
3 13 43 113
3 21 43 113
3 13 45 116
3 21 45 116
3 13 29 62
3 13 29 63
3 13 62 113
3 29 62 113
3 13 63 116
3 29 63 116
3 13 78 113
3 43 78 113
3 13 79 116
3 45 79 116
3 62 78 113
3 63 79 116
3 14 22 30
3 14 22 114
3 14 30 114
3 22 30 114
3 14 22 117
3 14 30 117
3 22 30 117
3 14 22 46
3 14 22 47
3 22 46 47
3 14 46 114
3 22 46 114
3 14 47 117
3 22 47 117
3 14 30 59
3 14 30 61
3 14 59 114
3 30 59 114
3 14 61 117
3 30 61 117
3 14 75 114
3 46 75 114
3 14 77 117
3 47 77 117
3 59 75 114
3 61 77 117
3 15 23 31
3 15 23 118
3 15 31 118
3 23 31 118
3 15 23 119
3 15 31 119
3 23 31 119
3 15 23 46
3 15 23 47
3 23 46 47
3 15 46 118
3 23 46 118
3 15 47 119
3 23 47 119
3 15 31 62
3 15 31 63
3 15 62 118
3 31 62 118
3 15 63 119
3 31 63 119
3 15 78 118
3 46 78 118
3 15 79 119
3 47 79 119
3 62 78 118
3 63 79 119
3 16 17 40
3 16 32 40
3 17 32 40
3 16 17 41
3 16 33 41
3 17 33 41
3 16 24 96
3 16 24 97
3 24 96 97
3 16 96 104
3 24 96 104
3 16 97 105
3 24 97 105
3 16 32 104
3 32 40 104
3 32 96 104
3 16 33 105
3 33 41 105
3 33 97 105
3 17 25 98
3 17 25 100
3 25 98 100
3 17 98 106
3 25 98 106
3 17 100 109
3 25 100 109
3 17 32 106
3 32 40 106
3 32 98 106
3 17 33 109
3 33 41 109
3 33 100 109
3 18 20 42
3 18 34 42
3 20 34 42
3 18 20 44
3 18 36 44
3 20 36 44
3 18 26 99
3 18 26 101
3 26 99 101
3 18 99 107
3 26 99 107
3 18 101 110
3 26 101 110
3 18 34 107
3 34 42 107
3 34 99 107
3 18 36 110
3 36 44 110
3 36 101 110
3 19 21 43
3 19 35 43
3 21 35 43
3 19 21 45
3 19 37 45
3 21 37 45
3 19 27 96
3 19 27 97
3 27 96 97
3 19 96 108
3 27 96 108
3 19 97 111
3 27 97 111
3 19 35 108
3 35 43 108
3 35 96 108
3 19 37 111
3 37 45 111
3 37 97 111
3 20 28 102
3 20 28 103
3 28 102 103
3 20 102 112
3 28 102 112
3 20 103 115
3 28 103 115
3 20 34 112
3 34 42 112
3 34 102 112
3 20 36 115
3 36 44 115
3 36 103 115
3 21 29 98
3 21 29 100
3 29 98 100
3 21 98 113
3 29 98 113
3 21 100 116
3 29 100 116
3 21 35 113
3 35 43 113
3 35 98 113
3 21 37 116
3 37 45 116
3 37 100 116
3 22 23 46
3 22 38 46
3 23 38 46
3 22 23 47
3 22 39 47
3 23 39 47
3 22 30 99
3 22 30 101
3 30 99 101
3 22 99 114
3 30 99 114
3 22 101 117
3 30 101 117
3 22 38 114
3 38 46 114
3 38 99 114
3 22 39 117
3 39 47 117
3 39 101 117
3 23 31 102
3 23 31 103
3 31 102 103
3 23 102 118
3 31 102 118
3 23 103 119
3 31 103 119
3 23 38 118
3 38 46 118
3 38 102 118
3 23 39 119
3 39 47 119
3 39 103 119
3 24 27 96
3 24 88 96
3 27 88 96
3 24 27 97
3 24 89 97
3 27 89 97
3 24 88 104
3 56 88 104
3 24 89 105
3 57 89 105
3 88 96 104
3 89 97 105
3 25 29 98
3 25 90 98
3 29 90 98
3 25 29 100
3 25 92 100
3 29 92 100
3 25 90 106
3 58 90 106
3 25 92 109
3 60 92 109
3 90 98 106
3 92 100 109
3 26 30 99
3 26 91 99
3 30 91 99
3 26 30 101
3 26 93 101
3 30 93 101
3 26 91 107
3 56 91 107
3 26 93 110
3 57 93 110
3 91 99 107
3 93 101 110
3 27 88 108
3 59 88 108
3 27 89 111
3 61 89 111
3 88 96 108
3 89 97 111
3 28 31 102
3 28 94 102
3 31 94 102
3 28 31 103
3 28 95 103
3 31 95 103
3 28 94 112
3 58 94 112
3 28 95 115
3 60 95 115
3 94 102 112
3 95 103 115
3 29 90 113
3 62 90 113
3 29 92 116
3 63 92 116
3 90 98 113
3 92 100 116
3 30 91 114
3 59 91 114
3 30 93 117
3 61 93 117
3 91 99 114
3 93 101 117
3 31 94 118
3 62 94 118
3 31 95 119
3 63 95 119
3 94 102 118
3 95 103 119
3 32 35 80
3 32 35 82
3 32 80 82
3 35 80 82
3 32 80 96
3 35 80 96
3 32 82 98
3 35 82 98
3 32 40 48
3 32 48 104
3 40 48 104
3 32 48 106
3 40 48 106
3 32 48 80
3 32 48 82
3 32 80 104
3 48 80 104
3 32 82 106
3 48 82 106
3 80 96 104
3 82 98 106
3 33 37 81
3 33 37 84
3 33 81 84
3 37 81 84
3 33 81 97
3 37 81 97
3 33 84 100
3 37 84 100
3 33 41 49
3 33 49 105
3 41 49 105
3 33 49 109
3 41 49 109
3 33 49 81
3 33 49 84
3 33 81 105
3 49 81 105
3 33 84 109
3 49 84 109
3 81 97 105
3 84 100 109
3 34 38 83
3 34 38 86
3 34 83 86
3 38 83 86
3 34 83 99
3 38 83 99
3 34 86 102
3 38 86 102
3 34 42 50
3 34 50 107
3 42 50 107
3 34 50 112
3 42 50 112
3 34 50 83
3 34 50 86
3 34 83 107
3 50 83 107
3 34 86 112
3 50 86 112
3 83 99 107
3 86 102 112
3 35 43 51
3 35 51 108
3 43 51 108
3 35 51 113
3 43 51 113
3 35 51 80
3 35 51 82
3 35 80 108
3 51 80 108
3 35 82 113
3 51 82 113
3 80 96 108
3 82 98 113
3 36 39 85
3 36 39 87
3 36 85 87
3 39 85 87
3 36 85 101
3 39 85 101
3 36 87 103
3 39 87 103
3 36 44 52
3 36 52 110
3 44 52 110
3 36 52 115
3 44 52 115
3 36 52 85
3 36 52 87
3 36 85 110
3 52 85 110
3 36 87 115
3 52 87 115
3 85 101 110
3 87 103 115
3 37 45 53
3 37 53 111
3 45 53 111
3 37 53 116
3 45 53 116
3 37 53 81
3 37 53 84
3 37 81 111
3 53 81 111
3 37 84 116
3 53 84 116
3 81 97 111
3 84 100 116
3 38 46 54
3 38 54 114
3 46 54 114
3 38 54 118
3 46 54 118
3 38 54 83
3 38 54 86
3 38 83 114
3 54 83 114
3 38 86 118
3 54 86 118
3 83 99 114
3 86 102 118
3 39 47 55
3 39 55 117
3 47 55 117
3 39 55 119
3 47 55 119
3 39 55 85
3 39 55 87
3 39 85 117
3 55 85 117
3 39 87 119
3 55 87 119
3 85 101 117
3 87 103 119
3 40 48 72
3 40 48 74
3 48 72 74
3 48 72 104
3 48 74 106
3 41 49 73
3 41 49 76
3 49 73 76
3 49 73 105
3 49 76 109
3 42 50 72
3 42 50 74
3 50 72 74
3 50 72 107
3 50 74 112
3 43 51 75
3 43 51 78
3 51 75 78
3 51 75 108
3 51 78 113
3 44 52 73
3 44 52 76
3 52 73 76
3 52 73 110
3 52 76 115
3 45 53 77
3 45 53 79
3 53 77 79
3 53 77 111
3 53 79 116
3 46 54 75
3 46 54 78
3 54 75 78
3 54 75 114
3 54 78 118
3 47 55 77
3 47 55 79
3 55 77 79
3 55 77 117
3 55 79 119
3 48 50 72
3 48 64 72
3 50 64 72
3 48 50 74
3 48 66 74
3 50 66 74
3 48 64 104
3 64 72 104
3 64 80 104
3 48 66 106
3 66 74 106
3 66 82 106
3 49 52 73
3 49 65 73
3 52 65 73
3 49 52 76
3 49 68 76
3 52 68 76
3 49 65 105
3 65 73 105
3 65 81 105
3 49 68 109
3 68 76 109
3 68 84 109
3 50 64 107
3 64 72 107
3 64 83 107
3 50 66 112
3 66 74 112
3 66 86 112
3 51 54 75
3 51 67 75
3 54 67 75
3 51 54 78
3 51 70 78
3 54 70 78
3 51 67 108
3 67 75 108
3 67 80 108
3 51 70 113
3 70 78 113
3 70 82 113
3 52 65 110
3 65 73 110
3 65 85 110
3 52 68 115
3 68 76 115
3 68 87 115
3 53 55 77
3 53 69 77
3 55 69 77
3 53 55 79
3 53 71 79
3 55 71 79
3 53 69 111
3 69 77 111
3 69 81 111
3 53 71 116
3 71 79 116
3 71 84 116
3 54 67 114
3 67 75 114
3 67 83 114
3 54 70 118
3 70 78 118
3 70 86 118
3 55 69 117
3 69 77 117
3 69 85 117
3 55 71 119
3 71 79 119
3 71 87 119
3 56 64 72
3 56 64 104
3 56 64 107
3 56 64 88
3 56 64 91
3 64 88 91
3 64 88 104
3 64 91 107
3 57 65 73
3 57 65 105
3 57 65 110
3 57 65 89
3 57 65 93
3 65 89 93
3 65 89 105
3 65 93 110
3 58 66 74
3 58 66 106
3 58 66 112
3 58 66 90
3 58 66 94
3 66 90 94
3 66 90 106
3 66 94 112
3 59 67 75
3 59 67 108
3 59 67 114
3 59 67 88
3 59 67 91
3 67 88 91
3 67 88 108
3 67 91 114
3 60 68 76
3 60 68 109
3 60 68 115
3 60 68 92
3 60 68 95
3 68 92 95
3 68 92 109
3 68 95 115
3 61 69 77
3 61 69 111
3 61 69 117
3 61 69 89
3 61 69 93
3 69 89 93
3 69 89 111
3 69 93 117
3 62 70 78
3 62 70 113
3 62 70 118
3 62 70 90
3 62 70 94
3 70 90 94
3 70 90 113
3 70 94 118
3 63 71 79
3 63 71 116
3 63 71 119
3 63 71 92
3 63 71 95
3 71 92 95
3 71 92 116
3 71 95 119
3 64 67 88
3 64 80 88
3 67 80 88
3 64 67 91
3 64 83 91
3 67 83 91
3 80 88 104
3 83 91 107
3 65 69 89
3 65 81 89
3 69 81 89
3 65 69 93
3 65 85 93
3 69 85 93
3 81 89 105
3 85 93 110
3 66 70 90
3 66 82 90
3 70 82 90
3 66 70 94
3 66 86 94
3 70 86 94
3 82 90 106
3 86 94 112
3 80 88 108
3 83 91 114
3 68 71 92
3 68 84 92
3 71 84 92
3 68 71 95
3 68 87 95
3 71 87 95
3 84 92 109
3 87 95 115
3 81 89 111
3 85 93 117
3 82 90 113
3 86 94 118
3 84 92 116
3 87 95 119
3 80 88 96
3 81 89 97
3 82 90 98
3 83 91 99
3 84 92 100
3 85 93 101
3 86 94 102
3 87 95 103
/*
* Hypersolid, Four-dimensional solid viewer
*
* Copyright (c) 2014 Milosz Kosmider <milosz@milosz.ca>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
(function(Hypersolid) {
/* Begin constants. */
DEFAULT_VIEWPORT_WIDTH = 480; // Width of canvas in pixels
DEFAULT_VIEWPORT_HEIGHT = 480; // Height of canvas in pixels
DEFAULT_VIEWPORT_SCALE = 2; // Maximum distance from origin (in math units) that will be displayed on the canvas
DEFAULT_VIEWPORT_FONT = 'italic 10px sans-serif';
DEFAULT_VIEWPORT_FONT_COLOR = '#000';
DEFAULT_VIEWPORT_LINE_WIDTH = 4;
DEFAULT_VIEWPORT_LINE_JOIN = 'round';
DEFAULT_CHECKBOX_VALUES = {
perspective: { checked: true },
indices: { checked: false },
edges: { checked: true }
};
/* End constants. */
/* Begin classes. */
Hypersolid.Shape = function() {
return new Shape(Array.prototype.slice.call(arguments, 0));
};
function Shape(argv) {
var self = this,
vertices = argv[0],
edges = argv[1];
// Rotations will always be relative to the original shape to avoid rounding errors.
// This is a structure for caching the rotated vertices.
var rotatedVertices = new Array(vertices.length);
copyVertices();
// This is where we store the current rotations about each axis.
var rotations = { xy: 0, xz: 0, xw: 0, yz: 0, yw: 0, zw: 0 };
var rotationOrder = {
yz: 1,
xw: 1,
yw: 1,
zw: 1,
xy: 1,
xz: 1,
};
// Multiplication by vector rotation matrices of dimension 4
var rotateVertex = {
xy: function(v, s, c) {
tmp = c * v.x + s * v.y;
v.y = -s * v.x + c * v.y;
v.x = tmp;
},
xz: function(v, s, c) {
tmp = c * v.x + s * v.z;
v.z = -s * v.x + c * v.z;
v.x = tmp;
},
xw: function(v, s, c) {
tmp = c * v.x + s * v.w;
v.w = -s * v.x + c * v.w;
v.x = tmp;
},
yz: function(v, s, c) {
tmp = c * v.y + s * v.z;
v.z = -s * v.y + c * v.z;
v.y = tmp;
},
yw: function(v, s, c) {
tmp = c * v.y - s * v.w;
v.w = s * v.y + c * v.w;
v.y = tmp;
},
zw: function(v, s, c) {
tmp = c * v.z - s * v.w;
v.w = s * v.z + c * v.w;
v.z = tmp;
}
};
var eventCallbacks = {};
self.getOriginalVertices = function() {
return vertices;
};
self.getVertices = function() {
return rotatedVertices;
};
self.getEdges = function() {
return edges;
};
self.getRotations = function() {
return rotations;
};
// This will copy the original shape and put a rotated version into rotatedVertices
self.rotate = function(axis, theta) {
addToRotation(axis, theta);
applyRotations();
triggerEventCallbacks('rotate');
};
self.on = function(eventName, callback) {
if (eventCallbacks[eventName] === undefined) {
eventCallbacks[eventName] = [];
}
eventCallbacks[eventName].push(callback);
};
function triggerEventCallbacks(eventName) {
if (eventCallbacks[eventName] !== undefined) {
for (index in eventCallbacks[eventName]) {
eventCallbacks[eventName][index].call(self);
}
}
}
function addToRotation(axis, theta) {
rotations[axis] = (rotations[axis] + theta) % (2 * Math.PI);
}
function applyRotations() {
copyVertices();
for (var axis in rotationOrder) {
// sin and cos precomputed for efficiency
var s = Math.sin(rotations[axis]);
var c = Math.cos(rotations[axis]);
for (var i in vertices)
{
rotateVertex[axis](rotatedVertices[i], s, c);
}
}
}
function copyVertices() {
for (var i in vertices) {
var vertex = vertices[i];
rotatedVertices[i] = {
x: vertex.x,
y: vertex.y,
z: vertex.z,
w: vertex.w
};
}
}
}
Hypersolid.Viewport = function() {
return new Viewport(Array.prototype.slice.call(arguments, 0));
};
function Viewport(argv) {
var self = this,
shape = argv[0],
canvas = argv[1],
options = argv[2];
options = options || {};
var scale = options.scale || DEFAULT_VIEWPORT_SCALE;
canvas.width = options.width || DEFAULT_VIEWPORT_WIDTH;
canvas.height = options.height || DEFAULT_VIEWPORT_HEIGHT;
var bound = Math.min(canvas.width, canvas.height) / 2;
var context = canvas.getContext('2d');
context.font = options.font || DEFAULT_VIEWPORT_FONT;
context.textBaseline = 'top';
context.fillStyle = options.fontColor || DEFAULT_VIEWPORT_FONT_COLOR;
context.lineWidth = options.lineWidth || DEFAULT_VIEWPORT_LINE_WIDTH;
context.lineJoin = options.lineJoin || DEFAULT_VIEWPORT_LINE_JOIN;
var checkboxes = options.checkboxes || DEFAULT_CHECKBOX_VALUES;
var clicked = false;
var startCoords;
self.draw = function() {
var vertices = shape.getVertices();
var edges = shape.getEdges();
context.clearRect(0, 0, canvas.width, canvas.height);
var adjusted = [];
for (var i in vertices) {
if (checkboxes.perspective.checked) {
var zratio = vertices[i].z / scale;
adjusted[i] = {
x: Math.floor(canvas.width / 2 + (0.90 + zratio * 0.30) * bound * (vertices[i].x / scale)) + 0.5,
y: Math.floor(canvas.height / 2 - (0.90 + zratio * 0.30) * bound * (vertices[i].y / scale)) + 0.5,
z: 0.50 + 0.40 * zratio,
w: 121 + Math.floor(134 * vertices[i].w / scale)
};
}
else {
adjusted[i] = {
x: Math.floor(canvas.width / 2 + bound * (vertices[i].x / scale)) + 0.5,
y: Math.floor(canvas.height / 2 - bound * (vertices[i].y / scale)) + 0.5,
z: 0.50 + 0.40 * vertices[i].z / scale,
w: 121 + Math.floor(134 * vertices[i].w / scale)
};
}
}
if (checkboxes.edges.checked) {
for (var i in edges) {
var x = [adjusted[edges[i][0]].x, adjusted[edges[i][1]].x];
var y = [adjusted[edges[i][0]].y, adjusted[edges[i][1]].y];
var z = [adjusted[edges[i][0]].z, adjusted[edges[i][1]].z];
var w = [adjusted[edges[i][0]].w, adjusted[edges[i][1]].w];
context.beginPath();
context.moveTo(x[0], y[0]);
context.lineTo(x[1], y[1]);
context.closePath();
var gradient = context.createLinearGradient(x[0], y[0], x[1], y[1]); // Distance fade effect
gradient.addColorStop(0, 'rgba(' + w[0] + ',94,' + (125-Math.round(w[0]/2)) +', ' + z[0] + ')');
gradient.addColorStop(1, 'rgba(' + w[1] + ',94,' + (125-Math.round(w[0]/2)) +', ' + z[1] + ')');
context.strokeStyle = gradient;
context.stroke();
}
}
if (checkboxes.indices.checked) {
for (var i in adjusted) {
context.fillText(i.toString(), adjusted[i].x, adjusted[i].y);
}
}
};
canvas.onmousedown = function(e) {
startCoords = mouseCoords(e, canvas);
startCoords.x -= Math.floor(canvas.width / 2);
startCoords.y = Math.floor(canvas.height / 2) - startCoords.y;
clicked = true;
};
document.onmousemove = function(e) {
if (!clicked) {
return true;
}
var currCoords = mouseCoords(e, canvas);
currCoords.x -= Math.floor(canvas.width / 2);
currCoords.y = Math.floor(canvas.height / 2) - currCoords.y;
var motion = { 'x': currCoords.x - startCoords.x, 'y': currCoords.y - startCoords.y };
if (e.shiftKey && (e.altKey || e.ctrlKey)) {
shape.rotate('xy', Math.PI * motion.x / bound); // Full canvas drag ~ 2*PI
shape.rotate('zw', Math.PI * motion.y / bound);
}
else if (e.shiftKey) {
// Interpretation of this rotation varies between left- and right- brained users
shape.rotate('xw', Math.PI * motion.x / bound);
shape.rotate('yw', Math.PI * motion.y / bound);
}
else {
shape.rotate('xz', Math.PI * motion.x / bound);
shape.rotate('yz', Math.PI * motion.y / bound);
}
startCoords = currCoords;
self.draw();
};
document.onmouseup = function() {
clicked = false;
};
checkboxes.onchange = function() {
self.draw();
};
}
/* End classes. */
/* Begin methods. */
// parse ascii files from http://paulbourke.net/geometry/hyperspace/
Hypersolid.parseVEF = function(text) {
var lines = text.split("\n");
var nV = parseInt(lines[0]); // number of vertices
var nE = parseInt(lines[1+nV]); // number of edges
var nF = parseInt(lines[2+nV+nE]); // number of faces
var vertices = lines.slice(1,1+nV).map(function(line) {
var d = line.split("\t").map(parseFloat);
return {
x: d[0],
y: d[1],
z: d[2],
w: d[3],
}
});
var edges = lines.slice(2+nV,2+nV+nE).map(function(line) {
var d = line.replace("\s","").split("\t").map(function(vertex) { return parseInt(vertex); });
return [d[0], d[1]];;
});
var faces = lines.slice(3+nV+nE,3+nV+nE+nF).map(function(line) {
var d = line.replace("\s","").split("\t").map(function(edge) { return parseInt(edge); });
return d;
});
return [vertices,edges,faces]
};
/* End methods. */
/* Begin helper routines. */
function mouseCoords(e, element) { // http://answers.oreilly.com/topic/1929-how-to-use-the-canvas-and-draw-elements-in-html5/
var x;
var y;
if (e.pageX || e.pageY) {
x = e.pageX;
y = e.pageY;
}
else {
x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
}
x -= element.offsetLeft;
y -= element.offsetTop;
return { 'x': x, 'y': y };
}
/* End helper routines. */
})(window.Hypersolid = window.Hypersolid || {});
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Tetraplex</title>
<style>
html, body {
background: #fff;
color: #555;
width: 960px;
margin: 0 auto;
font-family: sans-serif;
}
canvas {
border: none;
margin: 0 280px;
}
#hypercube-options {
margin: 10px 0 0 85px;
}
label {
margin: 0 20px;
font-size: 15px;
cursor: pointer;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script type="text/javascript" src="hypersolid.js"></script>
</head>
<body>
<canvas id="octaplex-canvas">Unfortunately, your browser does not support coolness.</canvas>
<form id="hypercube-options">
<label><input type="checkbox" name="rotate_xy" />Rotate xy</label>
<label><input type="checkbox" name="rotate_yz" />Rotate yz</label>
<label><input type="checkbox" name="rotate_xz" />Rotate xz</label>
<label><input type="checkbox" name="rotate_xw" />Rotate xw</label>
<label><input type="checkbox" name="rotate_yw" />Rotate yw</label>
<label><input type="checkbox" name="rotate_zw" />Rotate zw</label>
</form>
<script type="text/javascript">
d3.text("600cell.ascii", function(err, text) {
var data = Hypersolid.parseVEF(text);
function NewShape() {};
Hypersolid.NewShape = function() {
return new NewShape();
};
NewShape.prototype = Hypersolid.Shape(data[0],data[1],data[2]);
var octaplex = Hypersolid.NewShape();
var octaplexView = Hypersolid.Viewport(octaplex, document.getElementById('octaplex-canvas'), {
width: 440,
height: 440,
scale: 2,
lineWidth: 2,
lineJoin: 'round'
});
octaplexView.draw();
// animation
options = document.getElementById('hypercube-options');
function render() {
if (options) {
checkboxes = options.getElementsByTagName('input');
}
if (options.rotate_xz.checked) {
rotate("xz", 0.008);
}
if (options.rotate_yz.checked) {
rotate("yz", 0.008);
}
if (options.rotate_xw.checked) {
rotate("xw", 0.008);
}
if (options.rotate_yw.checked) {
rotate("yw", 0.008);
}
if (options.rotate_xy.checked) {
rotate("xy", 0.008);
}
if (options.rotate_zw.checked) {
rotate("zw", 0.008);
}
};
function rotate(plane, x) {
octaplex.rotate(plane, x);
octaplexView.draw();
};
window.requestAnimFrame = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function( callback ){
window.setTimeout(callback, 1000 / 60);
};
(function animloop(){
requestAnimFrame(animloop);
render();
})();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment