share

Dependencies:   RotationMat_ SDFileSystem mbed

Committer:
shuhei2306
Date:
Wed Feb 03 11:43:40 2016 +0000
Revision:
1:28cfbd0cc92e
Parent:
0:cbd607fc4caa
share

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shuhei2306 0:cbd607fc4caa 1
shuhei2306 0:cbd607fc4caa 2 #include "mbed.h"
shuhei2306 0:cbd607fc4caa 3 #include "SDFileSystem.h"
shuhei2306 0:cbd607fc4caa 4 #include "Adafruit_DotStar.h"
shuhei2306 0:cbd607fc4caa 5 #include "LedData.h"
shuhei2306 0:cbd607fc4caa 6
shuhei2306 0:cbd607fc4caa 7 #include "Vector3D.h"
shuhei2306 0:cbd607fc4caa 8 #include "RotationMat.h"
shuhei2306 0:cbd607fc4caa 9 #include <math.h>
shuhei2306 0:cbd607fc4caa 10
shuhei2306 0:cbd607fc4caa 11 SDFileSystem sd(p11, p12, p13, p14, "sd"); // the pinout on the mbed Cool Components workshop board
shuhei2306 0:cbd607fc4caa 12 Serial pc(USBTX, USBRX); // tx, rx
shuhei2306 0:cbd607fc4caa 13 FILE *fp;
shuhei2306 0:cbd607fc4caa 14
shuhei2306 0:cbd607fc4caa 15 LocalFileSystem local("local"); // Create the local filesystem under the name "local"
shuhei2306 0:cbd607fc4caa 16
shuhei2306 0:cbd607fc4caa 17 //const int byte_num = 114;//3*19 *2上下 // CSVから一度に読み込むバイト数 // 改行2バイト分読み込みをどこかで考える(アスキーコード 13と10)
shuhei2306 0:cbd607fc4caa 18
shuhei2306 0:cbd607fc4caa 19 //int rState = 3; // シリアル値によって変化
shuhei2306 0:cbd607fc4caa 20 bool ontime = false;
shuhei2306 0:cbd607fc4caa 21 unsigned char compareT_b[3];
shuhei2306 0:cbd607fc4caa 22 unsigned long compareT = 0;//比較する数値
shuhei2306 0:cbd607fc4caa 23 //unsigned long diff_time = 0;//時間調整用
shuhei2306 0:cbd607fc4caa 24 //unsigned long start_time = 0;//時間調整用
shuhei2306 0:cbd607fc4caa 25 Timer timer;
shuhei2306 0:cbd607fc4caa 26
shuhei2306 0:cbd607fc4caa 27 float v_leds[6][9][22][3]=
shuhei2306 0:cbd607fc4caa 28 {{{{94.8345, 103.159, 81.2937},{84.1609, 112.037, 81.2937},{72.6612, 119.815, 81.2937},{60.4483, 126.417, 81.2937},{47.642, 131.779, 81.2937},{34.368, 135.846, 81.2937},{20.7567, 138.58, 81.2937},{6.94161, 139.954, 81.2937},{-6.94162, 139.954, 81.2937},
shuhei2306 0:cbd607fc4caa 29 {-20.7567, 138.58, 81.2937},{-34.368, 135.846, 81.2937},{-47.642, 131.779, 81.2937},{-60.4483, 126.417, 81.2937},{-72.6612, 119.815, 81.2937},{-84.1609, 112.037, 81.2937},{-94.8345, 103.159, 81.2937},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 30 {{-110.95, 100.308, 62.2297},{-101.171, 110.163, 62.2297},{-90.5197, 119.07, 62.2297},{-79.0889, 126.95, 62.2297},{-66.9766, 133.737, 62.2297},{-54.2872, 139.371, 62.2297},{-41.1301, 143.805, 62.2297},{-27.6185, 146.999, 62.2297},{-13.869, 148.927, 62.2297},
shuhei2306 0:cbd607fc4caa 31 {0, 149.571, 62.2297},{13.869, 148.927, 62.2297},{27.6185, 146.999, 62.2297},{41.1301, 143.805, 62.2297},{54.2872, 139.371, 62.2297},{66.9766, 133.737, 62.2297},{79.0889, 126.95, 62.2297},{90.5197, 119.07, 62.2297},{101.171, 110.163, 62.2297},{110.95, 100.308, 62.2297},
shuhei2306 0:cbd607fc4caa 32 {0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 33 {{116.848, 104.014, 42.0925},{107.165, 113.965, 42.0925},{96.6378, 123.018, 42.0925},{85.3497, 131.102, 42.0925},{73.3891, 138.153, 42.0925},{60.8505, 144.116, 42.0925},{47.8326, 148.944, 42.0925},{34.4378, 152.598, 42.0925},{20.7718, 155.051, 42.0925},{6.94216, 156.282, 42.0925},
shuhei2306 0:cbd607fc4caa 34 {-6.94217, 156.282, 42.0925},{-20.7718, 155.051, 42.0925},{-34.4378, 152.598, 42.0925},{-47.8326, 148.944, 42.0925},{-60.8505, 144.116, 42.0925},{-73.3891, 138.153, 42.0925},{-85.3497, 131.102, 42.0925},{-96.6378, 123.018, 42.0925},{-107.165, 113.965, 42.0925},{-116.848, 104.014, 42.0925},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 35 {{-126.603, 98.8175, 21.2293},{-117.595, 109.383, 21.2293},{-107.708, 119.131, 21.2293},{-97.0158, 127.989, 21.2293},{-85.5985, 135.89, 21.2293},{-73.5415, 142.776, 21.2293},{-60.9347, 148.594, 21.2293},{-47.8725, 153.302, 21.2293},{-34.4526, 156.864, 21.2293},{-20.7751, 159.254, 21.2293},{-6.94232, 160.453, 21.2293},
shuhei2306 0:cbd607fc4caa 36 {6.94234, 160.453, 21.2293},{20.7751, 159.254, 21.2293},{34.4526, 156.864, 21.2293},{47.8726, 153.302, 21.2293},{60.9347, 148.594, 21.2293},{73.5415, 142.776, 21.2293},{85.5986, 135.89, 21.2293},{97.0158, 127.989, 21.2293},{107.708, 119.131, 21.2293},{117.595, 109.383, 21.2293},{126.603, 98.8175, 21.2293}},
shuhei2306 0:cbd607fc4caa 37 {{126.92, 100.675, 0},{117.833, 111.173, 0},{107.88, 120.854, 0},{97.1356, 129.648, 0},{85.6772, 137.49, 0},{73.5894, 144.321, 0},{60.961, 150.092, 0},{47.8849, 154.761, 0},{34.457, 158.293, 0},{20.7759, 160.662, 0},{6.94232, 161.851, 0},{-6.94231, 161.851, 0},{-20.776, 160.662, 0},{-34.457, 158.293, 0},
shuhei2306 0:cbd607fc4caa 38 {-47.8849, 154.761, 0},{-60.9611, 150.092, 0},{-73.5894, 144.321, 0},{-85.6772, 137.49, 0},{-97.1356, 129.648, 0},{-107.88, 120.854, 0},{-117.833, 111.173, 0},{-126.92, 100.675, 0}},
shuhei2306 0:cbd607fc4caa 39 {{-126.603, 98.8175, -21.2293},{-117.595, 109.383, -21.2293},{-107.708, 119.131, -21.2293},{-97.0158, 127.989, -21.2293},{-85.5985, 135.89, -21.2293},{-73.5415, 142.776, -21.2293},{-60.9347, 148.594, -21.2293},{-47.8725, 153.302, -21.2293},{-34.4526, 156.864, -21.2293},{-20.7751, 159.254, -21.2293},
shuhei2306 0:cbd607fc4caa 40 {-6.94232, 160.453, -21.2293},{6.94234, 160.453, -21.2293},{20.7751, 159.254, -21.2293},{34.4526, 156.864, -21.2293},{47.8726, 153.302, -21.2293},{60.9347, 148.594, -21.2293},{73.5415, 142.776, -21.2293},{85.5986, 135.89, -21.2293},{97.0158, 127.989, -21.2293},{107.708, 119.131, -21.2293},{117.595, 109.383, -21.2293},
shuhei2306 0:cbd607fc4caa 41 {126.603, 98.8175, -21.2293}},
shuhei2306 0:cbd607fc4caa 42 {{116.848, 104.014, -42.0925},{107.165, 113.965, -42.0925},{96.6378, 123.018, -42.0925},{85.3497, 131.102, -42.0925},{73.3891, 138.153, -42.0925},{60.8505, 144.116, -42.0925},{47.8326, 148.944, -42.0925},{34.4378, 152.598, -42.0925},{20.7718, 155.051, -42.0925},{6.94216, 156.282, -42.0925},{-6.94217, 156.282, -42.0925},
shuhei2306 0:cbd607fc4caa 43 {-20.7718, 155.051, -42.0925},{-34.4378, 152.598, -42.0925},{-47.8326, 148.944, -42.0925},{-60.8505, 144.116, -42.0925},{-73.3891, 138.153, -42.0925},{-85.3497, 131.102, -42.0925},{-96.6378, 123.018, -42.0925},{-107.165, 113.965, -42.0925},{-116.848, 104.014, -42.0925},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 44 {{-110.95, 100.308, -62.2297},{-101.171, 110.163, -62.2297},{-90.5197, 119.07, -62.2297},{-79.0889, 126.95, -62.2297},{-66.9766, 133.737, -62.2297},{-54.2872, 139.371, -62.2297},{-41.1301, 143.805, -62.2297},{-27.6185, 146.999, -62.2297},{-13.869, 148.927, -62.2297},{0, 149.571, -62.2297},{13.869, 148.927, -62.2297},
shuhei2306 0:cbd607fc4caa 45 {27.6185, 146.999, -62.2297},{41.1301, 143.805, -62.2297},{54.2872, 139.371, -62.2297},{66.9766, 133.737, -62.2297},{79.0889, 126.95, -62.2297},{90.5197, 119.07, -62.2297},{101.171, 110.163, -62.2297},{110.95, 100.308, -62.2297},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 46 {{94.8345, 103.159, -81.2937},{84.1609, 112.037, -81.2937},{72.6612, 119.815, -81.2937},{60.4483, 126.417, -81.2937},{47.642, 131.779, -81.2937},{34.368, 135.846, -81.2937},{20.7567, 138.58, -81.2937},{6.94161, 139.954, -81.2937},{-6.94162, 139.954, -81.2937},{-20.7567, 138.58, -81.2937},{-34.368, 135.846, -81.2937},
shuhei2306 0:cbd607fc4caa 47 {-47.642, 131.779, -81.2937},{-60.4483, 126.417, -81.2937},{-72.6612, 119.815, -81.2937},{-84.1609, 112.037, -81.2937},{-94.8345, 103.159, -81.2937},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}
shuhei2306 0:cbd607fc4caa 48 },{{{81.2937, 94.8345, 103.159},{81.2937, 84.1609, 112.037},{81.2937, 72.6612, 119.815},{81.2937, 60.4483, 126.417},{81.2937, 47.642, 131.779},{81.2937, 34.368, 135.846},{81.2937, 20.7567, 138.58},{81.2937, 6.94162, 139.954},{81.2937, -6.94162, 139.954},{81.2937, -20.7567, 138.58},{81.2937, -34.368, 135.846},
shuhei2306 0:cbd607fc4caa 49 {81.2937, -47.642, 131.779},{81.2937, -60.4483, 126.417},{81.2937, -72.6612, 119.815},{81.2937, -84.1609, 112.037},{81.2937, -94.8345, 103.159},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 50 {{62.2297, -110.95, 100.308},{62.2297, -101.171, 110.163},{62.2297, -90.5197, 119.07},{62.2297, -79.0889, 126.95},{62.2298, -66.9766, 133.737},{62.2298, -54.2872, 139.371},{62.2297, -41.1301, 143.805},{62.2297, -27.6185, 146.999},{62.2297, -13.869, 148.927},{62.2297, 2.72015e-06, 149.571},{62.2297, 13.869, 148.927},
shuhei2306 0:cbd607fc4caa 51 {62.2297, 27.6185, 146.999},{62.2297, 41.1301, 143.805},{62.2297, 54.2872, 139.371},{62.2297, 66.9766, 133.737},{62.2297, 79.0889, 126.95},{62.2297, 90.5197, 119.07},{62.2297, 101.171, 110.163},{62.2297, 110.95, 100.308},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 52 {{42.0925, 116.848, 104.014},{42.0925, 107.165, 113.965},{42.0925, 96.6378, 123.018},{42.0925, 85.3496, 131.102},{42.0925, 73.3891, 138.153},{42.0925, 60.8505, 144.116},{42.0925, 47.8326, 148.944},{42.0925, 34.4378, 152.598},{42.0925, 20.7718, 155.051},{42.0925, 6.94216, 156.282},{42.0925, -6.94217, 156.282},
shuhei2306 0:cbd607fc4caa 53 {42.0925, -20.7718, 155.051},{42.0925, -34.4378, 152.598},{42.0925, -47.8326, 148.944},{42.0925, -60.8505, 144.116},{42.0925, -73.3891, 138.153},{42.0925, -85.3496, 131.102},{42.0925, -96.6378, 123.018},{42.0925, -107.165, 113.965},{42.0925, -116.848, 104.014},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 54 {{21.2293, -126.603, 98.8175},{21.2293, -117.595, 109.383},{21.2293, -107.708, 119.131},{21.2293, -97.0158, 127.989},{21.2293, -85.5985, 135.89},{21.2293, -73.5415, 142.776},{21.2293, -60.9347, 148.594},{21.2293, -47.8725, 153.302},{21.2293, -34.4526, 156.864},{21.2293, -20.7751, 159.254},{21.2293, -6.94232, 160.453},
shuhei2306 0:cbd607fc4caa 55 {21.2293, 6.94234, 160.453},{21.2293, 20.7751, 159.254},{21.2293, 34.4526, 156.864},{21.2293, 47.8726, 153.302},{21.2293, 60.9347, 148.594},{21.2293, 73.5415, 142.776},{21.2293, 85.5985, 135.89},{21.2293, 97.0158, 127.989},{21.2293, 107.708, 119.131},{21.2293, 117.595, 109.383},{21.2293, 126.603, 98.8175}},
shuhei2306 0:cbd607fc4caa 56 {{-1.1472e-06, 126.92, 100.675},{-2.91114e-07, 117.833, 111.173},{5.67114e-07, 107.88, 120.854},{1.42118e-06, 97.1356, 129.648},{2.2648e-06, 85.6772, 137.49},{3.09178e-06, 73.5894, 144.321},{3.89606e-06, 60.961, 150.092},{4.67171e-06, 47.8849, 154.761},{5.41305e-06, 34.457, 158.293},{6.11463e-06, 20.7759, 160.662},
shuhei2306 0:cbd607fc4caa 57 {6.77128e-06, 6.94232, 161.851},{7.3782e-06, -6.94231, 161.851},{7.93092e-06, -20.776, 160.662},{8.42537e-06, -34.457, 158.293},{8.85794e-06, -47.8849, 154.761},{9.22544e-06, -60.9611, 150.092},{9.52517e-06, -73.5894, 144.321},{9.75493e-06, -85.6772, 137.49},{9.91304e-06, -97.1356, 129.648},{9.99832e-06, -107.88, 120.854},{1.00102e-05, -117.833, 111.173},{9.94847e-06, -126.92, 100.675}},
shuhei2306 0:cbd607fc4caa 58 {{-21.2293, -126.603, 98.8175},{-21.2293, -117.595, 109.383},{-21.2293, -107.708, 119.131},{-21.2293, -97.0158, 127.989},{-21.2293, -85.5985, 135.89},{-21.2293, -73.5415, 142.776},{-21.2293, -60.9347, 148.594},{-21.2293, -47.8725, 153.302},{-21.2293, -34.4526, 156.864},{-21.2293, -20.7751, 159.254},{-21.2293, -6.94232, 160.453},{-21.2293, 6.94234, 160.453},{-21.2293, 20.7751, 159.254},
shuhei2306 0:cbd607fc4caa 59 {-21.2293, 34.4526, 156.864},{-21.2293, 47.8726, 153.302},{-21.2293, 60.9347, 148.594},{-21.2293, 73.5415, 142.776},{-21.2293, 85.5985, 135.89},{-21.2293, 97.0158, 127.989},{-21.2293, 107.708, 119.131},{-21.2293, 117.595, 109.383},{-21.2293, 126.603, 98.8175}},
shuhei2306 0:cbd607fc4caa 60 {{-42.0925, 116.848, 104.014},{-42.0925, 107.165, 113.965},{-42.0925, 96.6378, 123.018},{-42.0925, 85.3496, 131.102},{-42.0925, 73.3891, 138.153},{-42.0925, 60.8505, 144.116},{-42.0925, 47.8326, 148.944},{-42.0925, 34.4378, 152.598},{-42.0925, 20.7718, 155.051},
shuhei2306 0:cbd607fc4caa 61 {-42.0925, 6.94216, 156.282},{-42.0925, -6.94217, 156.282},{-42.0925, -20.7718, 155.051},{-42.0925, -34.4378, 152.598},{-42.0925, -47.8326, 148.944},{-42.0925, -60.8505, 144.116},{-42.0925, -73.3891, 138.153},{-42.0925, -85.3496, 131.102},{-42.0925, -96.6378, 123.018},{-42.0925, -107.165, 113.965},{-42.0925, -116.848, 104.014},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 62 {{-62.2297, -110.95, 100.308},{-62.2297, -101.171, 110.163},{-62.2297, -90.5197, 119.07},{-62.2297, -79.0889, 126.95},{-62.2297, -66.9766, 133.737},{-62.2297, -54.2872, 139.371},{-62.2297, -41.1301, 143.805},{-62.2297, -27.6185, 146.999},{-62.2297, -13.869, 148.927},{-62.2297, -2.72015e-06, 149.571},{-62.2297, 13.869, 148.927},
shuhei2306 0:cbd607fc4caa 63 {-62.2297, 27.6185, 146.999},{-62.2297, 41.1301, 143.805},{-62.2297, 54.2872, 139.371},{-62.2297, 66.9766, 133.737},{-62.2297, 79.0889, 126.95},{-62.2297, 90.5197, 119.07},{-62.2297, 101.171, 110.163},{-62.2297, 110.95, 100.308},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 64 {{-81.2937, 94.8345, 103.159},{-81.2936, 84.1609, 112.037},{-81.2936, 72.6612, 119.815},{-81.2936, 60.4483, 126.417},{-81.2936, 47.642, 131.779},{-81.2936, 34.368, 135.846},{-81.2936, 20.7567, 138.58},{-81.2936, 6.94161, 139.954},{-81.2936, -6.94162, 139.954},
shuhei2306 0:cbd607fc4caa 65 {-81.2936, -20.7567, 138.58},{-81.2936, -34.368, 135.846},{-81.2936, -47.642, 131.779},{-81.2936, -60.4483, 126.417},{-81.2936, -72.6612, 119.815},{-81.2936, -84.1609, 112.037},{-81.2936, -94.8345, 103.159},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}
shuhei2306 0:cbd607fc4caa 66 },{{{-81.2937, 94.8345, -103.159},{-81.2936, 84.1609, -112.037},{-81.2936, 72.6612, -119.815},{-81.2936, 60.4483, -126.417},{-81.2936, 47.642, -131.779},{-81.2936, 34.368, -135.846},{-81.2936, 20.7567, -138.58},{-81.2936, 6.94161, -139.954},{-81.2936, -6.94162, -139.954},
shuhei2306 0:cbd607fc4caa 67 {-81.2936, -20.7567, -138.58},{-81.2936, -34.368, -135.846},{-81.2936, -47.642, -131.779},{-81.2936, -60.4483, -126.417},{-81.2936, -72.6612, -119.815},{-81.2936, -84.1609, -112.037},{-81.2936, -94.8345, -103.159},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 68 {{-62.2297, -110.95, -100.308},{-62.2297, -101.171, -110.163},{-62.2297, -90.5197, -119.07},{-62.2297, -79.0889, -126.95},{-62.2297, -66.9766, -133.737},{-62.2297, -54.2872, -139.371},{-62.2297, -41.1301, -143.805},{-62.2297, -27.6185, -146.999},{-62.2297, -13.869, -148.927},
shuhei2306 0:cbd607fc4caa 69 {-62.2297, -2.72015e-06, -149.571},{-62.2297, 13.869, -148.927},{-62.2297, 27.6185, -146.999},{-62.2297, 41.1301, -143.805},{-62.2297, 54.2872, -139.371},{-62.2297, 66.9766, -133.737},{-62.2297, 79.0889, -126.95},{-62.2297, 90.5197, -119.07},{-62.2297, 101.171, -110.163},{-62.2297, 110.95, -100.308},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 70 {{-42.0925, 116.848, -104.014},{-42.0925, 107.165, -113.965},{-42.0925, 96.6378, -123.018},{-42.0925, 85.3496, -131.102},{-42.0925, 73.3891, -138.153},{-42.0925, 60.8505, -144.116},{-42.0925, 47.8326, -148.944},{-42.0925, 34.4378, -152.598},{-42.0925, 20.7718, -155.051},{-42.0925, 6.94216, -156.282},{-42.0925, -6.94217, -156.282},
shuhei2306 0:cbd607fc4caa 71 {-42.0925, -20.7718, -155.051},{-42.0925, -34.4378, -152.598},{-42.0925, -47.8326, -148.944},{-42.0925, -60.8505, -144.116},{-42.0925, -73.3891, -138.153},{-42.0925, -85.3496, -131.102},{-42.0925, -96.6378, -123.018},{-42.0925, -107.165, -113.965},{-42.0925, -116.848, -104.014},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 72 {{-21.2293, -126.603, -98.8175},{-21.2293, -117.595, -109.383},{-21.2293, -107.708, -119.131},{-21.2293, -97.0158, -127.989},{-21.2293, -85.5985, -135.89},{-21.2293, -73.5415, -142.776},{-21.2293, -60.9347, -148.594},{-21.2293, -47.8725, -153.302},{-21.2293, -34.4526, -156.864},{-21.2293, -20.7751, -159.254},
shuhei2306 0:cbd607fc4caa 73 {-21.2293, -6.94232, -160.453},{-21.2293, 6.94234, -160.453},{-21.2293, 20.7751, -159.254},{-21.2293, 34.4526, -156.864},{-21.2293, 47.8726, -153.302},{-21.2293, 60.9347, -148.594},{-21.2293, 73.5415, -142.776},{-21.2293, 85.5985, -135.89},{-21.2293, 97.0158, -127.989},{-21.2293, 107.708, -119.131},{-21.2293, 117.595, -109.383},{-21.2293, 126.603, -98.8175}},
shuhei2306 0:cbd607fc4caa 74 {{-1.1472e-06, 126.92, -100.675},{-2.91114e-07, 117.833, -111.173},{5.67114e-07, 107.88, -120.854},{1.42118e-06, 97.1356, -129.648},{2.2648e-06, 85.6772, -137.49},{3.09178e-06, 73.5894, -144.321},{3.89606e-06, 60.961, -150.092},{4.67171e-06, 47.8849, -154.761},{5.41305e-06, 34.457, -158.293},{6.11463e-06, 20.7759, -160.662},{6.77128e-06, 6.94232, -161.851},
shuhei2306 0:cbd607fc4caa 75 {7.3782e-06, -6.94231, -161.851},{7.93092e-06, -20.776, -160.662},{8.42537e-06, -34.457, -158.293},{8.85794e-06, -47.8849, -154.761},{9.22544e-06, -60.9611, -150.092},{9.52517e-06, -73.5894, -144.321},{9.75493e-06, -85.6772, -137.49},{9.91304e-06, -97.1356, -129.648},{9.99832e-06, -107.88, -120.854},{1.00102e-05, -117.833, -111.173},{9.94847e-06, -126.92, -100.675}},
shuhei2306 0:cbd607fc4caa 76 {{21.2293, -126.603, -98.8175},{21.2293, -117.595, -109.383},{21.2293, -107.708, -119.131},{21.2293, -97.0158, -127.989},{21.2293, -85.5985, -135.89},{21.2293, -73.5415, -142.776},{21.2293, -60.9347, -148.594},{21.2293, -47.8725, -153.302},{21.2293, -34.4526, -156.864},{21.2293, -20.7751, -159.254},{21.2293, -6.94232, -160.453},{21.2293, 6.94234, -160.453},
shuhei2306 0:cbd607fc4caa 77 {21.2293, 20.7751, -159.254},{21.2293, 34.4526, -156.864},{21.2293, 47.8726, -153.302},{21.2293, 60.9347, -148.594},{21.2293, 73.5415, -142.776},{21.2293, 85.5985, -135.89},{21.2293, 97.0158, -127.989},{21.2293, 107.708, -119.131},{21.2293, 117.595, -109.383},{21.2293, 126.603, -98.8175}},
shuhei2306 0:cbd607fc4caa 78 {{42.0925, 116.848, -104.014},{42.0925, 107.165, -113.965},{42.0925, 96.6378, -123.018},{42.0925, 85.3496, -131.102},{42.0925, 73.3891, -138.153},{42.0925, 60.8505, -144.116},{42.0925, 47.8326, -148.944},{42.0925, 34.4378, -152.598},{42.0925, 20.7718, -155.051},{42.0925, 6.94216, -156.282},
shuhei2306 0:cbd607fc4caa 79 {42.0925, -6.94217, -156.282},{42.0925, -20.7718, -155.051},{42.0925, -34.4378, -152.598},{42.0925, -47.8326, -148.944},{42.0925, -60.8505, -144.116},{42.0925, -73.3891, -138.153},{42.0925, -85.3496, -131.102},{42.0925, -96.6378, -123.018},{42.0925, -107.165, -113.965},{42.0925, -116.848, -104.014},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 80 {{62.2297, -110.95, -100.308},{62.2297, -101.171, -110.163},{62.2297, -90.5197, -119.07},{62.2297, -79.0889, -126.95},{62.2298, -66.9766, -133.737},{62.2298, -54.2872, -139.371},{62.2297, -41.1301, -143.805},{62.2297, -27.6185, -146.999},{62.2297, -13.869, -148.927},{62.2297, 2.72015e-06, -149.571},{62.2297, 13.869, -148.927},
shuhei2306 0:cbd607fc4caa 81 {62.2297, 27.6185, -146.999},{62.2297, 41.1301, -143.805},{62.2297, 54.2872, -139.371},{62.2297, 66.9766, -133.737},{62.2297, 79.0889, -126.95},{62.2297, 90.5197, -119.07},{62.2297, 101.171, -110.163},{62.2297, 110.95, -100.308},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 82 {{81.2937, 94.8345, -103.159},{81.2937, 84.1609, -112.037},{81.2937, 72.6612, -119.815},{81.2937, 60.4483, -126.417},{81.2937, 47.642, -131.779},{81.2937, 34.368, -135.846},{81.2937, 20.7567, -138.58},{81.2937, 6.94162, -139.954},{81.2937, -6.94162, -139.954},
shuhei2306 0:cbd607fc4caa 83 {81.2937, -20.7567, -138.58},{81.2937, -34.368, -135.846},{81.2937, -47.642, -131.779},{81.2937, -60.4483, -126.417},{81.2937, -72.6612, -119.815},{81.2937, -84.1609, -112.037},{81.2937, -94.8345, -103.159},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}
shuhei2306 0:cbd607fc4caa 84 },
shuhei2306 0:cbd607fc4caa 85 {{{-103.159, 81.2936, -94.8345},{-112.037, 81.2936, -84.1609},{-119.815, 81.2936, -72.6612},{-126.417, 81.2936, -60.4483},{-131.779, 81.2936, -47.642},{-135.846, 81.2936, -34.368},{-138.58, 81.2936, -20.7567},{-139.954, 81.2936, -6.94161},{-139.954, 81.2936, 6.94162},
shuhei2306 0:cbd607fc4caa 86 {-138.58, 81.2936, 20.7567},{-135.846, 81.2936, 34.368},{-131.779, 81.2936, 47.642},{-126.417, 81.2936, 60.4483},{-119.815, 81.2936, 72.6613},{-112.037, 81.2936, 84.1609},{-103.159, 81.2937, 94.8345},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 87 {{-100.308, 62.2297, 110.95},{-110.163, 62.2297, 101.171},{-119.07, 62.2297, 90.5197},{-126.95, 62.2297, 79.0889},{-133.737, 62.2297, 66.9766},{-139.371, 62.2297, 54.2873},{-143.805, 62.2297, 41.1301},{-146.999, 62.2297, 27.6185},{-148.927, 62.2297, 13.869},
shuhei2306 0:cbd607fc4caa 88 {-149.571, 62.2297, 3.8178e-06},{-148.927, 62.2297, -13.869},{-146.999, 62.2297, -27.6185},{-143.805, 62.2297, -41.1301},{-139.371, 62.2297, -54.2872},{-133.737, 62.2297, -66.9766},{-126.95, 62.2297, -79.0889},{-119.07, 62.2297, -90.5197},{-110.163, 62.2297, -101.171},
shuhei2306 0:cbd607fc4caa 89 {-100.308, 62.2297, -110.95},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 90 {{-104.014, 42.0925, -116.848},{-113.965, 42.0925, -107.165},{-123.018, 42.0925, -96.6378},{-131.102, 42.0925, -85.3496},{-138.153, 42.0925, -73.3891},{-144.116, 42.0925, -60.8505},{-148.944, 42.0925, -47.8326},{-152.598, 42.0925, -34.4378},{-155.051, 42.0925, -20.7718},
shuhei2306 0:cbd607fc4caa 91 {-156.282, 42.0925, -6.94216},{-156.282, 42.0925, 6.94217},{-155.051, 42.0925, 20.7718},{-152.598, 42.0925, 34.4378},{-148.944, 42.0925, 47.8326},{-144.116, 42.0925, 60.8505},{-138.153, 42.0925, 73.3891},{-131.102, 42.0925, 85.3497},{-123.018, 42.0925, 96.6378},
shuhei2306 0:cbd607fc4caa 92 {-113.965, 42.0925, 107.165},{-104.014, 42.0925, 116.848},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 93 {{-98.8175, 21.2293, 126.603},{-109.383, 21.2293, 117.595},{-119.131, 21.2293, 107.708},{-127.989, 21.2293, 97.0158},{-135.89, 21.2293, 85.5985},{-142.776, 21.2293, 73.5415},{-148.594, 21.2293, 60.9347},{-153.302, 21.2293, 47.8725},{-156.864, 21.2293, 34.4526},
shuhei2306 0:cbd607fc4caa 94 {-159.254, 21.2293, 20.7751},{-160.453, 21.2293, 6.94233},{-160.453, 21.2293, -6.94233},{-159.254, 21.2293, -20.7751},{-156.864, 21.2293, -34.4526},{-153.302, 21.2293, -47.8726},{-148.594, 21.2293, -60.9347},{-142.776, 21.2293, -73.5415},{-135.89, 21.2293, -85.5985},
shuhei2306 0:cbd607fc4caa 95 {-127.989, 21.2293, -97.0158},{-119.131, 21.2293, -107.708},{-109.383, 21.2293, -117.595},{-98.8175, 21.2293, -126.603}},
shuhei2306 0:cbd607fc4caa 96 {{-100.675, -5.54783e-06, -126.92},{-111.173, -5.15064e-06, -117.833},{-120.854, -4.7156e-06, -107.88},{-129.648, -4.24593e-06, -97.1356},{-137.49, -3.74507e-06, -85.6772},{-144.321, -3.21669e-06, -73.5894},{-150.092, -2.66469e-06, -60.961},{-154.761, -2.09311e-06, -47.8849},
shuhei2306 0:cbd607fc4caa 97 {-158.293, -1.50616e-06, -34.457},{-160.662, -9.08145e-07, -20.7759},{-161.851, -3.03458e-07, -6.94231},{-161.851, 3.03459e-07, 6.94232},{-160.662, 9.08147e-07, 20.776},{-158.293, 1.50616e-06, 34.457},{-154.761, 2.09312e-06, 47.8849},{-150.092, 2.66469e-06, 60.9611},
shuhei2306 0:cbd607fc4caa 98 {-144.321, 3.2167e-06, 73.5894},{-137.49, 3.74507e-06, 85.6772},{-129.648, 4.24593e-06, 97.1356},{-120.854, 4.7156e-06, 107.88},{-111.173, 5.15064e-06, 117.833},{-100.675, 5.54784e-06, 126.92}},
shuhei2306 0:cbd607fc4caa 99 {{-98.8175, -21.2293, 126.603},{-109.383, -21.2293, 117.595},{-119.131, -21.2293, 107.708},{-127.989, -21.2293, 97.0158},{-135.89, -21.2293, 85.5985},{-142.776, -21.2293, 73.5415},{-148.594, -21.2293, 60.9347},{-153.302, -21.2293, 47.8725},{-156.864, -21.2293, 34.4526},
shuhei2306 0:cbd607fc4caa 100 {-159.254, -21.2293, 20.7751},{-160.453, -21.2293, 6.94233},{-160.453, -21.2293, -6.94233},{-159.254, -21.2293, -20.7751},{-156.864, -21.2293, -34.4526},{-153.302, -21.2293, -47.8726},{-148.594, -21.2293, -60.9347},{-142.776, -21.2293, -73.5415},{-135.89, -21.2293, -85.5985},
shuhei2306 0:cbd607fc4caa 101 {-127.989, -21.2293, -97.0158},{-119.131, -21.2293, -107.708},{-109.383, -21.2293, -117.595},{-98.8175, -21.2293, -126.603}},
shuhei2306 0:cbd607fc4caa 102 {{-104.014, -42.0925, -116.848},{-113.965, -42.0925, -107.165},{-123.018, -42.0925, -96.6378},{-131.102, -42.0925, -85.3496},{-138.153, -42.0925, -73.3891},{-144.116, -42.0925, -60.8505},{-148.944, -42.0925, -47.8326},{-152.598, -42.0925, -34.4378},{-155.051, -42.0925, -20.7718},
shuhei2306 0:cbd607fc4caa 103 {-156.282, -42.0925, -6.94215},{-156.282, -42.0925, 6.94218},{-155.051, -42.0925, 20.7718},{-152.598, -42.0925, 34.4378},{-148.944, -42.0925, 47.8326},{-144.116, -42.0925, 60.8505},{-138.153, -42.0925, 73.3891},{-131.102, -42.0925, 85.3497},{-123.018, -42.0925, 96.6378},
shuhei2306 0:cbd607fc4caa 104 {-113.965, -42.0925, 107.165},{-104.014, -42.0925, 116.848},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 105 {{-100.308, -62.2297, 110.95},{-110.163, -62.2297, 101.171},{-119.07, -62.2297, 90.5197},{-126.95, -62.2297, 79.0889},{-133.737, -62.2297, 66.9766},{-139.371, -62.2297, 54.2873},{-143.805, -62.2297, 41.1301},{-146.999, -62.2297, 27.6186},{-148.927, -62.2297, 13.869},
shuhei2306 0:cbd607fc4caa 106 {-149.571, -62.2297, 9.2581e-06},{-148.927, -62.2297, -13.869},{-146.999, -62.2297, -27.6185},{-143.805, -62.2297, -41.1301},{-139.371, -62.2297, -54.2872},{-133.737, -62.2297, -66.9766},{-126.95, -62.2297, -79.0889},{-119.07, -62.2297, -90.5197},{-110.163, -62.2297, -101.171},
shuhei2306 0:cbd607fc4caa 107 {-100.308, -62.2297, -110.95},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 108 {{-103.159, -81.2937, -94.8345},{-112.037, -81.2936, -84.1609},{-119.815, -81.2936, -72.6612},{-126.417, -81.2936, -60.4483},{-131.779, -81.2936, -47.642},{-135.846, -81.2936, -34.368},{-138.58, -81.2936, -20.7567},{-139.954, -81.2936, -6.9416},{-139.954, -81.2936, 6.94163},
shuhei2306 0:cbd607fc4caa 109 {-138.58, -81.2936, 20.7567},{-135.846, -81.2936, 34.368},{-131.779, -81.2936, 47.642},{-126.417, -81.2936, 60.4483},{-119.815, -81.2936, 72.6613},{-112.037, -81.2936, 84.1609},{-103.159, -81.2936, 94.8345},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}
shuhei2306 0:cbd607fc4caa 110 },{{{103.159, 81.2937, 94.8345},{112.037, 81.2936, 84.1609},{119.815, 81.2936, 72.6612},{126.417, 81.2936, 60.4483},{131.779, 81.2936, 47.642},{135.846, 81.2936, 34.368},{138.58, 81.2936, 20.7567},{139.954, 81.2936, 6.94162},{139.954, 81.2936, -6.94162},{138.58, 81.2936, -20.7567},
shuhei2306 0:cbd607fc4caa 111 {135.846, 81.2936, -34.368},{131.779, 81.2936, -47.642},{126.417, 81.2936, -60.4483},{119.815, 81.2936, -72.6612},{112.037, 81.2936, -84.1609},{103.159, 81.2936, -94.8345},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 112 {{100.308, 62.2297, -110.95},{110.163, 62.2297, -101.171},{119.07, 62.2297, -90.5197},{126.95, 62.2297, -79.0889},{133.737, 62.2297, -66.9766},{139.371, 62.2297, -54.2872},{143.805, 62.2297, -41.1301},{146.999, 62.2297, -27.6185},{148.927, 62.2297, -13.869},{149.571, 62.2297, 3.8178e-06},
shuhei2306 0:cbd607fc4caa 113 {148.927, 62.2297, 13.869},{146.999, 62.2297, 27.6185},{143.805, 62.2297, 41.1301},{139.371, 62.2297, 54.2872},{133.737, 62.2297, 66.9766},{126.95, 62.2297, 79.0889},{119.07, 62.2297, 90.5197},{110.163, 62.2297, 101.171},{100.308, 62.2297, 110.95},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 114 {{104.014, 42.0925, 116.848},{113.965, 42.0925, 107.165},{123.018, 42.0925, 96.6378},{131.102, 42.0925, 85.3497},{138.153, 42.0925, 73.3891},{144.116, 42.0925, 60.8505},{148.944, 42.0925, 47.8326},{152.598, 42.0925, 34.4378},{155.051, 42.0925, 20.7718},{156.282, 42.0925, 6.94217},
shuhei2306 0:cbd607fc4caa 115 {156.282, 42.0925, -6.94216},{155.051, 42.0925, -20.7718},{152.598, 42.0925, -34.4378},{148.944, 42.0925, -47.8326},{144.116, 42.0925, -60.8505},{138.153, 42.0925, -73.3891},{131.102, 42.0925, -85.3496},{123.018, 42.0925, -96.6378},{113.965, 42.0925, -107.165},
shuhei2306 0:cbd607fc4caa 116 {104.014, 42.0925, -116.848},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 117 {{98.8175, 21.2293, -126.603},{109.383, 21.2293, -117.595},{119.131, 21.2293, -107.708},{127.989, 21.2293, -97.0158},{135.89, 21.2293, -85.5985},{142.776, 21.2293, -73.5415},{148.594, 21.2293, -60.9347},{153.302, 21.2293, -47.8725},{156.864, 21.2293, -34.4526},
shuhei2306 0:cbd607fc4caa 118 {159.254, 21.2293, -20.7751},{160.453, 21.2293, -6.94232},{160.453, 21.2293, 6.94234},{159.254, 21.2293, 20.7751},{156.864, 21.2293, 34.4526},{153.302, 21.2293, 47.8726},{148.594, 21.2293, 60.9347},{142.776, 21.2293, 73.5415},{135.89, 21.2293, 85.5986},
shuhei2306 0:cbd607fc4caa 119 {127.989, 21.2293, 97.0159},{119.131, 21.2293, 107.708},{109.383, 21.2293, 117.595},{98.8175, 21.2293, 126.603}},
shuhei2306 0:cbd607fc4caa 120 {{100.675, 5.54784e-06, 126.92},{111.173, 5.15064e-06, 117.833},{120.854, 4.7156e-06, 107.88},{129.648, 4.24593e-06, 97.1356},{137.49, 3.74507e-06, 85.6772},{144.321, 3.21669e-06, 73.5894},{150.092, 2.66469e-06, 60.9611},{154.761, 2.09311e-06, 47.8849},
shuhei2306 0:cbd607fc4caa 121 {158.293, 1.50616e-06, 34.457},{160.662, 9.08146e-07, 20.776},{161.851, 3.03459e-07, 6.94233},{161.851, -3.03458e-07, -6.94231},{160.662, -9.08146e-07, -20.776},{158.293, -1.50616e-06, -34.457},{154.761, -2.09312e-06, -47.8849},{150.092, -2.66469e-06, -60.9611},
shuhei2306 0:cbd607fc4caa 122 {144.321, -3.21669e-06, -73.5894},{137.49, -3.74507e-06, -85.6772},{129.648, -4.24593e-06, -97.1356},{120.854, -4.7156e-06, -107.88},{111.173, -5.15064e-06, -117.833},{100.675, -5.54784e-06, -126.92}},
shuhei2306 0:cbd607fc4caa 123 {{98.8175, -21.2293, -126.603},{109.383, -21.2293, -117.595},{119.131, -21.2293, -107.708},{127.989, -21.2293, -97.0158},{135.89, -21.2293, -85.5985},{142.776, -21.2293, -73.5415},{148.594, -21.2293, -60.9347},{153.302, -21.2293, -47.8725},{156.864, -21.2293, -34.4526},
shuhei2306 0:cbd607fc4caa 124 {159.254, -21.2293, -20.7751},{160.453, -21.2293, -6.94231},{160.453, -21.2293, 6.94235},{159.254, -21.2293, 20.7751},{156.864, -21.2293, 34.4526},{153.302, -21.2293, 47.8726},{148.594, -21.2293, 60.9347},{142.776, -21.2293, 73.5415},{135.89, -21.2293, 85.5986},
shuhei2306 0:cbd607fc4caa 125 {127.989, -21.2293, 97.0159},{119.131, -21.2293, 107.708},{109.383, -21.2293, 117.595},{98.8175, -21.2293, 126.603}},
shuhei2306 0:cbd607fc4caa 126 {{104.014, -42.0925, 116.848},{113.965, -42.0925, 107.165},{123.018, -42.0925, 96.6378},{131.102, -42.0925, 85.3497},{138.153, -42.0925, 73.3891},{144.116, -42.0925, 60.8505},{148.944, -42.0925, 47.8326},{152.598, -42.0925, 34.4378},{155.051, -42.0925, 20.7718},
shuhei2306 0:cbd607fc4caa 127 {156.282, -42.0925, 6.94217},{156.282, -42.0925, -6.94216},{155.051, -42.0925, -20.7718},{152.598, -42.0925, -34.4378},{148.944, -42.0925, -47.8326},{144.116, -42.0925, -60.8505},{138.153, -42.0925, -73.3891},{131.102, -42.0925, -85.3496},{123.018, -42.0925, -96.6378},
shuhei2306 0:cbd607fc4caa 128 {113.965, -42.0925, -107.165},{104.014, -42.0925, -116.848},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 129 {{100.308, -62.2297, -110.95},{110.163, -62.2297, -101.171},{119.07, -62.2297, -90.5197},{126.95, -62.2297, -79.0889},{133.737, -62.2297, -66.9766},{139.371, -62.2297, -54.2872},{143.805, -62.2297, -41.1301},{146.999, -62.2297, -27.6185},{148.927, -62.2297, -13.869},
shuhei2306 0:cbd607fc4caa 130 {149.571, -62.2297, 9.2581e-06},{148.927, -62.2297, 13.869},{146.999, -62.2297, 27.6186},{143.805, -62.2297, 41.1301},{139.371, -62.2297, 54.2873},{133.737, -62.2297, 66.9766},{126.95, -62.2297, 79.0889},{119.07, -62.2297, 90.5197},{110.163, -62.2297, 101.171},
shuhei2306 0:cbd607fc4caa 131 {100.308, -62.2297, 110.95},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 132 {{103.159, -81.2936, 94.8345},{112.037, -81.2936, 84.1609},{119.815, -81.2936, 72.6612},{126.417, -81.2936, 60.4483},{131.779, -81.2936, 47.642},{135.846, -81.2936, 34.368},{138.58, -81.2936, 20.7567},{139.954, -81.2936, 6.94162},{139.954, -81.2936, -6.94161},
shuhei2306 0:cbd607fc4caa 133 {138.58, -81.2936, -20.7567},{135.846, -81.2936, -34.368},{131.779, -81.2936, -47.642},{126.417, -81.2936, -60.4483},{119.815, -81.2936, -72.6612},{112.037, -81.2936, -84.1609},{103.159, -81.2937, -94.8345},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}
shuhei2306 0:cbd607fc4caa 134 },{{{94.8345, -103.159, -81.2937},{84.1609, -112.037, -81.2937},{72.6612, -119.815, -81.2937},{60.4483, -126.417, -81.2937},{47.642, -131.779, -81.2937},{34.368, -135.846, -81.2937},{20.7567, -138.58, -81.2937},{6.94161, -139.954, -81.2937},
shuhei2306 0:cbd607fc4caa 135 {-6.94162, -139.954, -81.2937},{-20.7567, -138.58, -81.2937},{-34.368, -135.846, -81.2937},{-47.642, -131.779, -81.2937},{-60.4483, -126.417, -81.2937},{-72.6612, -119.815, -81.2937},{-84.1609, -112.037, -81.2937},{-94.8345, -103.159, -81.2937},
shuhei2306 0:cbd607fc4caa 136 {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 137 {{-110.95, -100.308, -62.2297},{-101.171, -110.163, -62.2298},{-90.5197, -119.07, -62.2298},{-79.0889, -126.95, -62.2298},{-66.9766, -133.737, -62.2298},{-54.2872, -139.371, -62.2298},{-41.1301, -143.805, -62.2298},{-27.6185, -146.999, -62.2298},
shuhei2306 0:cbd607fc4caa 138 {-13.869, -148.927, -62.2298},{0, -149.571, -62.2298},{13.869, -148.927, -62.2298},{27.6185, -146.999, -62.2298},{41.1301, -143.805, -62.2298},{54.2872, -139.371, -62.2298},{66.9766, -133.737, -62.2298},{79.0889, -126.95, -62.2298},
shuhei2306 0:cbd607fc4caa 139 {90.5197, -119.07, -62.2298},{101.171, -110.163, -62.2298},{110.95, -100.308, -62.2297},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 140 {{116.848, -104.014, -42.0925},{107.165, -113.965, -42.0925},{96.6378, -123.018, -42.0925},{85.3497, -131.102, -42.0925},{73.3891, -138.153, -42.0925},{60.8505, -144.116, -42.0925},{47.8326, -148.944, -42.0925},{34.4378, -152.598, -42.0925},
shuhei2306 0:cbd607fc4caa 141 {20.7718, -155.051, -42.0925},{6.94216, -156.282, -42.0925},{-6.94217, -156.282, -42.0925},{-20.7718, -155.051, -42.0925},{-34.4378, -152.598, -42.0925},{-47.8326, -148.944, -42.0925},{-60.8505, -144.116, -42.0925},{-73.3891, -138.153, -42.0925},
shuhei2306 0:cbd607fc4caa 142 {-85.3497, -131.102, -42.0925},{-96.6378, -123.018, -42.0925},{-107.165, -113.965, -42.0925},{-116.848, -104.014, -42.0925},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 143 {{-126.603, -98.8175, -21.2293},{-117.595, -109.383, -21.2293},{-107.708, -119.131, -21.2293},{-97.0158, -127.989, -21.2293},{-85.5985, -135.89, -21.2293},{-73.5415, -142.776, -21.2294},{-60.9347, -148.594, -21.2294},{-47.8725, -153.302, -21.2294},
shuhei2306 0:cbd607fc4caa 144 {-34.4526, -156.864, -21.2294},{-20.7751, -159.254, -21.2294},{-6.94232, -160.453, -21.2294},{6.94234, -160.453, -21.2294},{20.7751, -159.254, -21.2294},{34.4526, -156.864, -21.2294},{47.8726, -153.302, -21.2294},{60.9347, -148.594, -21.2294},
shuhei2306 0:cbd607fc4caa 145 {73.5415, -142.776, -21.2294},{85.5986, -135.89, -21.2293},{97.0158, -127.989, -21.2293},{107.708, -119.131, -21.2293},{117.595, -109.383, -21.2293},{126.603, -98.8175, -21.2293}},
shuhei2306 0:cbd607fc4caa 146 {{126.92, -100.675, -8.80126e-06},{117.833, -111.173, -9.71905e-06},{107.88, -120.854, -1.05654e-05},{97.1356, -129.648, -1.13342e-05},{85.6772, -137.49, -1.20197e-05},{73.5894, -144.321, -1.2617e-05},{60.961, -150.092, -1.31215e-05},
shuhei2306 0:cbd607fc4caa 147 {47.8849, -154.761, -1.35297e-05},{34.457, -158.293, -1.38384e-05},{20.7759, -160.662, -1.40455e-05},{6.94232, -161.851, -1.41495e-05},{-6.94231, -161.851, -1.41495e-05},{-20.776, -160.662, -1.40455e-05},{-34.457, -158.293, -1.38384e-05},
shuhei2306 0:cbd607fc4caa 148 {-47.8849, -154.761, -1.35297e-05},{-60.9611, -150.092, -1.31215e-05},{-73.5894, -144.321, -1.2617e-05},{-85.6772, -137.49, -1.20197e-05},{-97.1356, -129.648, -1.13342e-05},{-107.88, -120.854, -1.05654e-05},{-117.833, -111.173, -9.71905e-06},
shuhei2306 0:cbd607fc4caa 149 {-126.92, -100.675, -8.80126e-06}},
shuhei2306 0:cbd607fc4caa 150 {{-126.603, -98.8175, 21.2293},{-117.595, -109.383, 21.2293},{-107.708, -119.131, 21.2293},{-97.0158, -127.989, 21.2293},{-85.5985, -135.89, 21.2293},{-73.5415, -142.776, 21.2293},{-60.9347, -148.594, 21.2293},{-47.8725, -153.302, 21.2293},
shuhei2306 0:cbd607fc4caa 151 {-34.4526, -156.864, 21.2293},{-20.7751, -159.254, 21.2293},{-6.94232, -160.453, 21.2293},{6.94234, -160.453, 21.2293},{20.7751, -159.254, 21.2293},{34.4526, -156.864, 21.2293},{47.8726, -153.302, 21.2293},{60.9347, -148.594, 21.2293},
shuhei2306 0:cbd607fc4caa 152 {73.5415, -142.776, 21.2293},{85.5986, -135.89, 21.2293},{97.0158, -127.989, 21.2293},{107.708, -119.131, 21.2293},{117.595, -109.383, 21.2293},{126.603, -98.8175, 21.2293}},
shuhei2306 0:cbd607fc4caa 153 {{116.848, -104.014, 42.0925},{107.165, -113.965, 42.0925},{96.6378, -123.018, 42.0925},{85.3497, -131.102, 42.0925},{73.3891, -138.153, 42.0925},{60.8505, -144.116, 42.0925},{47.8326, -148.944, 42.0925},{34.4378, -152.598, 42.0925},
shuhei2306 0:cbd607fc4caa 154 {20.7718, -155.051, 42.0925},{6.94216, -156.282, 42.0925},{-6.94217, -156.282, 42.0925},{-20.7718, -155.051, 42.0925},{-34.4378, -152.598, 42.0925},{-47.8326, -148.944, 42.0925},{-60.8505, -144.116, 42.0925},{-73.3891, -138.153, 42.0925},
shuhei2306 0:cbd607fc4caa 155 {-85.3497, -131.102, 42.0925},{-96.6378, -123.018, 42.0925},{-107.165, -113.965, 42.0925},{-116.848, -104.014, 42.0925},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 156 {{-110.95, -100.308, 62.2297},{-101.171, -110.163, 62.2297},{-90.5197, -119.07, 62.2297},{-79.0889, -126.95, 62.2297},{-66.9766, -133.737, 62.2297},{-54.2872, -139.371, 62.2297},{-41.1301, -143.805, 62.2297},{-27.6185, -146.999, 62.2297},
shuhei2306 0:cbd607fc4caa 157 {-13.869, -148.927, 62.2297},{0, -149.571, 62.2297},{13.869, -148.927, 62.2297},{27.6185, -146.999, 62.2297},{41.1301, -143.805, 62.2297},{54.2872, -139.371, 62.2297},{66.9766, -133.737, 62.2297},{79.0889, -126.95, 62.2297},
shuhei2306 0:cbd607fc4caa 158 {90.5197, -119.07, 62.2297},{101.171, -110.163, 62.2297},{110.95, -100.308, 62.2297},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:cbd607fc4caa 159 {{94.8345, -103.159, 81.2936},{84.1609, -112.037, 81.2936},{72.6612, -119.815, 81.2936},{60.4483, -126.417, 81.2936},{47.642, -131.779, 81.2936},{34.368, -135.846, 81.2936},{20.7567, -138.58, 81.2936},{6.94161, -139.954, 81.2936},
shuhei2306 0:cbd607fc4caa 160 {-6.94162, -139.954, 81.2936},{-20.7567, -138.58, 81.2936},{-34.368, -135.846, 81.2936},{-47.642, -131.779, 81.2936},{-60.4483, -126.417, 81.2936},{-72.6612, -119.815, 81.2936},{-84.1609, -112.037, 81.2936},{-94.8345, -103.159, 81.2936},
shuhei2306 0:cbd607fc4caa 161 {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}}};
shuhei2306 0:cbd607fc4caa 162
shuhei2306 0:cbd607fc4caa 163
shuhei2306 0:cbd607fc4caa 164 RotationMat rMat;
shuhei2306 0:cbd607fc4caa 165
shuhei2306 0:cbd607fc4caa 166 Vector3D position_vec;
shuhei2306 0:cbd607fc4caa 167 Vector3D rAxis(1,0,0);
shuhei2306 0:cbd607fc4caa 168 const Vector3D xAxis(1,0,0);
shuhei2306 0:cbd607fc4caa 169 const Vector3D yAxis(0,1,0);
shuhei2306 0:cbd607fc4caa 170 const Vector3D zAxis(0,0,1);
shuhei2306 0:cbd607fc4caa 171
shuhei2306 0:cbd607fc4caa 172 unsigned int angular_velocity;
shuhei2306 0:cbd607fc4caa 173 float rotation;
shuhei2306 0:cbd607fc4caa 174 float x_=0;
shuhei2306 0:cbd607fc4caa 175 float y_=0;
shuhei2306 0:cbd607fc4caa 176 float z_=0;
shuhei2306 0:cbd607fc4caa 177 float diff_rotation=2;
shuhei2306 0:cbd607fc4caa 178
shuhei2306 0:cbd607fc4caa 179 short longtitude;
shuhei2306 0:cbd607fc4caa 180 short latitude;
shuhei2306 0:cbd607fc4caa 181
shuhei2306 0:cbd607fc4caa 182 #define NUMPIXELS 178
shuhei2306 0:cbd607fc4caa 183 #define NUM_LINE 9
shuhei2306 0:cbd607fc4caa 184 #define NUM_TAPE 1
shuhei2306 0:cbd607fc4caa 185 Adafruit_DotStar strip(NUMPIXELS, DOTSTAR_RGB);
shuhei2306 0:cbd607fc4caa 186
shuhei2306 0:cbd607fc4caa 187 DigitalOut decoder_in_a(p24);
shuhei2306 0:cbd607fc4caa 188 DigitalOut decoder_in_b(p25);
shuhei2306 0:cbd607fc4caa 189 DigitalOut decoder_in_c(p26);
shuhei2306 0:cbd607fc4caa 190
shuhei2306 0:cbd607fc4caa 191 struct LedColor
shuhei2306 0:cbd607fc4caa 192 {
shuhei2306 0:cbd607fc4caa 193 unsigned char r;
shuhei2306 0:cbd607fc4caa 194 unsigned char g;
shuhei2306 0:cbd607fc4caa 195 unsigned char b;
shuhei2306 0:cbd607fc4caa 196 };
shuhei2306 0:cbd607fc4caa 197 struct LedColor ledcolor;
shuhei2306 0:cbd607fc4caa 198
shuhei2306 0:cbd607fc4caa 199 void selectDecoderCh(unsigned int num_ch)
shuhei2306 0:cbd607fc4caa 200 {
shuhei2306 0:cbd607fc4caa 201 decoder_in_a = num_ch & 0b1;
shuhei2306 0:cbd607fc4caa 202 decoder_in_b = (num_ch>>1) & 0b1;
shuhei2306 0:cbd607fc4caa 203 decoder_in_c = (num_ch>>2) & 0b1;
shuhei2306 0:cbd607fc4caa 204 }
shuhei2306 0:cbd607fc4caa 205
shuhei2306 0:cbd607fc4caa 206
shuhei2306 0:cbd607fc4caa 207 //回転
shuhei2306 0:cbd607fc4caa 208 void updateRotation(int i_tape, int i_line, int i_pixel)
shuhei2306 0:cbd607fc4caa 209 {
shuhei2306 0:cbd607fc4caa 210 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:cbd607fc4caa 211 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:cbd607fc4caa 212 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:cbd607fc4caa 213 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:cbd607fc4caa 214 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:cbd607fc4caa 215 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:cbd607fc4caa 216 }
shuhei2306 0:cbd607fc4caa 217
shuhei2306 0:cbd607fc4caa 218
shuhei2306 0:cbd607fc4caa 219 void setPixelcolor(int i_lednum)
shuhei2306 0:cbd607fc4caa 220 {
shuhei2306 0:cbd607fc4caa 221 // pc.printf("i_lednum:%d \n", i_lednum);
shuhei2306 0:cbd607fc4caa 222 if(i_lednum >= 176 ) //最後の白色消す用
shuhei2306 0:cbd607fc4caa 223 {
shuhei2306 0:cbd607fc4caa 224 strip.setPixelColor(i_lednum,
shuhei2306 0:cbd607fc4caa 225 0, //r
shuhei2306 0:cbd607fc4caa 226 0, //g
shuhei2306 0:cbd607fc4caa 227 0);//b
shuhei2306 0:cbd607fc4caa 228 }
shuhei2306 0:cbd607fc4caa 229 else if(longtitude>=0&&longtitude<45)
shuhei2306 0:cbd607fc4caa 230 {
shuhei2306 0:cbd607fc4caa 231 strip.setPixelColor(i_lednum,
shuhei2306 0:cbd607fc4caa 232 pixels0_45[longtitude][latitude][0], //r
shuhei2306 0:cbd607fc4caa 233 pixels0_45[longtitude][latitude][1], //g
shuhei2306 0:cbd607fc4caa 234 pixels0_45[longtitude][latitude][2]);//b
shuhei2306 0:cbd607fc4caa 235 /*
shuhei2306 0:cbd607fc4caa 236 pc.printf("pixels0_45[0]:%d \n", pixels0_45[longtitude][latitude][0]);
shuhei2306 0:cbd607fc4caa 237 pc.printf("pixels0_45[1]:%d \n", pixels0_45[longtitude][latitude][1]);
shuhei2306 0:cbd607fc4caa 238 pc.printf("pixels0_45[2]:%d \n", pixels0_45[longtitude][latitude][2]);
shuhei2306 0:cbd607fc4caa 239 */
shuhei2306 0:cbd607fc4caa 240
shuhei2306 0:cbd607fc4caa 241 }
shuhei2306 0:cbd607fc4caa 242 else if(longtitude>=45&&longtitude<90)
shuhei2306 0:cbd607fc4caa 243 {
shuhei2306 0:cbd607fc4caa 244 strip.setPixelColor(i_lednum,
shuhei2306 0:cbd607fc4caa 245 (uint8_t)pixels45_90[longtitude-45][latitude][0], //r
shuhei2306 0:cbd607fc4caa 246 (uint8_t)pixels45_90[longtitude-45][latitude][1], //g
shuhei2306 0:cbd607fc4caa 247 (uint8_t)pixels45_90[longtitude-45][latitude][2]);//b
shuhei2306 0:cbd607fc4caa 248 /*
shuhei2306 0:cbd607fc4caa 249 pc.printf("pixels45_90[0]:%d \n", pixels45_90[longtitude-45][latitude][0]);
shuhei2306 0:cbd607fc4caa 250 pc.printf("pixels45_90[1]:%d \n", pixels45_90[longtitude-45][latitude][1]);
shuhei2306 0:cbd607fc4caa 251 pc.printf("pixels45_90[2]:%d \n", pixels45_90[longtitude-45][latitude][2]);
shuhei2306 0:cbd607fc4caa 252 */
shuhei2306 0:cbd607fc4caa 253 }
shuhei2306 0:cbd607fc4caa 254 else if(longtitude>=90&&longtitude<135)
shuhei2306 0:cbd607fc4caa 255 {
shuhei2306 0:cbd607fc4caa 256 strip.setPixelColor(i_lednum,
shuhei2306 0:cbd607fc4caa 257 pixels90_135[longtitude-90][latitude][0], //r
shuhei2306 0:cbd607fc4caa 258 pixels90_135[longtitude-90][latitude][1], //g
shuhei2306 0:cbd607fc4caa 259 pixels90_135[longtitude-90][latitude][2]);//b
shuhei2306 0:cbd607fc4caa 260 /*
shuhei2306 0:cbd607fc4caa 261 pc.printf("pixels90_135[0]:%d \n", pixels90_135[longtitude-90][latitude][0]);
shuhei2306 0:cbd607fc4caa 262 pc.printf("pixels90_135[1]:%d \n", pixels90_135[longtitude-90][latitude][1]);
shuhei2306 0:cbd607fc4caa 263 pc.printf("pixels90_135[2]:%d \n", pixels90_135[longtitude-90][latitude][2]);
shuhei2306 0:cbd607fc4caa 264 */
shuhei2306 0:cbd607fc4caa 265 }
shuhei2306 0:cbd607fc4caa 266 else if(longtitude>=135&&longtitude<180)
shuhei2306 0:cbd607fc4caa 267 {
shuhei2306 0:cbd607fc4caa 268 strip.setPixelColor(i_lednum,
shuhei2306 0:cbd607fc4caa 269 pixels135_180[longtitude-135][latitude][0], //r
shuhei2306 0:cbd607fc4caa 270 pixels135_180[longtitude-135][latitude][1], //g
shuhei2306 0:cbd607fc4caa 271 pixels135_180[longtitude-135][latitude][2]);//b
shuhei2306 0:cbd607fc4caa 272 /*
shuhei2306 0:cbd607fc4caa 273 pc.printf("pixels135_180[0]:%d \n", pixels135_180[longtitude-135][latitude][0]);
shuhei2306 0:cbd607fc4caa 274 pc.printf("pixels135_180[1]:%d \n", pixels135_180[longtitude-135][latitude][1]);
shuhei2306 0:cbd607fc4caa 275 pc.printf("pixels135_180[2]:%d \n", pixels135_180[longtitude-135][latitude][2]);
shuhei2306 0:cbd607fc4caa 276 */
shuhei2306 0:cbd607fc4caa 277 }
shuhei2306 0:cbd607fc4caa 278 else if(longtitude>=180&&longtitude<225)
shuhei2306 0:cbd607fc4caa 279 {
shuhei2306 0:cbd607fc4caa 280 strip.setPixelColor(i_lednum,
shuhei2306 0:cbd607fc4caa 281 pixels180_225[longtitude-135][latitude][0], //r
shuhei2306 0:cbd607fc4caa 282 pixels180_225[longtitude-135][latitude][1], //g
shuhei2306 0:cbd607fc4caa 283 pixels180_225[longtitude-135][latitude][2]);//b
shuhei2306 0:cbd607fc4caa 284 }
shuhei2306 0:cbd607fc4caa 285 else if(longtitude>=225&&longtitude<270)
shuhei2306 0:cbd607fc4caa 286 {
shuhei2306 0:cbd607fc4caa 287 strip.setPixelColor(i_lednum,
shuhei2306 0:cbd607fc4caa 288 pixels225_270[longtitude-225][latitude][0], //r
shuhei2306 0:cbd607fc4caa 289 pixels225_270[longtitude-225][latitude][1], //g
shuhei2306 0:cbd607fc4caa 290 pixels225_270[longtitude-225][latitude][2]);//b
shuhei2306 0:cbd607fc4caa 291 }
shuhei2306 0:cbd607fc4caa 292 else if(longtitude>=270&&longtitude<315)
shuhei2306 0:cbd607fc4caa 293 {
shuhei2306 0:cbd607fc4caa 294 strip.setPixelColor(i_lednum,
shuhei2306 0:cbd607fc4caa 295 pixels270_315[longtitude-270][latitude][0], //r
shuhei2306 0:cbd607fc4caa 296 pixels270_315[longtitude-270][latitude][1], //g
shuhei2306 0:cbd607fc4caa 297 pixels270_315[longtitude-270][latitude][2]);//b
shuhei2306 0:cbd607fc4caa 298 }
shuhei2306 0:cbd607fc4caa 299 else if(longtitude>=315&&longtitude<=360)
shuhei2306 0:cbd607fc4caa 300 {
shuhei2306 0:cbd607fc4caa 301 strip.setPixelColor(i_lednum,
shuhei2306 0:cbd607fc4caa 302 pixels315_361[longtitude-315][latitude][0], //r
shuhei2306 0:cbd607fc4caa 303 pixels315_361[longtitude-315][latitude][1], //g
shuhei2306 0:cbd607fc4caa 304 pixels315_361[longtitude-315][latitude][2]);//b
shuhei2306 0:cbd607fc4caa 305 }
shuhei2306 0:cbd607fc4caa 306 }
shuhei2306 0:cbd607fc4caa 307
shuhei2306 0:cbd607fc4caa 308 void set_strip_color(int i_tape, int i_line, int i_pixel, int i_lednum)
shuhei2306 0:cbd607fc4caa 309 {
shuhei2306 0:cbd607fc4caa 310 //calc longtitude
shuhei2306 0:cbd607fc4caa 311 position_vec.x = v_leds[i_tape][i_line][i_pixel][0];
shuhei2306 0:cbd607fc4caa 312 position_vec.y = v_leds[i_tape][i_line][i_pixel][1];
shuhei2306 0:cbd607fc4caa 313 position_vec.z = v_leds[i_tape][i_line][i_pixel][2];
shuhei2306 0:cbd607fc4caa 314
shuhei2306 0:cbd607fc4caa 315 if(position_vec.x > 0)
shuhei2306 0:cbd607fc4caa 316 {
shuhei2306 0:cbd607fc4caa 317 longtitude = (short)floor( angle(zAxis, position_vec) );
shuhei2306 0:cbd607fc4caa 318 }
shuhei2306 0:cbd607fc4caa 319 else
shuhei2306 0:cbd607fc4caa 320 {
shuhei2306 0:cbd607fc4caa 321 longtitude = (short)floor( 360.0f - angle(zAxis, position_vec));
shuhei2306 0:cbd607fc4caa 322 }
shuhei2306 0:cbd607fc4caa 323
shuhei2306 0:cbd607fc4caa 324 //calc latitude
shuhei2306 0:cbd607fc4caa 325 position_vec.x = v_leds[i_tape][i_line][i_pixel][0];
shuhei2306 0:cbd607fc4caa 326 position_vec.y = v_leds[i_tape][i_line][i_pixel][1];
shuhei2306 0:cbd607fc4caa 327 position_vec.z = v_leds[i_tape][i_line][i_pixel][2];
shuhei2306 0:cbd607fc4caa 328
shuhei2306 0:cbd607fc4caa 329 latitude = (short)floor( angle(yAxis, position_vec) );
shuhei2306 0:cbd607fc4caa 330
shuhei2306 0:cbd607fc4caa 331
shuhei2306 0:cbd607fc4caa 332
shuhei2306 0:cbd607fc4caa 333 setPixelcolor(i_lednum);
shuhei2306 0:cbd607fc4caa 334 }
shuhei2306 0:cbd607fc4caa 335
shuhei2306 0:cbd607fc4caa 336 void init()
shuhei2306 0:cbd607fc4caa 337 {
shuhei2306 0:cbd607fc4caa 338 angular_velocity=10;
shuhei2306 0:cbd607fc4caa 339
shuhei2306 0:cbd607fc4caa 340 pc.baud(9600);
shuhei2306 0:cbd607fc4caa 341 pc.printf("Hello World!\n");
shuhei2306 0:cbd607fc4caa 342 /*
shuhei2306 0:cbd607fc4caa 343 mkdir("/sd/001.txt", 0777);
shuhei2306 0:cbd607fc4caa 344 fp = fopen("/sd/001.txt","r");
shuhei2306 0:cbd607fc4caa 345
shuhei2306 0:cbd607fc4caa 346 if(fp == NULL)
shuhei2306 0:cbd607fc4caa 347 {
shuhei2306 0:cbd607fc4caa 348 error("Could not open file for read\n");
shuhei2306 0:cbd607fc4caa 349 }
shuhei2306 0:cbd607fc4caa 350 */
shuhei2306 0:cbd607fc4caa 351 timer.start();
shuhei2306 0:cbd607fc4caa 352
shuhei2306 0:cbd607fc4caa 353 strip.begin(); //Initialize
shuhei2306 0:cbd607fc4caa 354 for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:cbd607fc4caa 355 {
shuhei2306 0:cbd607fc4caa 356 selectDecoderCh(i_tape);
shuhei2306 0:cbd607fc4caa 357 strip.show(); //Turn all LEDs off ASAP
shuhei2306 0:cbd607fc4caa 358 }
shuhei2306 0:cbd607fc4caa 359 }
shuhei2306 0:cbd607fc4caa 360
shuhei2306 0:cbd607fc4caa 361 int main() {
shuhei2306 0:cbd607fc4caa 362 init();
shuhei2306 0:cbd607fc4caa 363
shuhei2306 0:cbd607fc4caa 364 while(1)
shuhei2306 0:cbd607fc4caa 365 {
shuhei2306 0:cbd607fc4caa 366 //回転ベクトル更新
shuhei2306 0:cbd607fc4caa 367 rMat.calMat(angular_velocity, rAxis.x, rAxis.y, rAxis.z);
shuhei2306 0:cbd607fc4caa 368
shuhei2306 0:cbd607fc4caa 369 //バレーボール6枚
shuhei2306 0:cbd607fc4caa 370 for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:cbd607fc4caa 371 {
shuhei2306 0:cbd607fc4caa 372 selectDecoderCh(i_tape);
shuhei2306 0:cbd607fc4caa 373 //バレーボール1枚あたりのLEDの本数
shuhei2306 0:cbd607fc4caa 374 for(int i_line=0; i_line<NUM_LINE; i_line++)
shuhei2306 0:cbd607fc4caa 375 {
shuhei2306 0:cbd607fc4caa 376 switch(i_line)
shuhei2306 0:cbd607fc4caa 377 {
shuhei2306 0:cbd607fc4caa 378 case 0:
shuhei2306 0:cbd607fc4caa 379 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 0:cbd607fc4caa 380 {
shuhei2306 0:cbd607fc4caa 381 updateRotation(i_tape, i_line, i_pixel);
shuhei2306 0:cbd607fc4caa 382 set_strip_color(i_tape, i_line, i_pixel, i_pixel);
shuhei2306 0:cbd607fc4caa 383 }
shuhei2306 0:cbd607fc4caa 384 break;
shuhei2306 0:cbd607fc4caa 385 case 1:
shuhei2306 0:cbd607fc4caa 386 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 0:cbd607fc4caa 387 {
shuhei2306 0:cbd607fc4caa 388 updateRotation(i_tape, i_line, i_pixel);
shuhei2306 0:cbd607fc4caa 389 set_strip_color(i_tape, i_line, i_pixel, i_pixel+16);
shuhei2306 0:cbd607fc4caa 390 }
shuhei2306 0:cbd607fc4caa 391 break;
shuhei2306 0:cbd607fc4caa 392 case 2:
shuhei2306 0:cbd607fc4caa 393 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 0:cbd607fc4caa 394 {
shuhei2306 0:cbd607fc4caa 395 updateRotation(i_tape, i_line, i_pixel);
shuhei2306 0:cbd607fc4caa 396 set_strip_color(i_tape, i_line, i_pixel, i_pixel+35);
shuhei2306 0:cbd607fc4caa 397 }
shuhei2306 0:cbd607fc4caa 398 break;
shuhei2306 0:cbd607fc4caa 399 case 3:
shuhei2306 0:cbd607fc4caa 400 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:cbd607fc4caa 401 {
shuhei2306 0:cbd607fc4caa 402 updateRotation(i_tape, i_line, i_pixel);
shuhei2306 0:cbd607fc4caa 403 set_strip_color(i_tape, i_line, i_pixel, i_pixel+55);
shuhei2306 0:cbd607fc4caa 404 }
shuhei2306 0:cbd607fc4caa 405 break;
shuhei2306 0:cbd607fc4caa 406 case 4:
shuhei2306 0:cbd607fc4caa 407 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:cbd607fc4caa 408 {
shuhei2306 1:28cfbd0cc92e 409 updateRotation(i_tape, i_line, i_pixel);
shuhei2306 0:cbd607fc4caa 410 set_strip_color(i_tape, i_line, i_pixel, i_pixel+77);
shuhei2306 0:cbd607fc4caa 411 }
shuhei2306 0:cbd607fc4caa 412 break;
shuhei2306 0:cbd607fc4caa 413 case 5:
shuhei2306 0:cbd607fc4caa 414 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:cbd607fc4caa 415 {
shuhei2306 0:cbd607fc4caa 416 updateRotation(i_tape, i_line, i_pixel);
shuhei2306 0:cbd607fc4caa 417 set_strip_color(i_tape, i_line, i_pixel, i_pixel+99);
shuhei2306 0:cbd607fc4caa 418 }
shuhei2306 0:cbd607fc4caa 419 break;
shuhei2306 0:cbd607fc4caa 420 case 6:
shuhei2306 0:cbd607fc4caa 421 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 0:cbd607fc4caa 422 {
shuhei2306 0:cbd607fc4caa 423 updateRotation(i_tape, i_line, i_pixel);
shuhei2306 0:cbd607fc4caa 424 set_strip_color(i_tape, i_line, i_pixel, i_pixel+121);
shuhei2306 0:cbd607fc4caa 425 }
shuhei2306 0:cbd607fc4caa 426 break;
shuhei2306 0:cbd607fc4caa 427 case 7:
shuhei2306 0:cbd607fc4caa 428 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 0:cbd607fc4caa 429 {
shuhei2306 0:cbd607fc4caa 430 updateRotation(i_tape, i_line, i_pixel);
shuhei2306 0:cbd607fc4caa 431 set_strip_color(i_tape, i_line, i_pixel, i_pixel+141);
shuhei2306 0:cbd607fc4caa 432 }
shuhei2306 0:cbd607fc4caa 433 break;
shuhei2306 0:cbd607fc4caa 434 case 8:
shuhei2306 0:cbd607fc4caa 435 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 0:cbd607fc4caa 436 {
shuhei2306 0:cbd607fc4caa 437 updateRotation(i_tape, i_line, i_pixel);
shuhei2306 0:cbd607fc4caa 438 set_strip_color(i_tape, i_line, i_pixel, i_pixel+160);
shuhei2306 0:cbd607fc4caa 439 }
shuhei2306 0:cbd607fc4caa 440 break;
shuhei2306 0:cbd607fc4caa 441 }
shuhei2306 0:cbd607fc4caa 442 }
shuhei2306 0:cbd607fc4caa 443 //白色点灯回避用
shuhei2306 0:cbd607fc4caa 444 strip.setPixelColor(176,0,0,0);
shuhei2306 0:cbd607fc4caa 445 strip.setPixelColor(177,0,0,0);
shuhei2306 0:cbd607fc4caa 446
shuhei2306 0:cbd607fc4caa 447 strip.show();
shuhei2306 0:cbd607fc4caa 448 }
shuhei2306 0:cbd607fc4caa 449 }
shuhei2306 0:cbd607fc4caa 450 }
shuhei2306 0:cbd607fc4caa 451 /* for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:cbd607fc4caa 452 {
shuhei2306 0:cbd607fc4caa 453 selectDecoderCh(i_tape);
shuhei2306 0:cbd607fc4caa 454 for(int i_pixel=0; i_pixel<NUMPIXELS; i_pixel++)
shuhei2306 0:cbd607fc4caa 455 {
shuhei2306 0:cbd607fc4caa 456 strip.setPixelColor(i_pixel, 100*i_pixel/NUMPIXELS, 100*(NUMPIXELS-i_pixel)/NUMPIXELS, 0);
shuhei2306 0:cbd607fc4caa 457 }
shuhei2306 0:cbd607fc4caa 458 strip.show();
shuhei2306 0:cbd607fc4caa 459 }
shuhei2306 0:cbd607fc4caa 460
shuhei2306 0:cbd607fc4caa 461 for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:cbd607fc4caa 462 {
shuhei2306 0:cbd607fc4caa 463 selectDecoderCh(i_tape);
shuhei2306 0:cbd607fc4caa 464 for(int i_pixel=0; i_pixel<NUMPIXELS; i_pixel++)
shuhei2306 0:cbd607fc4caa 465 {
shuhei2306 0:cbd607fc4caa 466 strip.setPixelColor(i_pixel, 0, 100*i_pixel/NUMPIXELS, 100*(NUMPIXELS-i_pixel)/NUMPIXELS);
shuhei2306 0:cbd607fc4caa 467 }
shuhei2306 0:cbd607fc4caa 468 strip.show();
shuhei2306 0:cbd607fc4caa 469 }
shuhei2306 0:cbd607fc4caa 470 */
shuhei2306 0:cbd607fc4caa 471
shuhei2306 0:cbd607fc4caa 472 /*
shuhei2306 0:cbd607fc4caa 473 while(1) {
shuhei2306 0:cbd607fc4caa 474 // testes=fgetc(fp);
shuhei2306 0:cbd607fc4caa 475 // pc.printf("%d\n", (int)testes - 48);
shuhei2306 0:cbd607fc4caa 476 wait(0.01);
shuhei2306 0:cbd607fc4caa 477
shuhei2306 0:cbd607fc4caa 478 // pc.printf("sdData[9]: %d\n", (int)(sdData[9]));
shuhei2306 0:cbd607fc4caa 479
shuhei2306 0:cbd607fc4caa 480 if(ontime == false)
shuhei2306 0:cbd607fc4caa 481 {
shuhei2306 0:cbd607fc4caa 482 fread(compareT_b, 1,3, fp);
shuhei2306 0:cbd607fc4caa 483
shuhei2306 0:cbd607fc4caa 484 //fgets(compareT_b, 3+1, fp);//取ってくる個数+1
shuhei2306 0:cbd607fc4caa 485 pc.printf("Compare0: %d\n", (int)( compareT_b[0]));
shuhei2306 0:cbd607fc4caa 486 pc.printf("Compare1: %d\n", (int)( compareT_b[1]));
shuhei2306 0:cbd607fc4caa 487 pc.printf("Compare2: %d\n", (int)( compareT_b[2]));
shuhei2306 0:cbd607fc4caa 488 compareT = (unsigned long)(compareT_b[0]) * 256 * 256 + (unsigned long)(compareT_b[1]) * 256 + (unsigned long)compareT_b[2];//符号拡張阻止
shuhei2306 0:cbd607fc4caa 489 //pc.putc(compareT);
shuhei2306 0:cbd607fc4caa 490 pc.printf("Compare: %d\n", compareT);
shuhei2306 0:cbd607fc4caa 491
shuhei2306 0:cbd607fc4caa 492 ontime = true;
shuhei2306 0:cbd607fc4caa 493 }
shuhei2306 0:cbd607fc4caa 494
shuhei2306 0:cbd607fc4caa 495 if( timer.read()*1000 > compareT)//compareTが現在の時間がcomparetTを超えたら
shuhei2306 0:cbd607fc4caa 496 {
shuhei2306 0:cbd607fc4caa 497 ontime = false;
shuhei2306 0:cbd607fc4caa 498
shuhei2306 0:cbd607fc4caa 499 // SDカードをbyte_num分、読み取る (57Byte)
shuhei2306 0:cbd607fc4caa 500 //fgets(sdData, byte_num+1+2, fp);//取ってくる個数+1
shuhei2306 0:cbd607fc4caa 501 fread(sdData, 1,byte_num, fp);
shuhei2306 0:cbd607fc4caa 502 pc.printf("sdData[0]: %d\n", (int)(sdData[0]));
shuhei2306 0:cbd607fc4caa 503 pc.printf("sdData[1]: %d\n", (int)(sdData[1]));
shuhei2306 0:cbd607fc4caa 504 pc.printf("sdData[2]: %d\n", (int)(sdData[2]));
shuhei2306 0:cbd607fc4caa 505 }
shuhei2306 0:cbd607fc4caa 506 }
shuhei2306 0:cbd607fc4caa 507 */