Shuhei Tsuchida / Mbed 2 deprecated dotstar_old_style_6volleyball

Dependencies:   RotationMat_ SDFileSystem math mbed trigonometric_fanc

Committer:
shuhei2306
Date:
Wed Feb 03 11:07:45 2016 +0000
Revision:
1:64ca0218709d
Parent:
0:28d0b65a60fe
Child:
2:b09caaa3de96
test

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 1:64ca0218709d 166 Vector3D position_vec(0,0,0);
shuhei2306 1:64ca0218709d 167 Vector3D target_vec(0,1,0);
shuhei2306 0:28d0b65a60fe 168 Vector3D rAxis(1,0,0);
shuhei2306 0:28d0b65a60fe 169 const Vector3D xAxis(1,0,0);
shuhei2306 0:28d0b65a60fe 170 const Vector3D yAxis(0,1,0);
shuhei2306 0:28d0b65a60fe 171 const Vector3D zAxis(0,0,1);
shuhei2306 0:28d0b65a60fe 172
shuhei2306 0:28d0b65a60fe 173 unsigned int angular_velocity;
shuhei2306 0:28d0b65a60fe 174 float rotation;
shuhei2306 0:28d0b65a60fe 175 float x_=0;
shuhei2306 0:28d0b65a60fe 176 float y_=0;
shuhei2306 0:28d0b65a60fe 177 float z_=0;
shuhei2306 0:28d0b65a60fe 178 float diff_rotation=2;
shuhei2306 0:28d0b65a60fe 179
shuhei2306 0:28d0b65a60fe 180 short longtitude;
shuhei2306 0:28d0b65a60fe 181 short latitude;
shuhei2306 0:28d0b65a60fe 182
shuhei2306 1:64ca0218709d 183 float angles;
shuhei2306 1:64ca0218709d 184
shuhei2306 0:28d0b65a60fe 185 #define NUMPIXELS 178
shuhei2306 0:28d0b65a60fe 186 #define NUM_LINE 9
shuhei2306 1:64ca0218709d 187 #define NUM_TAPE 6
shuhei2306 0:28d0b65a60fe 188 Adafruit_DotStar strip(NUMPIXELS, DOTSTAR_RGB);
shuhei2306 0:28d0b65a60fe 189
shuhei2306 0:28d0b65a60fe 190 DigitalOut decoder_in_a(p24);
shuhei2306 0:28d0b65a60fe 191 DigitalOut decoder_in_b(p25);
shuhei2306 0:28d0b65a60fe 192 DigitalOut decoder_in_c(p26);
shuhei2306 0:28d0b65a60fe 193
shuhei2306 0:28d0b65a60fe 194 struct LedColor
shuhei2306 0:28d0b65a60fe 195 {
shuhei2306 0:28d0b65a60fe 196 unsigned char r;
shuhei2306 0:28d0b65a60fe 197 unsigned char g;
shuhei2306 0:28d0b65a60fe 198 unsigned char b;
shuhei2306 0:28d0b65a60fe 199 };
shuhei2306 0:28d0b65a60fe 200 struct LedColor ledcolor;
shuhei2306 0:28d0b65a60fe 201
shuhei2306 0:28d0b65a60fe 202 void selectDecoderCh(unsigned int num_ch)
shuhei2306 0:28d0b65a60fe 203 {
shuhei2306 0:28d0b65a60fe 204 decoder_in_a = num_ch & 0b1;
shuhei2306 0:28d0b65a60fe 205 decoder_in_b = (num_ch>>1) & 0b1;
shuhei2306 0:28d0b65a60fe 206 decoder_in_c = (num_ch>>2) & 0b1;
shuhei2306 0:28d0b65a60fe 207 }
shuhei2306 0:28d0b65a60fe 208
shuhei2306 0:28d0b65a60fe 209
shuhei2306 0:28d0b65a60fe 210 //仮想LEDの回転
shuhei2306 0:28d0b65a60fe 211 //ロボットから受け取った値と連動させる?
shuhei2306 0:28d0b65a60fe 212 void updateRotation()
shuhei2306 0:28d0b65a60fe 213 {
shuhei2306 0:28d0b65a60fe 214 rMat.calMat(angular_velocity, rAxis.x, rAxis.y, rAxis.z);
shuhei2306 1:64ca0218709d 215 x_ = target_vec.x;//x
shuhei2306 1:64ca0218709d 216 y_ = target_vec.y;//y
shuhei2306 1:64ca0218709d 217 z_ = target_vec.z;//z
shuhei2306 1:64ca0218709d 218 target_vec.x = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 219 target_vec.y = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 220 target_vec.z = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 0:28d0b65a60fe 221 }
shuhei2306 0:28d0b65a60fe 222
shuhei2306 0:28d0b65a60fe 223 void set_strip_color(int i_tape, int i_line, int i_pixel, int i_lednum)
shuhei2306 0:28d0b65a60fe 224 {
shuhei2306 0:28d0b65a60fe 225 position_vec.x = v_leds[i_tape][i_line][i_pixel][0];
shuhei2306 0:28d0b65a60fe 226 position_vec.y = v_leds[i_tape][i_line][i_pixel][1];
shuhei2306 0:28d0b65a60fe 227 position_vec.z = v_leds[i_tape][i_line][i_pixel][2];
shuhei2306 0:28d0b65a60fe 228
shuhei2306 1:64ca0218709d 229 angles = angle(target_vec , position_vec);
shuhei2306 1:64ca0218709d 230
shuhei2306 1:64ca0218709d 231 if(angles<40)
shuhei2306 0:28d0b65a60fe 232 {
shuhei2306 1:64ca0218709d 233 strip.setPixelColor(i_lednum,100,0,0);
shuhei2306 0:28d0b65a60fe 234 }
shuhei2306 0:28d0b65a60fe 235 else
shuhei2306 0:28d0b65a60fe 236 {
shuhei2306 1:64ca0218709d 237 strip.setPixelColor(i_lednum,0,0,0);
shuhei2306 0:28d0b65a60fe 238 }
shuhei2306 1:64ca0218709d 239
shuhei2306 0:28d0b65a60fe 240 }
shuhei2306 0:28d0b65a60fe 241
shuhei2306 0:28d0b65a60fe 242 void init()
shuhei2306 0:28d0b65a60fe 243 {
shuhei2306 0:28d0b65a60fe 244 angular_velocity=10;
shuhei2306 0:28d0b65a60fe 245
shuhei2306 0:28d0b65a60fe 246 pc.baud(9600);
shuhei2306 0:28d0b65a60fe 247 pc.printf("Hello World!\n");
shuhei2306 0:28d0b65a60fe 248 /*
shuhei2306 0:28d0b65a60fe 249 mkdir("/sd/001.txt", 0777);
shuhei2306 0:28d0b65a60fe 250 fp = fopen("/sd/001.txt","r");
shuhei2306 0:28d0b65a60fe 251
shuhei2306 0:28d0b65a60fe 252 if(fp == NULL)
shuhei2306 0:28d0b65a60fe 253 {
shuhei2306 0:28d0b65a60fe 254 error("Could not open file for read\n");
shuhei2306 0:28d0b65a60fe 255 }
shuhei2306 0:28d0b65a60fe 256 */
shuhei2306 0:28d0b65a60fe 257 timer.start();
shuhei2306 0:28d0b65a60fe 258
shuhei2306 0:28d0b65a60fe 259 strip.begin(); //Initialize
shuhei2306 0:28d0b65a60fe 260 for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:28d0b65a60fe 261 {
shuhei2306 0:28d0b65a60fe 262 selectDecoderCh(i_tape);
shuhei2306 0:28d0b65a60fe 263 strip.show(); //Turn all LEDs off ASAP
shuhei2306 0:28d0b65a60fe 264 }
shuhei2306 0:28d0b65a60fe 265 }
shuhei2306 0:28d0b65a60fe 266
shuhei2306 0:28d0b65a60fe 267 int main() {
shuhei2306 0:28d0b65a60fe 268 init();
shuhei2306 0:28d0b65a60fe 269
shuhei2306 0:28d0b65a60fe 270 while(1)
shuhei2306 0:28d0b65a60fe 271 {
shuhei2306 0:28d0b65a60fe 272 //回転エフェクト更新
shuhei2306 0:28d0b65a60fe 273 updateRotation();
shuhei2306 0:28d0b65a60fe 274
shuhei2306 0:28d0b65a60fe 275 for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:28d0b65a60fe 276 {
shuhei2306 0:28d0b65a60fe 277 selectDecoderCh(i_tape);
shuhei2306 0:28d0b65a60fe 278 for(int i_line=0; i_line<NUM_LINE; i_line++)
shuhei2306 0:28d0b65a60fe 279 {
shuhei2306 0:28d0b65a60fe 280 switch(i_line)
shuhei2306 0:28d0b65a60fe 281 {
shuhei2306 0:28d0b65a60fe 282 case 0:
shuhei2306 0:28d0b65a60fe 283 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 284 {
shuhei2306 0:28d0b65a60fe 285 set_strip_color(i_tape, i_line, i_pixel, i_pixel);
shuhei2306 0:28d0b65a60fe 286 }
shuhei2306 0:28d0b65a60fe 287 break;
shuhei2306 0:28d0b65a60fe 288 case 1:
shuhei2306 0:28d0b65a60fe 289 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 290 {
shuhei2306 0:28d0b65a60fe 291 set_strip_color(i_tape, i_line, i_pixel, i_pixel+16);
shuhei2306 0:28d0b65a60fe 292 }
shuhei2306 0:28d0b65a60fe 293 break;
shuhei2306 0:28d0b65a60fe 294 case 2:
shuhei2306 0:28d0b65a60fe 295 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 296 {
shuhei2306 0:28d0b65a60fe 297 set_strip_color(i_tape, i_line, i_pixel, i_pixel+35);
shuhei2306 0:28d0b65a60fe 298 }
shuhei2306 0:28d0b65a60fe 299 break;
shuhei2306 0:28d0b65a60fe 300 case 3:
shuhei2306 0:28d0b65a60fe 301 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 302 {
shuhei2306 0:28d0b65a60fe 303 set_strip_color(i_tape, i_line, i_pixel, i_pixel+55);
shuhei2306 0:28d0b65a60fe 304 }
shuhei2306 0:28d0b65a60fe 305 break;
shuhei2306 0:28d0b65a60fe 306 case 4:
shuhei2306 0:28d0b65a60fe 307 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 308 {
shuhei2306 0:28d0b65a60fe 309 set_strip_color(i_tape, i_line, i_pixel, i_pixel+77);
shuhei2306 0:28d0b65a60fe 310 }
shuhei2306 0:28d0b65a60fe 311 break;
shuhei2306 0:28d0b65a60fe 312 case 5:
shuhei2306 0:28d0b65a60fe 313 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 314 {
shuhei2306 0:28d0b65a60fe 315 set_strip_color(i_tape, i_line, i_pixel, i_pixel+99);
shuhei2306 0:28d0b65a60fe 316 }
shuhei2306 0:28d0b65a60fe 317 break;
shuhei2306 0:28d0b65a60fe 318 case 6:
shuhei2306 0:28d0b65a60fe 319 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 320 {
shuhei2306 0:28d0b65a60fe 321 set_strip_color(i_tape, i_line, i_pixel, i_pixel+121);
shuhei2306 0:28d0b65a60fe 322 }
shuhei2306 0:28d0b65a60fe 323 break;
shuhei2306 0:28d0b65a60fe 324 case 7:
shuhei2306 0:28d0b65a60fe 325 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 326 {
shuhei2306 0:28d0b65a60fe 327 set_strip_color(i_tape, i_line, i_pixel, i_pixel+141);
shuhei2306 0:28d0b65a60fe 328 }
shuhei2306 0:28d0b65a60fe 329 break;
shuhei2306 0:28d0b65a60fe 330 case 8:
shuhei2306 0:28d0b65a60fe 331 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 0:28d0b65a60fe 332 {
shuhei2306 0:28d0b65a60fe 333 set_strip_color(i_tape, i_line, i_pixel, i_pixel+160);
shuhei2306 0:28d0b65a60fe 334 }
shuhei2306 0:28d0b65a60fe 335 break;
shuhei2306 0:28d0b65a60fe 336 }
shuhei2306 0:28d0b65a60fe 337 }
shuhei2306 0:28d0b65a60fe 338 //白色点灯回避用
shuhei2306 0:28d0b65a60fe 339 strip.setPixelColor(176,0,0,0);
shuhei2306 0:28d0b65a60fe 340 strip.setPixelColor(177,0,0,0);
shuhei2306 0:28d0b65a60fe 341
shuhei2306 0:28d0b65a60fe 342 strip.show();
shuhei2306 0:28d0b65a60fe 343 }
shuhei2306 0:28d0b65a60fe 344 }
shuhei2306 0:28d0b65a60fe 345 }
shuhei2306 0:28d0b65a60fe 346 /* for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:28d0b65a60fe 347 {
shuhei2306 0:28d0b65a60fe 348 selectDecoderCh(i_tape);
shuhei2306 0:28d0b65a60fe 349 for(int i_pixel=0; i_pixel<NUMPIXELS; i_pixel++)
shuhei2306 0:28d0b65a60fe 350 {
shuhei2306 0:28d0b65a60fe 351 strip.setPixelColor(i_pixel, 100*i_pixel/NUMPIXELS, 100*(NUMPIXELS-i_pixel)/NUMPIXELS, 0);
shuhei2306 0:28d0b65a60fe 352 }
shuhei2306 0:28d0b65a60fe 353 strip.show();
shuhei2306 0:28d0b65a60fe 354 }
shuhei2306 0:28d0b65a60fe 355
shuhei2306 0:28d0b65a60fe 356 for(int i_tape=0; i_tape<NUM_TAPE; i_tape++)
shuhei2306 0:28d0b65a60fe 357 {
shuhei2306 0:28d0b65a60fe 358 selectDecoderCh(i_tape);
shuhei2306 0:28d0b65a60fe 359 for(int i_pixel=0; i_pixel<NUMPIXELS; i_pixel++)
shuhei2306 0:28d0b65a60fe 360 {
shuhei2306 0:28d0b65a60fe 361 strip.setPixelColor(i_pixel, 0, 100*i_pixel/NUMPIXELS, 100*(NUMPIXELS-i_pixel)/NUMPIXELS);
shuhei2306 0:28d0b65a60fe 362 }
shuhei2306 0:28d0b65a60fe 363 strip.show();
shuhei2306 0:28d0b65a60fe 364 }
shuhei2306 0:28d0b65a60fe 365 */
shuhei2306 0:28d0b65a60fe 366
shuhei2306 0:28d0b65a60fe 367 /*
shuhei2306 0:28d0b65a60fe 368 while(1) {
shuhei2306 0:28d0b65a60fe 369 // testes=fgetc(fp);
shuhei2306 0:28d0b65a60fe 370 // pc.printf("%d\n", (int)testes - 48);
shuhei2306 0:28d0b65a60fe 371 wait(0.01);
shuhei2306 0:28d0b65a60fe 372
shuhei2306 0:28d0b65a60fe 373 // pc.printf("sdData[9]: %d\n", (int)(sdData[9]));
shuhei2306 0:28d0b65a60fe 374
shuhei2306 0:28d0b65a60fe 375 if(ontime == false)
shuhei2306 0:28d0b65a60fe 376 {
shuhei2306 0:28d0b65a60fe 377 fread(compareT_b, 1,3, fp);
shuhei2306 0:28d0b65a60fe 378
shuhei2306 0:28d0b65a60fe 379 //fgets(compareT_b, 3+1, fp);//取ってくる個数+1
shuhei2306 0:28d0b65a60fe 380 pc.printf("Compare0: %d\n", (int)( compareT_b[0]));
shuhei2306 0:28d0b65a60fe 381 pc.printf("Compare1: %d\n", (int)( compareT_b[1]));
shuhei2306 0:28d0b65a60fe 382 pc.printf("Compare2: %d\n", (int)( compareT_b[2]));
shuhei2306 0:28d0b65a60fe 383 compareT = (unsigned long)(compareT_b[0]) * 256 * 256 + (unsigned long)(compareT_b[1]) * 256 + (unsigned long)compareT_b[2];//符号拡張阻止
shuhei2306 0:28d0b65a60fe 384 //pc.putc(compareT);
shuhei2306 0:28d0b65a60fe 385 pc.printf("Compare: %d\n", compareT);
shuhei2306 0:28d0b65a60fe 386
shuhei2306 0:28d0b65a60fe 387 ontime = true;
shuhei2306 0:28d0b65a60fe 388 }
shuhei2306 0:28d0b65a60fe 389
shuhei2306 0:28d0b65a60fe 390 if( timer.read()*1000 > compareT)//compareTが現在の時間がcomparetTを超えたら
shuhei2306 0:28d0b65a60fe 391 {
shuhei2306 0:28d0b65a60fe 392 ontime = false;
shuhei2306 0:28d0b65a60fe 393
shuhei2306 0:28d0b65a60fe 394 // SDカードをbyte_num分、読み取る (57Byte)
shuhei2306 0:28d0b65a60fe 395 //fgets(sdData, byte_num+1+2, fp);//取ってくる個数+1
shuhei2306 0:28d0b65a60fe 396 fread(sdData, 1,byte_num, fp);
shuhei2306 0:28d0b65a60fe 397 pc.printf("sdData[0]: %d\n", (int)(sdData[0]));
shuhei2306 0:28d0b65a60fe 398 pc.printf("sdData[1]: %d\n", (int)(sdData[1]));
shuhei2306 0:28d0b65a60fe 399 pc.printf("sdData[2]: %d\n", (int)(sdData[2]));
shuhei2306 0:28d0b65a60fe 400 }
shuhei2306 0:28d0b65a60fe 401 }
shuhei2306 1:64ca0218709d 402 */
shuhei2306 1:64ca0218709d 403
shuhei2306 1:64ca0218709d 404 /*
shuhei2306 1:64ca0218709d 405 //バレーボール6枚
shuhei2306 1:64ca0218709d 406 for(int i_tape =0; i_tape < NUM_TAPE ; i_tape++)
shuhei2306 1:64ca0218709d 407 {
shuhei2306 1:64ca0218709d 408 //バレーボール1枚あたりのLEDの本数
shuhei2306 1:64ca0218709d 409 for(int i_line=0; i_line< NUM_LINE; i_line++)
shuhei2306 1:64ca0218709d 410 {
shuhei2306 1:64ca0218709d 411 switch(i_line)
shuhei2306 1:64ca0218709d 412 {
shuhei2306 1:64ca0218709d 413 case 0:
shuhei2306 1:64ca0218709d 414 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 1:64ca0218709d 415 {
shuhei2306 1:64ca0218709d 416 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 1:64ca0218709d 417 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 1:64ca0218709d 418 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 1:64ca0218709d 419 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 420 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 421 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 1:64ca0218709d 422 }
shuhei2306 1:64ca0218709d 423 break;
shuhei2306 1:64ca0218709d 424 case 1:
shuhei2306 1:64ca0218709d 425 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 1:64ca0218709d 426 {
shuhei2306 1:64ca0218709d 427 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 1:64ca0218709d 428 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 1:64ca0218709d 429 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 1:64ca0218709d 430 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 431 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 432 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 1:64ca0218709d 433 }
shuhei2306 1:64ca0218709d 434 break;
shuhei2306 1:64ca0218709d 435 case 2:
shuhei2306 1:64ca0218709d 436 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 1:64ca0218709d 437 {
shuhei2306 1:64ca0218709d 438 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 1:64ca0218709d 439 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 1:64ca0218709d 440 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 1:64ca0218709d 441 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 442 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 443 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 1:64ca0218709d 444 }
shuhei2306 1:64ca0218709d 445 break;
shuhei2306 1:64ca0218709d 446 case 3:
shuhei2306 1:64ca0218709d 447 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 1:64ca0218709d 448 {
shuhei2306 1:64ca0218709d 449 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 1:64ca0218709d 450 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 1:64ca0218709d 451 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 1:64ca0218709d 452 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 453 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 454 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 1:64ca0218709d 455 }
shuhei2306 1:64ca0218709d 456 break;
shuhei2306 1:64ca0218709d 457 case 4:
shuhei2306 1:64ca0218709d 458 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 1:64ca0218709d 459 {
shuhei2306 1:64ca0218709d 460 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 1:64ca0218709d 461 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 1:64ca0218709d 462 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 1:64ca0218709d 463 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 464 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 465 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 1:64ca0218709d 466 }
shuhei2306 1:64ca0218709d 467 break;
shuhei2306 1:64ca0218709d 468 case 5:
shuhei2306 1:64ca0218709d 469 for(int i_pixel =0; i_pixel < LED_3_4_5_NUM ; i_pixel++)
shuhei2306 1:64ca0218709d 470 {
shuhei2306 1:64ca0218709d 471 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 1:64ca0218709d 472 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 1:64ca0218709d 473 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 1:64ca0218709d 474 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 475 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 476 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 1:64ca0218709d 477 }
shuhei2306 1:64ca0218709d 478 break;
shuhei2306 1:64ca0218709d 479 case 6:
shuhei2306 1:64ca0218709d 480 for(int i_pixel =0; i_pixel < LED_2_6_NUM ; i_pixel++)
shuhei2306 1:64ca0218709d 481 {
shuhei2306 1:64ca0218709d 482 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 1:64ca0218709d 483 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 1:64ca0218709d 484 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 1:64ca0218709d 485 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 486 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 487 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 1:64ca0218709d 488 }
shuhei2306 1:64ca0218709d 489 break;
shuhei2306 1:64ca0218709d 490 case 7:
shuhei2306 1:64ca0218709d 491 for(int i_pixel =0; i_pixel < LED_1_7_NUM ; i_pixel++)
shuhei2306 1:64ca0218709d 492 {
shuhei2306 1:64ca0218709d 493 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 1:64ca0218709d 494 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 1:64ca0218709d 495 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 1:64ca0218709d 496 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 497 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 498 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 1:64ca0218709d 499 }
shuhei2306 1:64ca0218709d 500 break;
shuhei2306 1:64ca0218709d 501 case 8:
shuhei2306 1:64ca0218709d 502 for(int i_pixel =0; i_pixel < LED_0_8_NUM ; i_pixel++)
shuhei2306 1:64ca0218709d 503 {
shuhei2306 1:64ca0218709d 504 x_ = v_leds[i_tape][i_line][i_pixel][0];//x
shuhei2306 1:64ca0218709d 505 y_ = v_leds[i_tape][i_line][i_pixel][1];//y
shuhei2306 1:64ca0218709d 506 z_ = v_leds[i_tape][i_line][i_pixel][2];//z
shuhei2306 1:64ca0218709d 507 v_leds[i_tape][i_line][i_pixel][0] = rMat.r1*x_+rMat.r2*y_+rMat.r3*z_;
shuhei2306 1:64ca0218709d 508 v_leds[i_tape][i_line][i_pixel][1] = rMat.r4*x_+rMat.r5*y_+rMat.r6*z_;
shuhei2306 1:64ca0218709d 509 v_leds[i_tape][i_line][i_pixel][2] = rMat.r7*x_+rMat.r8*y_+rMat.r9*z_;
shuhei2306 1:64ca0218709d 510 }
shuhei2306 1:64ca0218709d 511 break;
shuhei2306 1:64ca0218709d 512 }
shuhei2306 1:64ca0218709d 513 }
shuhei2306 1:64ca0218709d 514 } */