that's what I want... somehow
This commit is contained in:
296
boom.ipynb
296
boom.ipynb
@ -2,7 +2,7 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 45,
|
"execution_count": 129,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@ -118,7 +118,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 46,
|
"execution_count": 130,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 47,
|
"execution_count": 131,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@ -284,7 +284,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 48,
|
"execution_count": 132,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@ -292,16 +292,29 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"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.translate(np.array([0, 0, 0.1]))\n",
|
"# plane_b.translate(np.array([0, 0, 0.1]))\n",
|
||||||
|
"plane_b.rotate(np.pi/2, np.array([1, 0, 0]))\n",
|
||||||
|
"plane_b.rotate(np.pi, np.array([0, 0, 1]))\n",
|
||||||
|
"tmp_c = plane_b.transformed_geometry_center\n",
|
||||||
|
"plane_b.translate(-tmp_c)\n",
|
||||||
|
"plane_b.rotate(np.pi, np.array([0, 1, 0]))\n",
|
||||||
|
"plane_b.translate(tmp_c)\n",
|
||||||
|
"plane_b.translate(np.array([0, 0, params.total_side_length]))\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.translate(np.array([0, 0, 0.2]))"
|
"tmp = plane_c.transformed_geometry_center\n",
|
||||||
|
"plane_c.translate(-tmp)\n",
|
||||||
|
"plane_c.rotate(-np.pi/2, np.array([0, 0, 1]))\n",
|
||||||
|
"plane_c.translate(tmp)\n",
|
||||||
|
"plane_c.translate(np.array([0, params.total_side_length-params.border_length, 0]))\n",
|
||||||
|
"plane_c.rotate(np.pi/2, np.array([0, 1, 0]))\n",
|
||||||
|
"plane_c.translate(np.array([0, 0, params.total_side_length]))"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 49,
|
"execution_count": 134,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
@ -325,7 +338,12 @@
|
|||||||
},
|
},
|
||||||
"mode": "markers+lines+text",
|
"mode": "markers+lines+text",
|
||||||
"name": "16",
|
"name": "16",
|
||||||
"text": "16",
|
"text": [
|
||||||
|
"0",
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3"
|
||||||
|
],
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.15199999511241913,
|
0.15199999511241913,
|
||||||
@ -352,7 +370,12 @@
|
|||||||
},
|
},
|
||||||
"mode": "markers+lines+text",
|
"mode": "markers+lines+text",
|
||||||
"name": "17",
|
"name": "17",
|
||||||
"text": "17",
|
"text": [
|
||||||
|
"0",
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3"
|
||||||
|
],
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.02500000037252903,
|
0.02500000037252903,
|
||||||
@ -379,7 +402,12 @@
|
|||||||
},
|
},
|
||||||
"mode": "markers+lines+text",
|
"mode": "markers+lines+text",
|
||||||
"name": "18",
|
"name": "18",
|
||||||
"text": "18",
|
"text": [
|
||||||
|
"0",
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3"
|
||||||
|
],
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.27900001406669617,
|
0.27900001406669617,
|
||||||
@ -406,7 +434,12 @@
|
|||||||
},
|
},
|
||||||
"mode": "markers+lines+text",
|
"mode": "markers+lines+text",
|
||||||
"name": "19",
|
"name": "19",
|
||||||
"text": "19",
|
"text": [
|
||||||
|
"0",
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3"
|
||||||
|
],
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.15199999511241913,
|
0.15199999511241913,
|
||||||
@ -458,20 +491,20 @@
|
|||||||
"x": [
|
"x": [
|
||||||
0.15199999511241913,
|
0.15199999511241913,
|
||||||
0.24899999797344208,
|
0.24899999797344208,
|
||||||
0.24899999797344208,
|
0.2489999979734421,
|
||||||
0.15199999511241913
|
0.15199999511241916
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.02500000037252903,
|
1.7083822226738725e-17,
|
||||||
0.02500000037252903,
|
2.8962896528842315e-17,
|
||||||
0.12200000137090683,
|
2.3023359491844643e-17,
|
||||||
0.12200000137090683
|
1.1144285189741054e-17
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.1,
|
0.385999999627471,
|
||||||
0.1,
|
0.38599999962747106,
|
||||||
0.1,
|
0.28899999862909326,
|
||||||
0.1
|
0.2889999986290932
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -483,22 +516,22 @@
|
|||||||
"text": "21",
|
"text": "21",
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.02500000037252903,
|
0.025000000372529047,
|
||||||
0.12200000137090683,
|
0.12200000137090684,
|
||||||
0.12200000137090683,
|
0.12200000137090686,
|
||||||
0.02500000037252903
|
0.02500000037252906
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.15199999511241913,
|
-6.245698330751839e-18,
|
||||||
0.15199999511241913,
|
5.633375743243504e-18,
|
||||||
0.24899999797344208,
|
-3.061614078082899e-19,
|
||||||
0.24899999797344208
|
-1.2185235481803633e-17
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.1,
|
0.2590000048875809,
|
||||||
0.1,
|
0.2590000048875809,
|
||||||
0.1,
|
0.16200000202655798,
|
||||||
0.1
|
0.16200000202655795
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -512,20 +545,20 @@
|
|||||||
"x": [
|
"x": [
|
||||||
0.27900001406669617,
|
0.27900001406669617,
|
||||||
0.37599998712539673,
|
0.37599998712539673,
|
||||||
0.37599998712539673,
|
0.3759999871253968,
|
||||||
0.27900001406669617
|
0.2790000140666962
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.15199999511241913,
|
2.4860332044642726e-17,
|
||||||
0.15199999511241913,
|
3.6739402697014446e-17,
|
||||||
0.24899999797344208,
|
3.079986554596265e-17,
|
||||||
0.24899999797344208
|
1.892079489359093e-17
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.1,
|
0.25900000488758096,
|
||||||
0.1,
|
0.25900000488758096,
|
||||||
0.1,
|
0.162000002026558,
|
||||||
0.1
|
0.16200000202655798
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -537,22 +570,22 @@
|
|||||||
"text": "23",
|
"text": "23",
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.15199999511241913,
|
0.15199999511241916,
|
||||||
0.24899999797344208,
|
0.2489999979734421,
|
||||||
0.24899999797344208,
|
0.24899999797344213,
|
||||||
0.15199999511241913
|
0.15199999511241918
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.27900001406669617,
|
1.5308070390414434e-18,
|
||||||
0.27900001406669617,
|
1.340988134114503e-17,
|
||||||
0.37599998712539673,
|
7.470346014959171e-18,
|
||||||
0.37599998712539673
|
-4.408728287144416e-18
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.1,
|
0.1319999859333039,
|
||||||
0.1,
|
0.1319999859333039,
|
||||||
0.1,
|
0.03500001287460333,
|
||||||
0.1
|
0.035000012874603324
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -563,16 +596,16 @@
|
|||||||
"name": "normal_b",
|
"name": "normal_b",
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.2004999965429306,
|
0.20049999654293063,
|
||||||
0.2004999965429306
|
0.20049999654293063
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.2004999816417694,
|
1.2277084862200734e-17,
|
||||||
0.2004999816417694
|
0.10000000000000002
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.1,
|
0.21050001835823065,
|
||||||
0.2
|
0.21050001835823065
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -584,22 +617,22 @@
|
|||||||
"text": "24",
|
"text": "24",
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.15199999511241913,
|
1.5308085217450162e-18,
|
||||||
0.24899999797344208,
|
1.5308085217450166e-18,
|
||||||
0.24899999797344208,
|
7.470345558742689e-18,
|
||||||
0.15199999511241913
|
7.470345558742687e-18
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.02500000037252903,
|
0.2490000048875809,
|
||||||
0.02500000037252903,
|
0.15200000202655795,
|
||||||
0.12200000137090683,
|
0.15200000202655795,
|
||||||
0.12200000137090683
|
0.2490000048875809
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.2,
|
0.385999999627471,
|
||||||
0.2,
|
0.385999999627471,
|
||||||
0.2,
|
0.2889999986290932,
|
||||||
0.2
|
0.2889999986290932
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -611,22 +644,22 @@
|
|||||||
"text": "25",
|
"text": "25",
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.02500000037252903,
|
9.30731537424187e-18,
|
||||||
0.12200000137090683,
|
9.30731537424187e-18,
|
||||||
0.12200000137090683,
|
1.5246852525293664e-17,
|
||||||
0.02500000037252903
|
1.5246852525293664e-17
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.15199999511241913,
|
0.375999999627471,
|
||||||
0.15199999511241913,
|
0.2789999986290932,
|
||||||
0.24899999797344208,
|
0.2789999986290932,
|
||||||
0.24899999797344208
|
0.375999999627471
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.2,
|
0.2590000048875809,
|
||||||
0.2,
|
0.2590000048875809,
|
||||||
0.2,
|
0.16200000202655795,
|
||||||
0.2
|
0.16200000202655795
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -638,22 +671,22 @@
|
|||||||
"text": "26",
|
"text": "26",
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.27900001406669617,
|
9.307315374241872e-18,
|
||||||
0.37599998712539673,
|
9.307315374241872e-18,
|
||||||
0.37599998712539673,
|
1.5246852525293664e-17,
|
||||||
0.27900001406669617
|
1.5246852525293664e-17
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.15199999511241913,
|
0.12199998593330386,
|
||||||
0.15199999511241913,
|
0.025000012874603295,
|
||||||
0.24899999797344208,
|
0.025000012874603295,
|
||||||
0.24899999797344208
|
0.12199998593330386
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.2,
|
0.2590000048875809,
|
||||||
0.2,
|
0.2590000048875809,
|
||||||
0.2,
|
0.16200000202655793,
|
||||||
0.2
|
0.16200000202655793
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -665,22 +698,22 @@
|
|||||||
"text": "27",
|
"text": "27",
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.15199999511241913,
|
1.7083823709442298e-17,
|
||||||
0.24899999797344208,
|
1.7083823709442298e-17,
|
||||||
0.24899999797344208,
|
2.3023359035628157e-17,
|
||||||
0.15199999511241913
|
2.3023359035628157e-17
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.27900001406669617,
|
0.2490000048875809,
|
||||||
0.27900001406669617,
|
0.15200000202655795,
|
||||||
0.37599998712539673,
|
0.15200000202655795,
|
||||||
0.37599998712539673
|
0.2490000048875809
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.2,
|
0.13199998593330386,
|
||||||
0.2,
|
0.13199998593330384,
|
||||||
0.2,
|
0.03500001287460329,
|
||||||
0.2
|
0.035000012874603297
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -691,16 +724,16 @@
|
|||||||
"name": "normal_c",
|
"name": "normal_c",
|
||||||
"type": "scatter3d",
|
"type": "scatter3d",
|
||||||
"x": [
|
"x": [
|
||||||
0.2004999965429306,
|
1.2277083037334799e-17,
|
||||||
0.2004999965429306
|
0.10000000000000002
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
0.2004999816417694,
|
0.20050000345706942,
|
||||||
0.2004999816417694
|
0.20050000345706942
|
||||||
],
|
],
|
||||||
"z": [
|
"z": [
|
||||||
0.2,
|
0.21050001835823062,
|
||||||
0.30000000000000004
|
0.21050001835823062
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -709,19 +742,19 @@
|
|||||||
"aspectmode": "cube",
|
"aspectmode": "cube",
|
||||||
"xaxis": {
|
"xaxis": {
|
||||||
"range": [
|
"range": [
|
||||||
-0.41100000000000003,
|
-0.1,
|
||||||
0.41100000000000003
|
0.41100000000000003
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"yaxis": {
|
"yaxis": {
|
||||||
"range": [
|
"range": [
|
||||||
0.41100000000000003,
|
0.41100000000000003,
|
||||||
-0.41100000000000003
|
-0.1
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"zaxis": {
|
"zaxis": {
|
||||||
"range": [
|
"range": [
|
||||||
-0.41100000000000003,
|
-0.1,
|
||||||
0.41100000000000003
|
0.41100000000000003
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -1559,7 +1592,7 @@
|
|||||||
" y=corners[:, 1],\n",
|
" y=corners[:, 1],\n",
|
||||||
" z=corners[:, 2],\n",
|
" z=corners[:, 2],\n",
|
||||||
" mode=\"markers+lines+text\",\n",
|
" mode=\"markers+lines+text\",\n",
|
||||||
" text=str(plane_a.ids[i]),\n",
|
" text=list(range(4)),\n",
|
||||||
" name=str(plane_a.ids[i]),\n",
|
" name=str(plane_a.ids[i]),\n",
|
||||||
" marker=dict(size=1),\n",
|
" marker=dict(size=1),\n",
|
||||||
" )\n",
|
" )\n",
|
||||||
@ -1626,24 +1659,21 @@
|
|||||||
" )\n",
|
" )\n",
|
||||||
")\n",
|
")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"fig.update_layout(\n",
|
|
||||||
" scene=dict(\n",
|
|
||||||
" aspectmode=\"cube\",\n",
|
|
||||||
" # yaxis_autorange=\"reversed\"\n",
|
|
||||||
" xaxis=dict(range=[-params.total_side_length, params.total_side_length]),\n",
|
|
||||||
" # reverse y\n",
|
|
||||||
" yaxis=dict(range=[params.total_side_length, -params.total_side_length]),\n",
|
|
||||||
" zaxis=dict(range=[-params.total_side_length, params.total_side_length]),\n",
|
|
||||||
" )\n",
|
|
||||||
")\n",
|
|
||||||
"# fig.update_layout(\n",
|
"# fig.update_layout(\n",
|
||||||
"# scene=dict(\n",
|
"# scene=dict(\n",
|
||||||
"# aspectmode='cube',\n",
|
"# aspectmode=\"cube\",\n",
|
||||||
"# xaxis=dict(range=[-0.1, params.total_side_length]),\n",
|
"# yaxis_autorange=\"reversed\",\n",
|
||||||
"# yaxis=dict(range=[params.total_side_length, -0.1]),\n",
|
|
||||||
"# zaxis=dict(range=[-0.1, params.total_side_length]),\n",
|
|
||||||
"# )\n",
|
"# )\n",
|
||||||
"# )\n",
|
"# )\n",
|
||||||
|
"\n",
|
||||||
|
"fig.update_layout(\n",
|
||||||
|
" scene=dict(\n",
|
||||||
|
" aspectmode='cube',\n",
|
||||||
|
" xaxis=dict(range=[-0.1, params.total_side_length]),\n",
|
||||||
|
" yaxis=dict(range=[params.total_side_length, -0.1]),\n",
|
||||||
|
" zaxis=dict(range=[-0.1, params.total_side_length]),\n",
|
||||||
|
" )\n",
|
||||||
|
")\n",
|
||||||
"fig.show()"
|
"fig.show()"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user