Shuhei Tsuchida / Mbed 2 deprecated dotstar_old_style_6volleyball

Dependencies:   RotationMat_ SDFileSystem math mbed trigonometric_fanc

Committer:
shuhei2306
Date:
Mon Feb 01 13:53:13 2016 +0000
Revision:
0:28d0b65a60fe
Child:
1:64ca0218709d
first_commit;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shuhei2306 0:28d0b65a60fe 1
shuhei2306 0:28d0b65a60fe 2 #include "mbed.h"
shuhei2306 0:28d0b65a60fe 3 #include "SDFileSystem.h"
shuhei2306 0:28d0b65a60fe 4 #include "Adafruit_DotStar.h"
shuhei2306 0:28d0b65a60fe 5 #include "LedData.h"
shuhei2306 0:28d0b65a60fe 6
shuhei2306 0:28d0b65a60fe 7 #include "Vector3D.h"
shuhei2306 0:28d0b65a60fe 8 #include "RotationMat.h"
shuhei2306 0:28d0b65a60fe 9 #include <math.h>
shuhei2306 0:28d0b65a60fe 10
shuhei2306 0:28d0b65a60fe 11 SDFileSystem sd(p11, p12, p13, p14, "sd"); // the pinout on the mbed Cool Components workshop board
shuhei2306 0:28d0b65a60fe 12 Serial pc(USBTX, USBRX); // tx, rx
shuhei2306 0:28d0b65a60fe 13 FILE *fp;
shuhei2306 0:28d0b65a60fe 14
shuhei2306 0:28d0b65a60fe 15 LocalFileSystem local("local"); // Create the local filesystem under the name "local"
shuhei2306 0:28d0b65a60fe 16
shuhei2306 0:28d0b65a60fe 17 //const int byte_num = 114;//3*19 *2上下 // CSVから一度に読み込むバイト数 // 改行2バイト分読み込みをどこかで考える(アスキーコード 13と10)
shuhei2306 0:28d0b65a60fe 18
shuhei2306 0:28d0b65a60fe 19 //int rState = 3; // シリアル値によって変化
shuhei2306 0:28d0b65a60fe 20 bool ontime = false;
shuhei2306 0:28d0b65a60fe 21 unsigned char compareT_b[3];
shuhei2306 0:28d0b65a60fe 22 unsigned long compareT = 0;//比較する数値
shuhei2306 0:28d0b65a60fe 23 //unsigned long diff_time = 0;//時間調整用
shuhei2306 0:28d0b65a60fe 24 //unsigned long start_time = 0;//時間調整用
shuhei2306 0:28d0b65a60fe 25 Timer timer;
shuhei2306 0:28d0b65a60fe 26
shuhei2306 0:28d0b65a60fe 27 float v_leds[6][9][22][3]=
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 32 {0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 41 {126.603, 98.8175, -21.2293}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 84 },
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 89 {-100.308, 62.2297, -110.95},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 92 {-113.965, 42.0925, 107.165},{-104.014, 42.0925, 116.848},{0,0,0},{0,0,0}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 104 {-113.965, -42.0925, 107.165},{-104.014, -42.0925, 116.848},{0,0,0},{0,0,0}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 107 {-100.308, -62.2297, -110.95},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 116 {104.014, 42.0925, -116.848},{0,0,0},{0,0,0}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 128 {113.965, -42.0925, -107.165},{104.014, -42.0925, -116.848},{0,0,0},{0,0,0}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 131 {100.308, -62.2297, 110.95},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 136 {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 149 {-126.92, -100.675, -8.80126e-06}},
shuhei2306 0:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 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:28d0b65a60fe 161 {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}}};
shuhei2306 0:28d0b65a60fe 162
shuhei2306 0:28d0b65a60fe 163
shuhei2306 0:28d0b65a60fe 164 RotationMat rMat;
shuhei2306 0:28d0b65a60fe 165
shuhei2306 0:28d0b65a60fe 166 Vector3D position_vec;
shuhei2306 0:28d0b65a60fe 167 Vector3D rAxis(1,0,0);
shuhei2306 0:28d0b65a60fe 168 const Vector3D xAxis(1,0,0);
shuhei2306 0:28d0b65a60fe 169 const Vector3D yAxis(0,1,0);
shuhei2306 0:28d0b65a60fe 170 const Vector3D zAxis(0,0,1);
shuhei2306 0:28d0b65a60fe 171
shuhei2306 0:28d0b65a60fe 172 unsigned int angular_velocity;
shuhei2306 0:28d0b65a60fe 173 float rotation;
shuhei2306 0:28d0b65a60fe 174 float x_=0;
shuhei2306 0:28d0b65a60fe 175 float y_=0;
shuhei2306 0:28d0b65a60fe 176 float z_=0;
shuhei2306 0:28d0b65a60fe 177 float diff_rotation=2;
shuhei2306 0:28d0b65a60fe 178
shuhei2306 0:28d0b65a60fe 179 short longtitude;
shuhei2306 0:28d0b65a60fe 180 short latitude;
shuhei2306 0:28d0b65a60fe 181
shuhei2306 0:28d0b65a60fe 182 #define NUMPIXELS 178
shuhei2306 0:28d0b65a60fe 183 #define NUM_LINE 9
shuhei2306 0:28d0b65a60fe 184 #define NUM_TAPE 1
shuhei2306 0:28d0b65a60fe 185 Adafruit_DotStar strip(NUMPIXELS, DOTSTAR_RGB);
shuhei2306 0:28d0b65a60fe 186
shuhei2306 0:28d0b65a60fe 187 DigitalOut decoder_in_a(p24);
shuhei2306 0:28d0b65a60fe 188 DigitalOut decoder_in_b(p25);
shuhei2306 0:28d0b65a60fe 189 DigitalOut decoder_in_c(p26);
shuhei2306 0:28d0b65a60fe 190
shuhei2306 0:28d0b65a60fe 191 struct LedColor
shuhei2306 0:28d0b65a60fe 192 {
shuhei2306 0:28d0b65a60fe 193 unsigned char r;
shuhei2306 0:28d0b65a60fe 194 unsigned char g;
shuhei2306 0:28d0b65a60fe 195 unsigned char b;
shuhei2306 0:28d0b65a60fe 196 };
shuhei2306 0:28d0b65a60fe 197 struct LedColor ledcolor;
shuhei2306 0:28d0b65a60fe 198
shuhei2306 0:28d0b65a60fe 199 void selectDecoderCh(unsigned int num_ch)
shuhei2306 0:28d0b65a60fe 200 {
shuhei2306 0:28d0b65a60fe 201 decoder_in_a = num_ch & 0b1;
shuhei2306 0:28d0b65a60fe 202 decoder_in_b = (num_ch>>1) & 0b1;
shuhei2306 0:28d0b65a60fe 203 decoder_in_c = (num_ch>>2) & 0b1;
shuhei2306 0:28d0b65a60fe 204 }
shuhei2306 0:28d0b65a60fe 205
shuhei2306 0:28d0b65a60fe 206
shuhei2306 0:28d0b65a60fe 207 //仮想LEDの回転
shuhei2306 0:28d0b65a60fe 208 //ロボットから受け取った値と連動させる?
shuhei2306 0:28d0b65a60fe 209 void updateRotation()
shuhei2306 0:28d0b65a60fe 210 {
shuhei2306 0:28d0b65a60fe 211 rMat.calMat(angular_velocity, rAxis.x, rAxis.y, rAxis.z);
shuhei2306 0:28d0b65a60fe 212 //バレーボール6枚
shuhei2306 0:28d0b65a60fe 213 for(int i_tape =0; i_tape < NUM_TAPE ; i_tape++)
shuhei2306 0:28d0b65a60fe 214 {
shuhei2306 0:28d0b65a60fe 215 //バレーボール1枚あたりのLEDの本数
shuhei2306 0:28d0b65a60fe 216 for(int i_line=0; i_line< NUM_LINE; i_line++)
shuhei2306 0:28d0b65a60fe 217 {
shuhei2306 0:28d0b65a60fe 218 switch(i_line)
shuhei2306 0:28d0b65a60fe 219 {
shuhei2306 0:28d0b65a60fe 220 case 0:
shuhei2306 0:28d0b65a60fe 221 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 222 {
shuhei2306 0:28d0b65a60fe 223 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:28d0b65a60fe 224 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:28d0b65a60fe 225 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:28d0b65a60fe 226 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:28d0b65a60fe 227 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:28d0b65a60fe 228 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 229 }
shuhei2306 0:28d0b65a60fe 230 break;
shuhei2306 0:28d0b65a60fe 231 case 1:
shuhei2306 0:28d0b65a60fe 232 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 233 {
shuhei2306 0:28d0b65a60fe 234 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:28d0b65a60fe 235 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:28d0b65a60fe 236 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:28d0b65a60fe 237 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:28d0b65a60fe 238 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:28d0b65a60fe 239 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 240 }
shuhei2306 0:28d0b65a60fe 241 break;
shuhei2306 0:28d0b65a60fe 242 case 2:
shuhei2306 0:28d0b65a60fe 243 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 244 {
shuhei2306 0:28d0b65a60fe 245 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:28d0b65a60fe 246 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:28d0b65a60fe 247 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:28d0b65a60fe 248 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:28d0b65a60fe 249 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:28d0b65a60fe 250 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 251 }
shuhei2306 0:28d0b65a60fe 252 break;
shuhei2306 0:28d0b65a60fe 253 case 3:
shuhei2306 0:28d0b65a60fe 254 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 255 {
shuhei2306 0:28d0b65a60fe 256 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:28d0b65a60fe 257 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:28d0b65a60fe 258 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:28d0b65a60fe 259 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:28d0b65a60fe 260 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:28d0b65a60fe 261 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 262 }
shuhei2306 0:28d0b65a60fe 263 break;
shuhei2306 0:28d0b65a60fe 264 case 4:
shuhei2306 0:28d0b65a60fe 265 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 266 {
shuhei2306 0:28d0b65a60fe 267 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:28d0b65a60fe 268 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:28d0b65a60fe 269 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:28d0b65a60fe 270 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:28d0b65a60fe 271 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:28d0b65a60fe 272 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 273 }
shuhei2306 0:28d0b65a60fe 274 break;
shuhei2306 0:28d0b65a60fe 275 case 5:
shuhei2306 0:28d0b65a60fe 276 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 277 {
shuhei2306 0:28d0b65a60fe 278 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:28d0b65a60fe 279 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:28d0b65a60fe 280 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:28d0b65a60fe 281 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:28d0b65a60fe 282 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:28d0b65a60fe 283 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 284 }
shuhei2306 0:28d0b65a60fe 285 break;
shuhei2306 0:28d0b65a60fe 286 case 6:
shuhei2306 0:28d0b65a60fe 287 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 288 {
shuhei2306 0:28d0b65a60fe 289 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:28d0b65a60fe 290 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:28d0b65a60fe 291 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:28d0b65a60fe 292 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:28d0b65a60fe 293 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:28d0b65a60fe 294 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 295 }
shuhei2306 0:28d0b65a60fe 296 break;
shuhei2306 0:28d0b65a60fe 297 case 7:
shuhei2306 0:28d0b65a60fe 298 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 299 {
shuhei2306 0:28d0b65a60fe 300 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:28d0b65a60fe 301 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:28d0b65a60fe 302 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:28d0b65a60fe 303 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:28d0b65a60fe 304 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:28d0b65a60fe 305 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 306 }
shuhei2306 0:28d0b65a60fe 307 break;
shuhei2306 0:28d0b65a60fe 308 case 8:
shuhei2306 0:28d0b65a60fe 309 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 310 {
shuhei2306 0:28d0b65a60fe 311 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 0:28d0b65a60fe 312 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 0:28d0b65a60fe 313 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 0:28d0b65a60fe 314 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 0:28d0b65a60fe 315 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 0:28d0b65a60fe 316 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 317 }
shuhei2306 0:28d0b65a60fe 318 break;
shuhei2306 0:28d0b65a60fe 319 }
shuhei2306 0:28d0b65a60fe 320 }
shuhei2306 0:28d0b65a60fe 321 }
shuhei2306 0:28d0b65a60fe 322 }
shuhei2306 0:28d0b65a60fe 323
shuhei2306 0:28d0b65a60fe 324
shuhei2306 0:28d0b65a60fe 325 void setPixelcolor(int i_lednum)
shuhei2306 0:28d0b65a60fe 326 {
shuhei2306 0:28d0b65a60fe 327 // pc.printf("i_lednum:%d \n", i_lednum);
shuhei2306 0:28d0b65a60fe 328 if(i_lednum >= 176 ) //最後の白色消す用
shuhei2306 0:28d0b65a60fe 329 {
shuhei2306 0:28d0b65a60fe 330 strip.setPixelColor(i_lednum,
shuhei2306 0:28d0b65a60fe 331 0, //r
shuhei2306 0:28d0b65a60fe 332 0, //g
shuhei2306 0:28d0b65a60fe 333 0);//b
shuhei2306 0:28d0b65a60fe 334 }
shuhei2306 0:28d0b65a60fe 335 else if(longtitude>=0&&longtitude<45)
shuhei2306 0:28d0b65a60fe 336 {
shuhei2306 0:28d0b65a60fe 337 strip.setPixelColor(i_lednum,
shuhei2306 0:28d0b65a60fe 338 pixels0_45[longtitude][latitude][0], //r
shuhei2306 0:28d0b65a60fe 339 pixels0_45[longtitude][latitude][1], //g
shuhei2306 0:28d0b65a60fe 340 pixels0_45[longtitude][latitude][2]);//b
shuhei2306 0:28d0b65a60fe 341 /*
shuhei2306 0:28d0b65a60fe 342 pc.printf("pixels0_45[0]:%d \n", pixels0_45[longtitude][latitude][0]);
shuhei2306 0:28d0b65a60fe 343 pc.printf("pixels0_45[1]:%d \n", pixels0_45[longtitude][latitude][1]);
shuhei2306 0:28d0b65a60fe 344 pc.printf("pixels0_45[2]:%d \n", pixels0_45[longtitude][latitude][2]);
shuhei2306 0:28d0b65a60fe 345 */
shuhei2306 0:28d0b65a60fe 346
shuhei2306 0:28d0b65a60fe 347 }
shuhei2306 0:28d0b65a60fe 348 else if(longtitude>=45&&longtitude<90)
shuhei2306 0:28d0b65a60fe 349 {
shuhei2306 0:28d0b65a60fe 350 strip.setPixelColor(i_lednum,
shuhei2306 0:28d0b65a60fe 351 (uint8_t)pixels45_90[longtitude-45][latitude][0], //r
shuhei2306 0:28d0b65a60fe 352 (uint8_t)pixels45_90[longtitude-45][latitude][1], //g
shuhei2306 0:28d0b65a60fe 353 (uint8_t)pixels45_90[longtitude-45][latitude][2]);//b
shuhei2306 0:28d0b65a60fe 354 /*
shuhei2306 0:28d0b65a60fe 355 pc.printf("pixels45_90[0]:%d \n", pixels45_90[longtitude-45][latitude][0]);
shuhei2306 0:28d0b65a60fe 356 pc.printf("pixels45_90[1]:%d \n", pixels45_90[longtitude-45][latitude][1]);
shuhei2306 0:28d0b65a60fe 357 pc.printf("pixels45_90[2]:%d \n", pixels45_90[longtitude-45][latitude][2]);
shuhei2306 0:28d0b65a60fe 358 */
shuhei2306 0:28d0b65a60fe 359 }
shuhei2306 0:28d0b65a60fe 360 else if(longtitude>=90&&longtitude<135)
shuhei2306 0:28d0b65a60fe 361 {
shuhei2306 0:28d0b65a60fe 362 strip.setPixelColor(i_lednum,
shuhei2306 0:28d0b65a60fe 363 pixels90_135[longtitude-90][latitude][0], //r
shuhei2306 0:28d0b65a60fe 364 pixels90_135[longtitude-90][latitude][1], //g
shuhei2306 0:28d0b65a60fe 365 pixels90_135[longtitude-90][latitude][2]);//b
shuhei2306 0:28d0b65a60fe 366 /*
shuhei2306 0:28d0b65a60fe 367 pc.printf("pixels90_135[0]:%d \n", pixels90_135[longtitude-90][latitude][0]);
shuhei2306 0:28d0b65a60fe 368 pc.printf("pixels90_135[1]:%d \n", pixels90_135[longtitude-90][latitude][1]);
shuhei2306 0:28d0b65a60fe 369 pc.printf("pixels90_135[2]:%d \n", pixels90_135[longtitude-90][latitude][2]);
shuhei2306 0:28d0b65a60fe 370 */
shuhei2306 0:28d0b65a60fe 371 }
shuhei2306 0:28d0b65a60fe 372 else if(longtitude>=135&&longtitude<180)
shuhei2306 0:28d0b65a60fe 373 {
shuhei2306 0:28d0b65a60fe 374 strip.setPixelColor(i_lednum,
shuhei2306 0:28d0b65a60fe 375 pixels135_180[longtitude-135][latitude][0], //r
shuhei2306 0:28d0b65a60fe 376 pixels135_180[longtitude-135][latitude][1], //g
shuhei2306 0:28d0b65a60fe 377 pixels135_180[longtitude-135][latitude][2]);//b
shuhei2306 0:28d0b65a60fe 378 /*
shuhei2306 0:28d0b65a60fe 379 pc.printf("pixels135_180[0]:%d \n", pixels135_180[longtitude-135][latitude][0]);
shuhei2306 0:28d0b65a60fe 380 pc.printf("pixels135_180[1]:%d \n", pixels135_180[longtitude-135][latitude][1]);
shuhei2306 0:28d0b65a60fe 381 pc.printf("pixels135_180[2]:%d \n", pixels135_180[longtitude-135][latitude][2]);
shuhei2306 0:28d0b65a60fe 382 */
shuhei2306 0:28d0b65a60fe 383 }
shuhei2306 0:28d0b65a60fe 384 else if(longtitude>=180&&longtitude<225)
shuhei2306 0:28d0b65a60fe 385 {
shuhei2306 0:28d0b65a60fe 386 strip.setPixelColor(i_lednum,
shuhei2306 0:28d0b65a60fe 387 pixels180_225[longtitude-135][latitude][0], //r
shuhei2306 0:28d0b65a60fe 388 pixels180_225[longtitude-135][latitude][1], //g
shuhei2306 0:28d0b65a60fe 389 pixels180_225[longtitude-135][latitude][2]);//b
shuhei2306 0:28d0b65a60fe 390 }
shuhei2306 0:28d0b65a60fe 391 else if(longtitude>=225&&longtitude<270)
shuhei2306 0:28d0b65a60fe 392 {
shuhei2306 0:28d0b65a60fe 393 strip.setPixelColor(i_lednum,
shuhei2306 0:28d0b65a60fe 394 pixels225_270[longtitude-225][latitude][0], //r
shuhei2306 0:28d0b65a60fe 395 pixels225_270[longtitude-225][latitude][1], //g
shuhei2306 0:28d0b65a60fe 396 pixels225_270[longtitude-225][latitude][2]);//b
shuhei2306 0:28d0b65a60fe 397 }
shuhei2306 0:28d0b65a60fe 398 else if(longtitude>=270&&longtitude<315)
shuhei2306 0:28d0b65a60fe 399 {
shuhei2306 0:28d0b65a60fe 400 strip.setPixelColor(i_lednum,
shuhei2306 0:28d0b65a60fe 401 pixels270_315[longtitude-270][latitude][0], //r
shuhei2306 0:28d0b65a60fe 402 pixels270_315[longtitude-270][latitude][1], //g
shuhei2306 0:28d0b65a60fe 403 pixels270_315[longtitude-270][latitude][2]);//b
shuhei2306 0:28d0b65a60fe 404 }
shuhei2306 0:28d0b65a60fe 405 else if(longtitude>=315&&longtitude<=360)
shuhei2306 0:28d0b65a60fe 406 {
shuhei2306 0:28d0b65a60fe 407 strip.setPixelColor(i_lednum,
shuhei2306 0:28d0b65a60fe 408 pixels315_361[longtitude-315][latitude][0], //r
shuhei2306 0:28d0b65a60fe 409 pixels315_361[longtitude-315][latitude][1], //g
shuhei2306 0:28d0b65a60fe 410 pixels315_361[longtitude-315][latitude][2]);//b
shuhei2306 0:28d0b65a60fe 411 }
shuhei2306 0:28d0b65a60fe 412 }
shuhei2306 0:28d0b65a60fe 413
shuhei2306 0:28d0b65a60fe 414 void set_strip_color(int i_tape, int i_line, int i_pixel, int i_lednum)
shuhei2306 0:28d0b65a60fe 415 {
shuhei2306 0:28d0b65a60fe 416 //calc longtitude
shuhei2306 0:28d0b65a60fe 417 position_vec.x = v_leds[i_tape][i_line][i_pixel][0];
shuhei2306 0:28d0b65a60fe 418 position_vec.y = v_leds[i_tape][i_line][i_pixel][1];
shuhei2306 0:28d0b65a60fe 419 position_vec.z = v_leds[i_tape][i_line][i_pixel][2];
shuhei2306 0:28d0b65a60fe 420
shuhei2306 0:28d0b65a60fe 421 if(position_vec.x > 0)
shuhei2306 0:28d0b65a60fe 422 {
shuhei2306 0:28d0b65a60fe 423 longtitude = (short)floor( angle(zAxis, position_vec) );
shuhei2306 0:28d0b65a60fe 424 }
shuhei2306 0:28d0b65a60fe 425 else
shuhei2306 0:28d0b65a60fe 426 {
shuhei2306 0:28d0b65a60fe 427 longtitude = (short)floor( 360.0f - angle(zAxis, position_vec));
shuhei2306 0:28d0b65a60fe 428 }
shuhei2306 0:28d0b65a60fe 429
shuhei2306 0:28d0b65a60fe 430 //calc latitude
shuhei2306 0:28d0b65a60fe 431 position_vec.x = v_leds[i_tape][i_line][i_pixel][0];
shuhei2306 0:28d0b65a60fe 432 position_vec.y = v_leds[i_tape][i_line][i_pixel][1];
shuhei2306 0:28d0b65a60fe 433 position_vec.z = v_leds[i_tape][i_line][i_pixel][2];
shuhei2306 0:28d0b65a60fe 434
shuhei2306 0:28d0b65a60fe 435 latitude = (short)floor( angle(yAxis, position_vec) );
shuhei2306 0:28d0b65a60fe 436
shuhei2306 0:28d0b65a60fe 437
shuhei2306 0:28d0b65a60fe 438
shuhei2306 0:28d0b65a60fe 439 setPixelcolor(i_lednum);
shuhei2306 0:28d0b65a60fe 440 }
shuhei2306 0:28d0b65a60fe 441
shuhei2306 0:28d0b65a60fe 442 void init()
shuhei2306 0:28d0b65a60fe 443 {
shuhei2306 0:28d0b65a60fe 444 angular_velocity=10;
shuhei2306 0:28d0b65a60fe 445
shuhei2306 0:28d0b65a60fe 446 pc.baud(9600);
shuhei2306 0:28d0b65a60fe 447 pc.printf("Hello World!\n");
shuhei2306 0:28d0b65a60fe 448 /*
shuhei2306 0:28d0b65a60fe 449 mkdir("/sd/001.txt", 0777);
shuhei2306 0:28d0b65a60fe 450 fp = fopen("/sd/001.txt","r");
shuhei2306 0:28d0b65a60fe 451
shuhei2306 0:28d0b65a60fe 452 if(fp == NULL)
shuhei2306 0:28d0b65a60fe 453 {
shuhei2306 0:28d0b65a60fe 454 error("Could not open file for read\n");
shuhei2306 0:28d0b65a60fe 455 }
shuhei2306 0:28d0b65a60fe 456 */
shuhei2306 0:28d0b65a60fe 457 timer.start();
shuhei2306 0:28d0b65a60fe 458
shuhei2306 0:28d0b65a60fe 459 strip.begin(); //Initialize
shuhei2306 0:28d0b65a60fe 460 for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:28d0b65a60fe 461 {
shuhei2306 0:28d0b65a60fe 462 selectDecoderCh(i_tape);
shuhei2306 0:28d0b65a60fe 463 strip.show(); //Turn all LEDs off ASAP
shuhei2306 0:28d0b65a60fe 464 }
shuhei2306 0:28d0b65a60fe 465 }
shuhei2306 0:28d0b65a60fe 466
shuhei2306 0:28d0b65a60fe 467 int main() {
shuhei2306 0:28d0b65a60fe 468 init();
shuhei2306 0:28d0b65a60fe 469
shuhei2306 0:28d0b65a60fe 470 while(1)
shuhei2306 0:28d0b65a60fe 471 {
shuhei2306 0:28d0b65a60fe 472 //回転エフェクト更新
shuhei2306 0:28d0b65a60fe 473 updateRotation();
shuhei2306 0:28d0b65a60fe 474
shuhei2306 0:28d0b65a60fe 475 for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:28d0b65a60fe 476 {
shuhei2306 0:28d0b65a60fe 477 selectDecoderCh(i_tape);
shuhei2306 0:28d0b65a60fe 478 for(int i_line=0; i_line<NUM_LINE; i_line++)
shuhei2306 0:28d0b65a60fe 479 {
shuhei2306 0:28d0b65a60fe 480 switch(i_line)
shuhei2306 0:28d0b65a60fe 481 {
shuhei2306 0:28d0b65a60fe 482 case 0:
shuhei2306 0:28d0b65a60fe 483 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 484 {
shuhei2306 0:28d0b65a60fe 485 set_strip_color(i_tape, i_line, i_pixel, i_pixel);
shuhei2306 0:28d0b65a60fe 486 }
shuhei2306 0:28d0b65a60fe 487 break;
shuhei2306 0:28d0b65a60fe 488 case 1:
shuhei2306 0:28d0b65a60fe 489 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 490 {
shuhei2306 0:28d0b65a60fe 491 set_strip_color(i_tape, i_line, i_pixel, i_pixel+16);
shuhei2306 0:28d0b65a60fe 492 }
shuhei2306 0:28d0b65a60fe 493 break;
shuhei2306 0:28d0b65a60fe 494 case 2:
shuhei2306 0:28d0b65a60fe 495 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 496 {
shuhei2306 0:28d0b65a60fe 497 set_strip_color(i_tape, i_line, i_pixel, i_pixel+35);
shuhei2306 0:28d0b65a60fe 498 }
shuhei2306 0:28d0b65a60fe 499 break;
shuhei2306 0:28d0b65a60fe 500 case 3:
shuhei2306 0:28d0b65a60fe 501 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 502 {
shuhei2306 0:28d0b65a60fe 503 set_strip_color(i_tape, i_line, i_pixel, i_pixel+55);
shuhei2306 0:28d0b65a60fe 504 }
shuhei2306 0:28d0b65a60fe 505 break;
shuhei2306 0:28d0b65a60fe 506 case 4:
shuhei2306 0:28d0b65a60fe 507 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 508 {
shuhei2306 0:28d0b65a60fe 509 set_strip_color(i_tape, i_line, i_pixel, i_pixel+77);
shuhei2306 0:28d0b65a60fe 510 }
shuhei2306 0:28d0b65a60fe 511 break;
shuhei2306 0:28d0b65a60fe 512 case 5:
shuhei2306 0:28d0b65a60fe 513 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 514 {
shuhei2306 0:28d0b65a60fe 515 set_strip_color(i_tape, i_line, i_pixel, i_pixel+99);
shuhei2306 0:28d0b65a60fe 516 }
shuhei2306 0:28d0b65a60fe 517 break;
shuhei2306 0:28d0b65a60fe 518 case 6:
shuhei2306 0:28d0b65a60fe 519 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 520 {
shuhei2306 0:28d0b65a60fe 521 set_strip_color(i_tape, i_line, i_pixel, i_pixel+121);
shuhei2306 0:28d0b65a60fe 522 }
shuhei2306 0:28d0b65a60fe 523 break;
shuhei2306 0:28d0b65a60fe 524 case 7:
shuhei2306 0:28d0b65a60fe 525 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 526 {
shuhei2306 0:28d0b65a60fe 527 set_strip_color(i_tape, i_line, i_pixel, i_pixel+141);
shuhei2306 0:28d0b65a60fe 528 }
shuhei2306 0:28d0b65a60fe 529 break;
shuhei2306 0:28d0b65a60fe 530 case 8:
shuhei2306 0:28d0b65a60fe 531 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 532 {
shuhei2306 0:28d0b65a60fe 533 set_strip_color(i_tape, i_line, i_pixel, i_pixel+160);
shuhei2306 0:28d0b65a60fe 534 }
shuhei2306 0:28d0b65a60fe 535 break;
shuhei2306 0:28d0b65a60fe 536 }
shuhei2306 0:28d0b65a60fe 537 }
shuhei2306 0:28d0b65a60fe 538 //白色点灯回避用
shuhei2306 0:28d0b65a60fe 539 strip.setPixelColor(176,0,0,0);
shuhei2306 0:28d0b65a60fe 540 strip.setPixelColor(177,0,0,0);
shuhei2306 0:28d0b65a60fe 541
shuhei2306 0:28d0b65a60fe 542 strip.show();
shuhei2306 0:28d0b65a60fe 543 }
shuhei2306 0:28d0b65a60fe 544 }
shuhei2306 0:28d0b65a60fe 545 }
shuhei2306 0:28d0b65a60fe 546 /* for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:28d0b65a60fe 547 {
shuhei2306 0:28d0b65a60fe 548 selectDecoderCh(i_tape);
shuhei2306 0:28d0b65a60fe 549 for(int i_pixel=0; i_pixel<NUMPIXELS; i_pixel++)
shuhei2306 0:28d0b65a60fe 550 {
shuhei2306 0:28d0b65a60fe 551 strip.setPixelColor(i_pixel, 100*i_pixel/NUMPIXELS, 100*(NUMPIXELS-i_pixel)/NUMPIXELS, 0);
shuhei2306 0:28d0b65a60fe 552 }
shuhei2306 0:28d0b65a60fe 553 strip.show();
shuhei2306 0:28d0b65a60fe 554 }
shuhei2306 0:28d0b65a60fe 555
shuhei2306 0:28d0b65a60fe 556 for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:28d0b65a60fe 557 {
shuhei2306 0:28d0b65a60fe 558 selectDecoderCh(i_tape);
shuhei2306 0:28d0b65a60fe 559 for(int i_pixel=0; i_pixel<NUMPIXELS; i_pixel++)
shuhei2306 0:28d0b65a60fe 560 {
shuhei2306 0:28d0b65a60fe 561 strip.setPixelColor(i_pixel, 0, 100*i_pixel/NUMPIXELS, 100*(NUMPIXELS-i_pixel)/NUMPIXELS);
shuhei2306 0:28d0b65a60fe 562 }
shuhei2306 0:28d0b65a60fe 563 strip.show();
shuhei2306 0:28d0b65a60fe 564 }
shuhei2306 0:28d0b65a60fe 565 */
shuhei2306 0:28d0b65a60fe 566
shuhei2306 0:28d0b65a60fe 567 /*
shuhei2306 0:28d0b65a60fe 568 while(1) {
shuhei2306 0:28d0b65a60fe 569 // testes=fgetc(fp);
shuhei2306 0:28d0b65a60fe 570 // pc.printf("%d\n", (int)testes - 48);
shuhei2306 0:28d0b65a60fe 571 wait(0.01);
shuhei2306 0:28d0b65a60fe 572
shuhei2306 0:28d0b65a60fe 573 // pc.printf("sdData[9]: %d\n", (int)(sdData[9]));
shuhei2306 0:28d0b65a60fe 574
shuhei2306 0:28d0b65a60fe 575 if(ontime == false)
shuhei2306 0:28d0b65a60fe 576 {
shuhei2306 0:28d0b65a60fe 577 fread(compareT_b, 1,3, fp);
shuhei2306 0:28d0b65a60fe 578
shuhei2306 0:28d0b65a60fe 579 //fgets(compareT_b, 3+1, fp);//取ってくる個数+1
shuhei2306 0:28d0b65a60fe 580 pc.printf("Compare0: %d\n", (int)( compareT_b[0]));
shuhei2306 0:28d0b65a60fe 581 pc.printf("Compare1: %d\n", (int)( compareT_b[1]));
shuhei2306 0:28d0b65a60fe 582 pc.printf("Compare2: %d\n", (int)( compareT_b[2]));
shuhei2306 0:28d0b65a60fe 583 compareT = (unsigned long)(compareT_b[0]) * 256 * 256 + (unsigned long)(compareT_b[1]) * 256 + (unsigned long)compareT_b[2];//符号拡張阻止
shuhei2306 0:28d0b65a60fe 584 //pc.putc(compareT);
shuhei2306 0:28d0b65a60fe 585 pc.printf("Compare: %d\n", compareT);
shuhei2306 0:28d0b65a60fe 586
shuhei2306 0:28d0b65a60fe 587 ontime = true;
shuhei2306 0:28d0b65a60fe 588 }
shuhei2306 0:28d0b65a60fe 589
shuhei2306 0:28d0b65a60fe 590 if( timer.read()*1000 > compareT)//compareTが現在の時間がcomparetTを超えたら
shuhei2306 0:28d0b65a60fe 591 {
shuhei2306 0:28d0b65a60fe 592 ontime = false;
shuhei2306 0:28d0b65a60fe 593
shuhei2306 0:28d0b65a60fe 594 // SDカードをbyte_num分、読み取る (57Byte)
shuhei2306 0:28d0b65a60fe 595 //fgets(sdData, byte_num+1+2, fp);//取ってくる個数+1
shuhei2306 0:28d0b65a60fe 596 fread(sdData, 1,byte_num, fp);
shuhei2306 0:28d0b65a60fe 597 pc.printf("sdData[0]: %d\n", (int)(sdData[0]));
shuhei2306 0:28d0b65a60fe 598 pc.printf("sdData[1]: %d\n", (int)(sdData[1]));
shuhei2306 0:28d0b65a60fe 599 pc.printf("sdData[2]: %d\n", (int)(sdData[2]));
shuhei2306 0:28d0b65a60fe 600 }
shuhei2306 0:28d0b65a60fe 601 }
shuhei2306 0:28d0b65a60fe 602 */