I know why... the board is reversed, i.e. y mirrored

This commit is contained in:
2024-12-18 10:23:21 +08:00
parent 1d086ac20f
commit 1843978c47

View File

@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 43, "execution_count": 50,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -118,7 +118,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 44, "execution_count": 51,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -155,7 +155,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 45, "execution_count": 52,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -279,7 +279,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 46, "execution_count": 53,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -291,24 +291,25 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 47, "execution_count": 54,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"markers_b = generate_diamond_corners((20, 21, 22, 23), params)\n", "markers_b = generate_diamond_corners((20, 21, 22, 23), params)\n",
"plane_b = DiamondPlane3D(markers_b)\n", "plane_b = DiamondPlane3D(markers_b)\n",
"plane_b.rotate(-np.pi / 2, np.array([1, 0, 0]))\n", "# plane_b.rotate(-np.pi / 2, np.array([1, 0, 0]))\n",
"plane_b.translate(np.array([0, 0, params.total_side_length]))\n", "plane_b.translate(np.array([0, 0, 0.1]))\n",
"t_corners_b = plane_b.transformed_corners\n", "t_corners_b = plane_b.transformed_corners\n",
"\n", "\n",
"markers_c = generate_diamond_corners((24, 25, 26, 27), params)\n", "markers_c = generate_diamond_corners((24, 25, 26, 27), params)\n",
"plane_c = DiamondPlane3D(markers_c)\n", "plane_c = DiamondPlane3D(markers_c)\n",
"plane_c.rotate(np.pi/2, np.array([0, 0, 1]))\n", "plane_c.translate(np.array([0, 0, 0.2]))\n",
"# plane_c.translate(np.array([params.total_side_length, 0, 0]))\n", "# plane_c.rotate(np.pi/2, np.array([0, 0, 1]))\n",
"plane_c.rotate(-np.pi/2, np.array([0, 1, 0]))\n", "# # plane_c.translate(np.array([params.total_side_length, 0, 0]))\n",
"plane_c.translate(np.array([params.total_side_length/2, 0, 0]))\n", "# plane_c.rotate(-np.pi/2, np.array([0, 1, 0]))\n",
"plane_c.rotate(np.pi, np.array([0, 0, 1]))\n", "# plane_c.translate(np.array([params.total_side_length/2, 0, 0]))\n",
"plane_c.translate(np.array([-params.total_side_length/2, params.total_side_length, params.total_side_length]))\n", "# plane_c.rotate(np.pi, np.array([0, 0, 1]))\n",
"# plane_c.translate(np.array([-params.total_side_length/2, params.total_side_length, params.total_side_length]))\n",
"# plane_c.rotate(np.pi/2, np.array([0, 0, 1]))\n", "# plane_c.rotate(np.pi/2, np.array([0, 0, 1]))\n",
"# plane_c.translate(np.array([0, 0, params.total_side_length]))\n", "# plane_c.translate(np.array([0, 0, params.total_side_length]))\n",
"t_corners_c = plane_c.transformed_corners" "t_corners_c = plane_c.transformed_corners"
@ -316,7 +317,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 49, "execution_count": 55,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -792,16 +793,16 @@
0.15199999511241913 0.15199999511241913
], ],
"y": [ "y": [
1.5308085217450156e-18, 0.02500000037252903,
1.5308085217450156e-18, 0.02500000037252903,
7.470345558742687e-18, 0.12200000137090683,
7.470345558742687e-18 0.12200000137090683
], ],
"z": [ "z": [
0.385999999627471, 0.1,
0.385999999627471, 0.1,
0.2889999986290932, 0.1,
0.2889999986290932 0.1
] ]
}, },
{ {
@ -818,10 +819,10 @@
0.15199999511241913 0.15199999511241913
], ],
"y": [ "y": [
1.5308085217450156e-18 0.02500000037252903
], ],
"z": [ "z": [
0.385999999627471 0.1
] ]
}, },
{ {
@ -838,10 +839,10 @@
0.24899999797344208 0.24899999797344208
], ],
"y": [ "y": [
1.5308085217450156e-18 0.02500000037252903
], ],
"z": [ "z": [
0.385999999627471 0.1
] ]
}, },
{ {
@ -858,10 +859,10 @@
0.24899999797344208 0.24899999797344208
], ],
"y": [ "y": [
7.470345558742687e-18 0.12200000137090683
], ],
"z": [ "z": [
0.2889999986290932 0.1
] ]
}, },
{ {
@ -878,10 +879,10 @@
0.15199999511241913 0.15199999511241913
], ],
"y": [ "y": [
7.470345558742687e-18 0.12200000137090683
], ],
"z": [ "z": [
0.2889999986290932 0.1
] ]
}, },
{ {
@ -898,16 +899,16 @@
0.02500000037252903 0.02500000037252903
], ],
"y": [ "y": [
9.30731537424187e-18, 0.15199999511241913,
9.30731537424187e-18, 0.15199999511241913,
1.5246852525293664e-17, 0.24899999797344208,
1.5246852525293664e-17 0.24899999797344208
], ],
"z": [ "z": [
0.2590000048875809, 0.1,
0.2590000048875809, 0.1,
0.16200000202655795, 0.1,
0.16200000202655795 0.1
] ]
}, },
{ {
@ -924,10 +925,10 @@
0.02500000037252903 0.02500000037252903
], ],
"y": [ "y": [
9.30731537424187e-18 0.15199999511241913
], ],
"z": [ "z": [
0.2590000048875809 0.1
] ]
}, },
{ {
@ -944,10 +945,10 @@
0.12200000137090683 0.12200000137090683
], ],
"y": [ "y": [
9.30731537424187e-18 0.15199999511241913
], ],
"z": [ "z": [
0.2590000048875809 0.1
] ]
}, },
{ {
@ -964,10 +965,10 @@
0.12200000137090683 0.12200000137090683
], ],
"y": [ "y": [
1.5246852525293664e-17 0.24899999797344208
], ],
"z": [ "z": [
0.16200000202655795 0.1
] ]
}, },
{ {
@ -984,10 +985,10 @@
0.02500000037252903 0.02500000037252903
], ],
"y": [ "y": [
1.5246852525293664e-17 0.24899999797344208
], ],
"z": [ "z": [
0.16200000202655795 0.1
] ]
}, },
{ {
@ -1004,16 +1005,16 @@
0.27900001406669617 0.27900001406669617
], ],
"y": [ "y": [
9.30731537424187e-18, 0.15199999511241913,
9.30731537424187e-18, 0.15199999511241913,
1.5246852525293664e-17, 0.24899999797344208,
1.5246852525293664e-17 0.24899999797344208
], ],
"z": [ "z": [
0.2590000048875809, 0.1,
0.2590000048875809, 0.1,
0.16200000202655795, 0.1,
0.16200000202655795 0.1
] ]
}, },
{ {
@ -1030,10 +1031,10 @@
0.27900001406669617 0.27900001406669617
], ],
"y": [ "y": [
9.30731537424187e-18 0.15199999511241913
], ],
"z": [ "z": [
0.2590000048875809 0.1
] ]
}, },
{ {
@ -1050,10 +1051,10 @@
0.37599998712539673 0.37599998712539673
], ],
"y": [ "y": [
9.30731537424187e-18 0.15199999511241913
], ],
"z": [ "z": [
0.2590000048875809 0.1
] ]
}, },
{ {
@ -1070,10 +1071,10 @@
0.37599998712539673 0.37599998712539673
], ],
"y": [ "y": [
1.5246852525293664e-17 0.24899999797344208
], ],
"z": [ "z": [
0.16200000202655795 0.1
] ]
}, },
{ {
@ -1090,10 +1091,10 @@
0.27900001406669617 0.27900001406669617
], ],
"y": [ "y": [
1.5246852525293664e-17 0.24899999797344208
], ],
"z": [ "z": [
0.16200000202655795 0.1
] ]
}, },
{ {
@ -1110,16 +1111,16 @@
0.15199999511241913 0.15199999511241913
], ],
"y": [ "y": [
1.7083823709442298e-17, 0.27900001406669617,
1.7083823709442298e-17, 0.27900001406669617,
2.3023359035628157e-17, 0.37599998712539673,
2.3023359035628157e-17 0.37599998712539673
], ],
"z": [ "z": [
0.13199998593330386, 0.1,
0.13199998593330386, 0.1,
0.0350000128746033, 0.1,
0.0350000128746033 0.1
] ]
}, },
{ {
@ -1136,10 +1137,10 @@
0.15199999511241913 0.15199999511241913
], ],
"y": [ "y": [
1.7083823709442298e-17 0.27900001406669617
], ],
"z": [ "z": [
0.13199998593330386 0.1
] ]
}, },
{ {
@ -1156,10 +1157,10 @@
0.24899999797344208 0.24899999797344208
], ],
"y": [ "y": [
1.7083823709442298e-17 0.27900001406669617
], ],
"z": [ "z": [
0.13199998593330386 0.1
] ]
}, },
{ {
@ -1176,10 +1177,10 @@
0.24899999797344208 0.24899999797344208
], ],
"y": [ "y": [
2.3023359035628157e-17 0.37599998712539673
], ],
"z": [ "z": [
0.0350000128746033 0.1
] ]
}, },
{ {
@ -1196,10 +1197,10 @@
0.15199999511241913 0.15199999511241913
], ],
"y": [ "y": [
2.3023359035628157e-17 0.37599998712539673
], ],
"z": [ "z": [
0.0350000128746033 0.1
] ]
}, },
{ {
@ -1214,12 +1215,12 @@
0.2004999965429306 0.2004999965429306
], ],
"y": [ "y": [
1.2277083037334799e-17, 0.2004999816417694,
0.10000000000000002 0.2004999816417694
], ],
"z": [ "z": [
0.21050001835823062, 0.1,
0.21050001835823062 0.2
] ]
}, },
{ {
@ -1230,22 +1231,22 @@
"name": "24", "name": "24",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-1.7083822226738725e-17, 0.15199999511241913,
-2.8962896528842315e-17, 0.24899999797344208,
-2.3023359491844643e-17, 0.24899999797344208,
-1.1144285189741056e-17 0.15199999511241913
], ],
"y": [ "y": [
0.2590000048875809, 0.02500000037252903,
0.16200000202655795, 0.02500000037252903,
0.16200000202655795, 0.12200000137090683,
0.2590000048875809 0.12200000137090683
], ],
"z": [ "z": [
0.385999999627471, 0.2,
0.385999999627471, 0.2,
0.2889999986290932, 0.2,
0.2889999986290932 0.2
] ]
}, },
{ {
@ -1259,13 +1260,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-1.7083822226738725e-17 0.15199999511241913
], ],
"y": [ "y": [
0.2590000048875809 0.02500000037252903
], ],
"z": [ "z": [
0.385999999627471 0.2
] ]
}, },
{ {
@ -1279,13 +1280,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-2.8962896528842315e-17 0.24899999797344208
], ],
"y": [ "y": [
0.16200000202655795 0.02500000037252903
], ],
"z": [ "z": [
0.385999999627471 0.2
] ]
}, },
{ {
@ -1299,13 +1300,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-2.3023359491844643e-17 0.24899999797344208
], ],
"y": [ "y": [
0.16200000202655795 0.12200000137090683
], ],
"z": [ "z": [
0.2889999986290932 0.2
] ]
}, },
{ {
@ -1319,13 +1320,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-1.1144285189741056e-17 0.15199999511241913
], ],
"y": [ "y": [
0.2590000048875809 0.12200000137090683
], ],
"z": [ "z": [
0.2889999986290932 0.2
] ]
}, },
{ {
@ -1336,22 +1337,22 @@
"name": "25", "name": "25",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
6.245698330751838e-18, 0.02500000037252903,
-5.633375743243505e-18, 0.12200000137090683,
3.0616140780828684e-19, 0.12200000137090683,
1.218523548180363e-17 0.02500000037252903
], ],
"y": [ "y": [
0.385999999627471, 0.15199999511241913,
0.2889999986290932, 0.15199999511241913,
0.2889999986290932, 0.24899999797344208,
0.385999999627471 0.24899999797344208
], ],
"z": [ "z": [
0.2590000048875809, 0.2,
0.2590000048875809, 0.2,
0.16200000202655795, 0.2,
0.16200000202655795 0.2
] ]
}, },
{ {
@ -1365,13 +1366,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
6.245698330751838e-18 0.02500000037252903
], ],
"y": [ "y": [
0.385999999627471 0.15199999511241913
], ],
"z": [ "z": [
0.2590000048875809 0.2
] ]
}, },
{ {
@ -1385,13 +1386,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-5.633375743243505e-18 0.12200000137090683
], ],
"y": [ "y": [
0.2889999986290932 0.15199999511241913
], ],
"z": [ "z": [
0.2590000048875809 0.2
] ]
}, },
{ {
@ -1405,13 +1406,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
3.0616140780828684e-19 0.12200000137090683
], ],
"y": [ "y": [
0.2889999986290932 0.24899999797344208
], ],
"z": [ "z": [
0.16200000202655795 0.2
] ]
}, },
{ {
@ -1425,13 +1426,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
1.218523548180363e-17 0.02500000037252903
], ],
"y": [ "y": [
0.385999999627471 0.24899999797344208
], ],
"z": [ "z": [
0.16200000202655795 0.2
] ]
}, },
{ {
@ -1442,22 +1443,22 @@
"name": "26", "name": "26",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-2.4860332044642726e-17, 0.27900001406669617,
-3.6739402697014446e-17, 0.37599998712539673,
-3.0799865545962654e-17, 0.37599998712539673,
-1.8920794893590934e-17 0.27900001406669617
], ],
"y": [ "y": [
0.13199998593330386, 0.15199999511241913,
0.0350000128746033, 0.15199999511241913,
0.0350000128746033, 0.24899999797344208,
0.13199998593330386 0.24899999797344208
], ],
"z": [ "z": [
0.2590000048875809, 0.2,
0.2590000048875809, 0.2,
0.16200000202655798, 0.2,
0.16200000202655798 0.2
] ]
}, },
{ {
@ -1471,13 +1472,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-2.4860332044642726e-17 0.27900001406669617
], ],
"y": [ "y": [
0.13199998593330386 0.15199999511241913
], ],
"z": [ "z": [
0.2590000048875809 0.2
] ]
}, },
{ {
@ -1491,13 +1492,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-3.6739402697014446e-17 0.37599998712539673
], ],
"y": [ "y": [
0.0350000128746033 0.15199999511241913
], ],
"z": [ "z": [
0.2590000048875809 0.2
] ]
}, },
{ {
@ -1511,13 +1512,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-3.0799865545962654e-17 0.37599998712539673
], ],
"y": [ "y": [
0.0350000128746033 0.24899999797344208
], ],
"z": [ "z": [
0.16200000202655798 0.2
] ]
}, },
{ {
@ -1531,13 +1532,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-1.8920794893590934e-17 0.27900001406669617
], ],
"y": [ "y": [
0.13199998593330386 0.24899999797344208
], ],
"z": [ "z": [
0.16200000202655798 0.2
] ]
}, },
{ {
@ -1548,22 +1549,22 @@
"name": "27", "name": "27",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-1.5308070390414465e-18, 0.15199999511241913,
-1.3409881341145034e-17, 0.24899999797344208,
-7.470346014959177e-18, 0.24899999797344208,
4.40872828714441e-18 0.15199999511241913
], ],
"y": [ "y": [
0.2590000048875809, 0.27900001406669617,
0.16200000202655795, 0.27900001406669617,
0.16200000202655795, 0.37599998712539673,
0.2590000048875809 0.37599998712539673
], ],
"z": [ "z": [
0.13199998593330386, 0.2,
0.1319999859333039, 0.2,
0.03500001287460332, 0.2,
0.03500001287460331 0.2
] ]
}, },
{ {
@ -1577,13 +1578,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-1.5308070390414465e-18 0.15199999511241913
], ],
"y": [ "y": [
0.2590000048875809 0.27900001406669617
], ],
"z": [ "z": [
0.13199998593330386 0.2
] ]
}, },
{ {
@ -1597,13 +1598,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-1.3409881341145034e-17 0.24899999797344208
], ],
"y": [ "y": [
0.16200000202655795 0.27900001406669617
], ],
"z": [ "z": [
0.1319999859333039 0.2
] ]
}, },
{ {
@ -1617,13 +1618,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-7.470346014959177e-18 0.24899999797344208
], ],
"y": [ "y": [
0.16200000202655795 0.37599998712539673
], ],
"z": [ "z": [
0.03500001287460332 0.2
] ]
}, },
{ {
@ -1637,13 +1638,13 @@
"textposition": "middle center", "textposition": "middle center",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
4.40872828714441e-18 0.15199999511241913
], ],
"y": [ "y": [
0.2590000048875809 0.37599998712539673
], ],
"z": [ "z": [
0.03500001287460331 0.2
] ]
}, },
{ {
@ -1654,16 +1655,16 @@
"name": "normal_c", "name": "normal_c",
"type": "scatter3d", "type": "scatter3d",
"x": [ "x": [
-1.2277084862200736e-17, 0.2004999965429306,
0.09999999999999999 0.2004999965429306
], ],
"y": [ "y": [
0.21050000345706943, 0.2004999816417694,
0.21050000345706943 0.2004999816417694
], ],
"z": [ "z": [
0.21050001835823062, 0.2,
0.21050001835823065 0.30000000000000004
] ]
} }
], ],