806 lines
86 KiB
Plaintext
806 lines
86 KiB
Plaintext
|
{
|
|||
|
"cells": [
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "e2ae546c-570b-4245-99fa-60519f448e1e",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"# Code to verify and visualize reorientation caused twinning in the deformation gradient.\n",
|
|||
|
"## Using the correspondence matrix method.\n",
|
|||
|
"By Satyapriya Gupta, Achal H P\n",
|
|||
|
"\n",
|
|||
|
"Reference Niewczas, Acta Materialia, 2010"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 1,
|
|||
|
"id": "8faa8558-2109-45ed-b795-94150b3c998d",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"import math\n",
|
|||
|
"import numpy as np\n",
|
|||
|
"import scipy.linalg\n",
|
|||
|
"from numpy.linalg import inv\n",
|
|||
|
"import damask"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "bc185fbf-e55d-445e-b8aa-f17abdd93b9a",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"### Test Case: Extension Twinning $( \\bar{1} 0 1 2)$ $[1 0 \\bar{1} 1] $\n",
|
|||
|
"\n",
|
|||
|
"Conversion to Miller indices: $ (\\bar{1} 0 2) [2 1 1] $"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 2,
|
|||
|
"id": "fee7fbb5-3a4b-421c-bbe7-636c3fd412e9",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"2.3743159014756228\n",
|
|||
|
"1.6881920256873888\n",
|
|||
|
"[0.63176092 0.36474734 0.68398649]\n",
|
|||
|
"[-0.59234968 -0.34199325 0.72949468]\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"# Twin direction:\n",
|
|||
|
"m = np.array([2, 1, 1])\n",
|
|||
|
"# Habit plane normal\n",
|
|||
|
"n = np.array([-1, 0, 2])\n",
|
|||
|
"# Mapping from Miller indes to cartesian coordinate system\n",
|
|||
|
"matA=np.array([[1, -0.5, 0],[0, 0.5*np.sqrt(3), 0],[0, 0, 1.624]])\n",
|
|||
|
"#norm of twin direction\n",
|
|||
|
"norm_mcart=np.linalg.norm(np.matmul(matA,m))\n",
|
|||
|
"# norm of twin plane\n",
|
|||
|
"norm_ncart=np.linalg.norm(np.matmul(n,inv(matA)))\n",
|
|||
|
"# normalized unit vectors:\n",
|
|||
|
"unit_mcart = np.matmul(matA,m)/norm_mcart\n",
|
|||
|
"unit_ncart = np.matmul(n, inv(matA))/norm_ncart\n",
|
|||
|
"# Characteristic shear for Extension twin of Mg\n",
|
|||
|
"s = 0.128917\n",
|
|||
|
"print(norm_mcart)\n",
|
|||
|
"print(norm_ncart)\n",
|
|||
|
"print(unit_mcart)\n",
|
|||
|
"print(unit_ncart)"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "716495ad-76ca-4790-b1f4-a2f249e452db",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"### Please provide Euler Angles Here:"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 3,
|
|||
|
"id": "eaa69469-71ca-42fc-a4ed-afa0fb84a230",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"[[ 0.06435814 0.99792687 0. ]\n",
|
|||
|
" [-0.99792687 0.06435814 0. ]\n",
|
|||
|
" [ 0. 0. 1. ]]\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"phi_1 = 86.31\n",
|
|||
|
"phi_ = 0\n",
|
|||
|
"phi_2 = 0\n",
|
|||
|
"\n",
|
|||
|
"init = damask.Orientation.from_Euler_angles(phi=[phi_1,phi_,phi_2],degrees=True,family='hexagonal',lattice='hP',a=1.0,b=1.0,c=1.6235).as_matrix()\n",
|
|||
|
"print(init)\n"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "1262386a-1d9c-4bb0-a147-c409f45ec751",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"### Initial Undeformed Condition, $ F = Identity matrix $"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 4,
|
|||
|
"id": "689c6399-fd48-4456-be57-a8f7f7e16276",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"F = np.identity(3)"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "64b46853-7012-432f-93c1-4acb1fe4dc9a",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"### If $F = I$, then inverse of $F$ gives $F_e$."
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 5,
|
|||
|
"id": "3c3bfb00-2af0-4754-8d4e-89ee10d62519",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"Fp=init\n",
|
|||
|
"Fe=inv(Fp)\n",
|
|||
|
"Rinv = inv(init)"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "6786e80d-c9b2-41de-9fc1-40e8d3fc5acd",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"### Shape change by twinning in the reference configuration:"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 6,
|
|||
|
"id": "83c683bf-e3b8-4ec3-9e59-d0a25a55ca0e",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"deformation gradient of shape change= \n",
|
|||
|
" [[ 0.9873633 0.02555718 -0.03040754]\n",
|
|||
|
" [ 0.02555718 0.94831169 0.06149796]\n",
|
|||
|
" [ 0.02673204 -0.05406441 1.06432501]]\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"S_ref= s * np.einsum('i,j',np.matmul(Rinv,unit_mcart),np.matmul(Rinv,unit_ncart)) + np.identity(3)\n",
|
|||
|
"print(\"deformation gradient of shape change= \\n\", S_ref)"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "eb708c6b-38ea-4f4a-ac59-91e31b55df95",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"### After twinning, $ F_1 = Fe_1 * {F_p}_1 $ , where $ {F_p}_1 = C * {F_p}$"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 7,
|
|||
|
"id": "b1ad7d3a-fcf2-4116-9339-0451961ece5d",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"with determinant of 1.0000001660951485\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"F1=S_ref\n",
|
|||
|
"C=np.array([[-0.25,0.433013,-0.923645],[0.433013,-0.75,-0.533267],[-0.812, -0.468808, 0]])\n",
|
|||
|
"Fe1=np.matmul(F1,inv(np.matmul(C,Fp)))\n",
|
|||
|
"print (\"with determinant of \",np.linalg.det(Fe1))"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "d21c31d5-72b1-43ed-91e4-2b194cd4eaaf",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"### Right polar decomposition of $F_e$, $ F_e = R U $ gives the rotation of deformed voxel."
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 8,
|
|||
|
"id": "9e5edf14-8645-4816-86ee-89d0fb02335e",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"[300.00001112 86.31191012 153.69000584]\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"(R_,U_) = scipy.linalg.polar(Fe1,'right')\n",
|
|||
|
"check = damask.Orientation.from_matrix(R=R_,family='hexagonal',lattice='hP',a=1.0,b=1.0,c=1.6235).as_Euler_angles(degrees=True)\n",
|
|||
|
"print(check)"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "749c4997-c181-41c7-8359-f0fd37ee1a38",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"### Get the orientation details"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 9,
|
|||
|
"id": "e6e8b162-7e0b-45dc-a37f-bee3071ce353",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"[ 26.30999416 86.31191012 239.99998888]\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"new_ori = damask.Orientation.from_matrix(R=np.linalg.inv(R_),family='hexagonal',lattice='hP',a=1.0,b=1.0,c=1.6235)\n",
|
|||
|
"print(damask.Orientation.from_matrix(R=np.linalg.inv(R_),family='hexagonal',lattice='hP',a=1.0,b=1.0,c=1.6235).as_Euler_angles(degrees=True))"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 10,
|
|||
|
"id": "80ac2638-3ebd-47c6-8e80-243a1c69fce1",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"Crystal family: hexagonal\n",
|
|||
|
"Bravais lattice: hP\n",
|
|||
|
"a=1 m, b=1 m, c=1.6235 m\n",
|
|||
|
"α=90°, β=90°, γ=120°\n",
|
|||
|
"Quaternion [0.72950604 0. 0. 0.68397436]\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"old_ori = damask.Orientation.from_Euler_angles(phi=[phi_1,phi_,phi_2],degrees=True,family='hexagonal',lattice='hP',a=1.0,b=1.0,c=1.6235)\n",
|
|||
|
"print(old_ori)"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 11,
|
|||
|
"id": "cc1b231c-16e6-4d7d-bda2-8d0a4799839f",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"Crystal family: hexagonal\n",
|
|||
|
"Bravais lattice: hP\n",
|
|||
|
"a=1 m, b=1 m, c=1.6235 m\n",
|
|||
|
"α=90°, β=90°, γ=120°\n",
|
|||
|
"Quaternion [7.29494643e-01 6.83986524e-01 3.14974751e-08 1.07984812e-07]\n",
|
|||
|
"[ 0. 86.31191012 0. ]\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"dis = old_ori.disorientation(new_ori)\n",
|
|||
|
"print(dis)\n",
|
|||
|
"print(dis.as_Euler_angles(degrees=True))"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "3efee0a1-5ebe-42bd-bb05-61721097458d",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"## Result: Print the disorientation between undeformed and deformed voxel."
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 12,
|
|||
|
"id": "10b562ea-c067-4ec0-8b26-59dd8722305a",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"disorientation = 86.31191011698503 degrees\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"print('disorientation =',dis.as_axis_angle(degrees=True,pair=True)[1],'degrees')"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "10bdf007-9926-4e38-9195-dd3fd349f634",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"# Code to visualization of lattice reorientation caused by twinning.\n",
|
|||
|
"\n",
|
|||
|
"First cell below gives HCP unit cell with euler angles 0,0,0.\n",
|
|||
|
"\n",
|
|||
|
"Second cell below rotates unit cell by provided euler angles.\n",
|
|||
|
"\n",
|
|||
|
"Third cell below shows reorientation done after twinning."
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 13,
|
|||
|
"id": "37f8aa5b-a6df-45be-861f-46bdd218154a",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEA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9dddxEWFoanp6fT19RsFLK/bConT54EwNfX18UraT6Kd2trB31c6cbu2rWLsrIyZs2axSOPPEJISAju7u4uW0/z0VBXSlopAaG6KCgoAFBkkYKixSm33OXFixcBeOGFFxg3bpxL19IiNDRoOV39/rYE29QGpYpTkW6tK44+aIirV69y7NgxAHEImPKo23IqFUEQOHv2LKBMcZaVlUliOZ3mS9qCPtXV1TU3lskUvJycHNH9s61NccjgfZSS4uJiMb+prO1FDRUVFZJE8p0iTlvQR45FBVlZWXTp0gVQsuWkLRlOcb8JyrScUrm1DhWn/cxYuewv7bFYLDcVhdtyrM5A2veh7mspNSDUFsQpa7fW5sbaN0TLSZgAX331FVeuXCEkJARQuOVswHTK7X1vjNOnT4v/rUS3VtbitFqt4qRsuVlLe7KyssRCdVDwnrMey6lUCgoK6Nq1K6Bcyyk7t1ZpRx9kZ2cTFBQkVqEo2nIq1IWti4KCAnr27AkoV5yyCgjZcpc2N1bOogQoLCzk66+/JjIyUqwAUqzllPl73VwKCgrEB6bq1kqATYxKECbUWE2AqKgoUZzODAhJT9uoEDKbzZw9e1YUpxItZ0VFhbzECfJ3Y+3Jzs4mICC
|
|||
|
"text/plain": [
|
|||
|
"<Figure size 432x288 with 1 Axes>"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {},
|
|||
|
"output_type": "display_data"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"import numpy as np\n",
|
|||
|
"import matplotlib.pyplot as plt\n",
|
|||
|
"from mpl_toolkits.mplot3d import Axes3D\n",
|
|||
|
"from math import cos, sin, radians\n",
|
|||
|
"\n",
|
|||
|
"# Define the line\n",
|
|||
|
"x = np.linspace(0, 1.2, 100)\n",
|
|||
|
"y = np.zeros_like(x)\n",
|
|||
|
"z = np.zeros_like(x)\n",
|
|||
|
"\n",
|
|||
|
"x1 = np.zeros_like(x)\n",
|
|||
|
"y1 = np.zeros_like(x)\n",
|
|||
|
"z1 = np.linspace(0, 1.2, 100)\n",
|
|||
|
"\n",
|
|||
|
"x2 = np.zeros_like(x)\n",
|
|||
|
"y2 = np.linspace(0, 1.2, 100)\n",
|
|||
|
"z2 = np.zeros_like(x)\n",
|
|||
|
"\n",
|
|||
|
"h11 = np.linspace(1,0.5,100)\n",
|
|||
|
"h12 = h11*np.sqrt(3) - np.sqrt(3)\n",
|
|||
|
"h13 = np.zeros_like(h11)\n",
|
|||
|
"\n",
|
|||
|
"h21 = np.linspace(-0.5, 0.5, 100)\n",
|
|||
|
"h22 = np.ones_like(h21) * np.sqrt(3) / 2\n",
|
|||
|
"h23 = np.zeros_like(h21)\n",
|
|||
|
"\n",
|
|||
|
"h31 = np.linspace(-0.5, 0.5, 100)\n",
|
|||
|
"h32 = - np.ones_like(h31) * np.sqrt(3) / 2\n",
|
|||
|
"h33 = np.zeros_like(h31)\n",
|
|||
|
"\n",
|
|||
|
"h41 = np.linspace(1,0.5,100)\n",
|
|||
|
"h42 = - h41*np.sqrt(3) + np.sqrt(3)\n",
|
|||
|
"h43 = np.zeros_like(h41)\n",
|
|||
|
"\n",
|
|||
|
"h51 = np.linspace(-1,-0.5,100)\n",
|
|||
|
"h52 = - h51*np.sqrt(3) - np.sqrt(3)\n",
|
|||
|
"h53 = np.zeros_like(h51)\n",
|
|||
|
"\n",
|
|||
|
"h61 = np.linspace(-1,-0.5,100)\n",
|
|||
|
"h62 = h61*np.sqrt(3) + np.sqrt(3)\n",
|
|||
|
"h63 = np.zeros_like(h61)\n",
|
|||
|
"\n",
|
|||
|
"k11 = np.linspace(1,0.5,100)\n",
|
|||
|
"k12 = k11*np.sqrt(3) - np.sqrt(3)\n",
|
|||
|
"k13 = np.ones_like(k11)\n",
|
|||
|
"\n",
|
|||
|
"k21 = np.linspace(-0.5, 0.5, 100)\n",
|
|||
|
"k22 = np.ones_like(k21) * np.sqrt(3) / 2\n",
|
|||
|
"k23 = np.ones_like(k21)\n",
|
|||
|
"\n",
|
|||
|
"k31 = np.linspace(-0.5, 0.5, 100)\n",
|
|||
|
"k32 = - np.ones_like(k31) * np.sqrt(3) / 2\n",
|
|||
|
"k33 = np.ones_like(k31)\n",
|
|||
|
"\n",
|
|||
|
"k41 = np.linspace(1,0.5,100)\n",
|
|||
|
"k42 = - k41*np.sqrt(3) + np.sqrt(3)\n",
|
|||
|
"k43 = np.ones_like(k41)\n",
|
|||
|
"\n",
|
|||
|
"k51 = np.linspace(-1,-0.5,100)\n",
|
|||
|
"k52 = - k51*np.sqrt(3) - np.sqrt(3)\n",
|
|||
|
"k53 = np.ones_like(k51)\n",
|
|||
|
"\n",
|
|||
|
"k61 = np.linspace(-1,-0.5,100)\n",
|
|||
|
"k62 = k61*np.sqrt(3) + np.sqrt(3)\n",
|
|||
|
"k63 = np.ones_like(k61)\n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"v11 = np.ones_like(x) * 0.5\n",
|
|||
|
"v12 = np.ones_like(x) * np.sqrt(3) / 2\n",
|
|||
|
"v13 = np.linspace(0, 1, 100)\n",
|
|||
|
"\n",
|
|||
|
"v21 = - np.ones_like(x) * 0.5\n",
|
|||
|
"v22 = np.ones_like(x) * np.sqrt(3) / 2\n",
|
|||
|
"v23 = np.linspace(0, 1, 100)\n",
|
|||
|
"\n",
|
|||
|
"v31 = - np.ones_like(x) * 0.5\n",
|
|||
|
"v32 = - np.ones_like(x) * np.sqrt(3) / 2\n",
|
|||
|
"v33 = np.linspace(0, 1, 100)\n",
|
|||
|
"\n",
|
|||
|
"v41 = np.ones_like(x) * 0.5\n",
|
|||
|
"v42 = - np.ones_like(x) * np.sqrt(3) / 2\n",
|
|||
|
"v43 = np.linspace(0, 1, 100)\n",
|
|||
|
"\n",
|
|||
|
"v51 = - np.ones_like(x)\n",
|
|||
|
"v52 = np.zeros_like(x)\n",
|
|||
|
"v53 = np.linspace(0, 1, 100)\n",
|
|||
|
"\n",
|
|||
|
"v61 = np.ones_like(x)\n",
|
|||
|
"v62 = np.zeros_like(x)\n",
|
|||
|
"v63 = np.linspace(0, 1, 100)\n",
|
|||
|
"\n",
|
|||
|
"# Plot the line\n",
|
|||
|
"fig = plt.figure()\n",
|
|||
|
"ax = fig.add_subplot(111, projection='3d')\n",
|
|||
|
"ax.plot(x, y, z)\n",
|
|||
|
"ax.plot(x1, y1, z1)\n",
|
|||
|
"#ax.plot(x2, y2, z2)\n",
|
|||
|
"ax.plot(h11, h12, h13, 'k-')\n",
|
|||
|
"ax.plot(h21, h22, h23, 'k-')\n",
|
|||
|
"ax.plot(h31, h32, h33, 'k-')\n",
|
|||
|
"ax.plot(h41, h42, h43, 'k-')\n",
|
|||
|
"ax.plot(h51, h52, h53, 'k-')\n",
|
|||
|
"ax.plot(h61, h62, h63, 'k-')\n",
|
|||
|
"ax.plot(k11, k12, k13, 'k-')\n",
|
|||
|
"ax.plot(k21, k22, k23, 'k-')\n",
|
|||
|
"ax.plot(k31, k32, k33, 'k-')\n",
|
|||
|
"ax.plot(k41, k42, k43, 'k-')\n",
|
|||
|
"ax.plot(k51, k52, k53, 'k-')\n",
|
|||
|
"ax.plot(k61, k62, k63, 'k-')\n",
|
|||
|
"ax.plot(v11, v12, v13, 'k-')\n",
|
|||
|
"ax.plot(v21, v22, v23, 'k-')\n",
|
|||
|
"ax.plot(v31, v32, v33, 'k-')\n",
|
|||
|
"ax.plot(v41, v42, v43, 'k-')\n",
|
|||
|
"ax.plot(v51, v52, v53, 'k-')\n",
|
|||
|
"ax.plot(v61, v62, v63, 'k-')\n",
|
|||
|
"\n",
|
|||
|
"ax.set_xticks([])\n",
|
|||
|
"ax.set_yticks([])\n",
|
|||
|
"ax.set_zticks([])\n",
|
|||
|
"\n",
|
|||
|
"ax.set_xlabel('')\n",
|
|||
|
"ax.set_ylabel('')\n",
|
|||
|
"ax.set_zlabel('')\n",
|
|||
|
"plt.show()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 14,
|
|||
|
"id": "a523f432-ce0a-4506-9d83-bd469e1c9ba3",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OHQo/QkkgLS2t2PmxJVKcb5cPEQShRI2WL168wNHREScnJ5o2bUpsbCxDhw7N1/7MzEzGjRtHjRo1WLp0qZqsVR0XL17EwsKCwMBAfv/9d3bs2EGlSpVyPdbJyYnnz5/j5+enZiuLTlZWVp5Lk4JS4sSZ443VtqCCghATE0O7du3w8fFhzpw5HDp0SOGRzI/Fixdz5coV1q5dm+8Iq+3s3r2brl27kpqaSmBgIN9///0HP0dLS0vq1avHtm3b1Ghl8SluGGWJEqdcLicrK0srYmMLg0QiYc6cOdjY2GBgYEBkZCSzZs1CX79gTd7i4+NZs2YNo0aNwsbGRsXWqo6srCx++OEHxo0bR5s2bTh27Bimpqb5nqerq8vo0aOJi4vjypUrarC0eChjGwVKiDhLyt5lbly7dg1LS0uWL1+Oo6MjCQkJtGvXrsDnp6en4+rqSp06dVi0aJEKLVUtd+7cwcbGhq1btyrS3WrWrFng84cPH46BgUGJGT2VMXhovThL6t6lIAhs2bKFjh07cuvWLfbs2YObm1uhPXhz587lxo0bbNiwQa0FuJRJWFgYZmZm3Lhxg127drFw4cICzxpyqF69OnZ2duzZs4f09HQVWaoclFV+RqvFWVL3Lp88eYKDgwOTJk2iY8eOJCYmYm9vX+jrREVF4e7ujqura75bLNqITCZj8eLFDBw4kC+++ILIyMhieZmdnZ158eIF+/fvV6KVyic9PV0p4YZaGVuryfIhxSU0NBQXFxdSUlL4/fffmTRpUq6OgZxMmbycBq9evcLU1BQDAwNiY2M1HltaWJ49e4azszNHjhxh2LBhrFq1qtjPIAgC7du
|
|||
|
"text/plain": [
|
|||
|
"<Figure size 432x288 with 1 Axes>"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {},
|
|||
|
"output_type": "display_data"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"# Define the rotation angles (in radians)\n",
|
|||
|
"alpha = radians(phi_1) # Rotation around the x-axis\n",
|
|||
|
"beta = radians(phi_) # Rotation around the y-axis\n",
|
|||
|
"gamma = radians(phi_2) # Rotation around the z-axis\n",
|
|||
|
"\n",
|
|||
|
"# Create the rotation matrices\n",
|
|||
|
"Rx = np.array([[1, 0, 0],\n",
|
|||
|
" [0, cos(alpha), -sin(alpha)],\n",
|
|||
|
" [0, sin(alpha), cos(alpha)]])\n",
|
|||
|
"\n",
|
|||
|
"Ry = np.array([[cos(beta), 0, sin(beta)],\n",
|
|||
|
" [0, 1, 0],\n",
|
|||
|
" [-sin(beta), 0, cos(beta)]])\n",
|
|||
|
"\n",
|
|||
|
"Rz = np.array([[cos(gamma), -sin(gamma), 0],\n",
|
|||
|
" [sin(gamma), cos(gamma), 0],\n",
|
|||
|
" [0, 0, 1]])\n",
|
|||
|
"\n",
|
|||
|
"# Combine the rotation matrices\n",
|
|||
|
"R = Rz @ Ry @ Rx\n",
|
|||
|
"\n",
|
|||
|
"# Apply the rotation to the line\n",
|
|||
|
"point1 = np.column_stack((x, y, z))\n",
|
|||
|
"point2 = np.column_stack((x1, y1, z1))\n",
|
|||
|
"point3 = np.column_stack((h11,h12,h13))\n",
|
|||
|
"point4 = np.column_stack((h21, h22, h23))\n",
|
|||
|
"point5 = np.column_stack((h31, h32, h33))\n",
|
|||
|
"point6 = np.column_stack((h41, h42, h43))\n",
|
|||
|
"point7 = np.column_stack((h51, h52, h53))\n",
|
|||
|
"point8 = np.column_stack((h61, h62, h63))\n",
|
|||
|
"point9 = np.column_stack((k11, k12, k13))\n",
|
|||
|
"point10 = np.column_stack((k21, k22, k23))\n",
|
|||
|
"point11 = np.column_stack((k31, k32, k33))\n",
|
|||
|
"point12 = np.column_stack((k41, k42, k43))\n",
|
|||
|
"point13 = np.column_stack((k51, k52, k53))\n",
|
|||
|
"point14 = np.column_stack((k61, k62, k63))\n",
|
|||
|
"point15 = np.column_stack((v11, v12, v13))\n",
|
|||
|
"point16 = np.column_stack((v21, v22, v23))\n",
|
|||
|
"point17 = np.column_stack((v31, v32, v33))\n",
|
|||
|
"point18 = np.column_stack((v41, v42, v43))\n",
|
|||
|
"point19 = np.column_stack((v51, v52, v53))\n",
|
|||
|
"point20 = np.column_stack((v61, v62, v63))\n",
|
|||
|
"point21 = np.column_stack((x2, y2, z2))\n",
|
|||
|
"\n",
|
|||
|
"rotated_point1 = np.dot(R, point1.T).T\n",
|
|||
|
"rotated_point2 = np.dot(R, point2.T).T\n",
|
|||
|
"rotated_point3 = np.dot(R, point3.T).T\n",
|
|||
|
"rotated_point4 = np.dot(R, point4.T).T\n",
|
|||
|
"rotated_point5 = np.dot(R, point5.T).T\n",
|
|||
|
"rotated_point6 = np.dot(R, point6.T).T\n",
|
|||
|
"rotated_point7 = np.dot(R, point7.T).T\n",
|
|||
|
"rotated_point8 = np.dot(R, point8.T).T\n",
|
|||
|
"rotated_point9 = np.dot(R, point9.T).T\n",
|
|||
|
"rotated_point10 = np.dot(R, point10.T).T\n",
|
|||
|
"rotated_point11 = np.dot(R, point11.T).T\n",
|
|||
|
"rotated_point12 = np.dot(R, point12.T).T\n",
|
|||
|
"rotated_point13 = np.dot(R, point13.T).T\n",
|
|||
|
"rotated_point14 = np.dot(R, point14.T).T\n",
|
|||
|
"rotated_point15 = np.dot(R, point15.T).T\n",
|
|||
|
"rotated_point16 = np.dot(R, point16.T).T\n",
|
|||
|
"rotated_point17 = np.dot(R, point17.T).T\n",
|
|||
|
"rotated_point18 = np.dot(R, point18.T).T\n",
|
|||
|
"rotated_point19 = np.dot(R, point19.T).T\n",
|
|||
|
"rotated_point20 = np.dot(R, point20.T).T\n",
|
|||
|
"rotated_point21 = np.dot(R, point21.T).T\n",
|
|||
|
"\n",
|
|||
|
"# Extract the rotated coordinates\n",
|
|||
|
"x_rotated1, y_rotated1, z_rotated1 = rotated_point1.T\n",
|
|||
|
"x_rotated2, y_rotated2, z_rotated2 = rotated_point2.T\n",
|
|||
|
"x_rotated3, y_rotated3, z_rotated3 = rotated_point3.T\n",
|
|||
|
"x_rotated4, y_rotated4, z_rotated4 = rotated_point4.T\n",
|
|||
|
"x_rotated5, y_rotated5, z_rotated5 = rotated_point5.T\n",
|
|||
|
"x_rotated6, y_rotated6, z_rotated6 = rotated_point6.T\n",
|
|||
|
"x_rotated7, y_rotated7, z_rotated7 = rotated_point7.T\n",
|
|||
|
"x_rotated8, y_rotated8, z_rotated8 = rotated_point8.T\n",
|
|||
|
"x_rotated9, y_rotated9, z_rotated9 = rotated_point9.T\n",
|
|||
|
"x_rotated10, y_rotated10, z_rotated10 = rotated_point10.T\n",
|
|||
|
"x_rotated11, y_rotated11, z_rotated11 = rotated_point11.T\n",
|
|||
|
"x_rotated12, y_rotated12, z_rotated12 = rotated_point12.T\n",
|
|||
|
"x_rotated13, y_rotated13, z_rotated13 = rotated_point13.T\n",
|
|||
|
"x_rotated14, y_rotated14, z_rotated14 = rotated_point14.T\n",
|
|||
|
"x_rotated15, y_rotated15, z_rotated15 = rotated_point15.T\n",
|
|||
|
"x_rotated16, y_rotated16, z_rotated16 = rotated_point16.T\n",
|
|||
|
"x_rotated17, y_rotated17, z_rotated17 = rotated_point17.T\n",
|
|||
|
"x_rotated18, y_rotated18, z_rotated18 = rotated_point18.T\n",
|
|||
|
"x_rotated19, y_rotated19, z_rotated19 = rotated_point19.T\n",
|
|||
|
"x_rotated20, y_rotated20, z_rotated20 = rotated_point20.T\n",
|
|||
|
"x_rotated21, y_rotated21, z_rotated21 = rotated_point21.T\n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"# Plot the line\n",
|
|||
|
"fig = plt.figure()\n",
|
|||
|
"ax = fig.add_subplot(projection='3d')\n",
|
|||
|
"ax.plot(x_rotated1, y_rotated1, z_rotated1)\n",
|
|||
|
"ax.plot(x_rotated2, y_rotated2, z_rotated2)\n",
|
|||
|
"#ax.plot(x_rotated21, y_rotated21, z_rotated21)\n",
|
|||
|
"ax.plot(x_rotated3, y_rotated3, z_rotated3, 'k-')\n",
|
|||
|
"ax.plot(x_rotated4, y_rotated4, z_rotated4, 'k-')\n",
|
|||
|
"ax.plot(x_rotated5, y_rotated5, z_rotated5, 'k-')\n",
|
|||
|
"ax.plot(x_rotated6, y_rotated6, z_rotated6, 'k-')\n",
|
|||
|
"ax.plot(x_rotated7, y_rotated7, z_rotated7, 'k-')\n",
|
|||
|
"ax.plot(x_rotated8, y_rotated8, z_rotated8, 'k-')\n",
|
|||
|
"ax.plot(x_rotated9, y_rotated9, z_rotated9, 'k-')\n",
|
|||
|
"ax.plot(x_rotated10, y_rotated10, z_rotated10, 'k-')\n",
|
|||
|
"ax.plot(x_rotated11, y_rotated11, z_rotated11, 'k-')\n",
|
|||
|
"ax.plot(x_rotated12, y_rotated12, z_rotated12, 'k-')\n",
|
|||
|
"ax.plot(x_rotated13, y_rotated13, z_rotated13, 'k-')\n",
|
|||
|
"ax.plot(x_rotated14, y_rotated14, z_rotated14, 'k-')\n",
|
|||
|
"ax.plot(x_rotated15, y_rotated15, z_rotated15, 'k-')\n",
|
|||
|
"ax.plot(x_rotated16, y_rotated16, z_rotated16, 'k-')\n",
|
|||
|
"ax.plot(x_rotated17, y_rotated17, z_rotated17, 'k-')\n",
|
|||
|
"ax.plot(x_rotated18, y_rotated18, z_rotated18, 'k-')\n",
|
|||
|
"ax.plot(x_rotated19, y_rotated19, z_rotated19, 'k-')\n",
|
|||
|
"ax.plot(x_rotated20, y_rotated20, z_rotated20, 'k-')\n",
|
|||
|
"\n",
|
|||
|
"ax.set_xticks([])\n",
|
|||
|
"ax.set_yticks([])\n",
|
|||
|
"ax.set_zticks([])\n",
|
|||
|
"\n",
|
|||
|
"ax.set_xlabel('')\n",
|
|||
|
"ax.set_ylabel('')\n",
|
|||
|
"ax.set_zlabel('')\n",
|
|||
|
"plt.show()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 15,
|
|||
|
"id": "0f461c1e-f9db-4880-8ed3-2a4c841b2251",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAA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do5ubG4Ig8Mcff5j1vjY2Nnh4eLB+/Xri4+P56quvqF69OvPnz8fFxYXRo0cTFhZW7txeqdxai4nTWvoui+LRo0d89913dOzYkcGDBxMVFcWbb77JhQsXCA8PZ/jw4YWWzFmCrl27YmNjY3LX9mnUrl2byZMnc+DAAaKjo5k5cybnz5/ntddew8nJiXfffZfo6GhJ+iAtjVTitEgqxZpzl+fOnWPVqlVs2bKF9PR0OnfuzLRp0/Dz8ytukTPwvynz5nLh+/TpQ82aNQkPDzfL/YqDXq/n0KFDbNq0iZ07d5KVlYWLiwsBAQGMGTPG4h5HaQkODiYtLY3Zs2cX9yXySKXo9Xqys7OtSpjZ2dls3ryZfv360a1bN4KDg/Hx8eHo0aMcPXqU1157rUTCtATdu3fn5MmTsmoPs7GxYeDAgQQFBREfH8/XX39NzZo1+fDDD3FxccHHxweNRsODBw8svdQSkZaWZl1urejGarXa3BtbgRt77do15s+fT/PmzZk0aRL379/ns88+49q1a6xevZrOnTtbeonFxs3NjYyMDM6dO2fppRRKrVq1mDhxIvv37yc6Opp3332XmJgYJk2aRNOmTfnll18svcRik5GRQY0aNcp8HbOI05pylwaDgT179jBy5EhatWrFsmXL6NmzJ+Hh4fz111/MnDmTOnXqWHqZJaZHjx6AtMUIpsLJyYmPPvqI8+fP4+npCWBVkxusIlorFqxbgxv7999/8+WXX9KqVSu8vLw4ffo0c+f
|
|||
|
"text/plain": [
|
|||
|
"<Figure size 432x288 with 1 Axes>"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {},
|
|||
|
"output_type": "display_data"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"# Define the rotation angles (in radians)\n",
|
|||
|
"alpha = damask.Orientation.from_matrix(R=np.linalg.inv(R_),family='hexagonal',lattice='hP',a=1.0,b=1.0,c=1.6235).as_Euler_angles(degrees=False)[0] \n",
|
|||
|
"beta = damask.Orientation.from_matrix(R=np.linalg.inv(R_),family='hexagonal',lattice='hP',a=1.0,b=1.0,c=1.6235).as_Euler_angles(degrees=False)[1] \n",
|
|||
|
"gamma = damask.Orientation.from_matrix(R=np.linalg.inv(R_),family='hexagonal',lattice='hP',a=1.0,b=1.0,c=1.6235).as_Euler_angles(degrees=False)[2] \n",
|
|||
|
"\n",
|
|||
|
"# Create the rotation matrices\n",
|
|||
|
"Rx = np.array([[1, 0, 0],\n",
|
|||
|
" [0, cos(alpha), -sin(alpha)],\n",
|
|||
|
" [0, sin(alpha), cos(alpha)]])\n",
|
|||
|
"\n",
|
|||
|
"Ry = np.array([[cos(beta), 0, sin(beta)],\n",
|
|||
|
" [0, 1, 0],\n",
|
|||
|
" [-sin(beta), 0, cos(beta)]])\n",
|
|||
|
"\n",
|
|||
|
"Rz = np.array([[cos(gamma), -sin(gamma), 0],\n",
|
|||
|
" [sin(gamma), cos(gamma), 0],\n",
|
|||
|
" [0, 0, 1]])\n",
|
|||
|
"\n",
|
|||
|
"# Combine the rotation matrices\n",
|
|||
|
"R = Rz @ Ry @ Rx\n",
|
|||
|
"\n",
|
|||
|
"# Apply the rotation to the line\n",
|
|||
|
"point21 = np.column_stack((x_rotated1, y_rotated1, z_rotated1))\n",
|
|||
|
"point22 = np.column_stack((x_rotated2, y_rotated2, z_rotated2))\n",
|
|||
|
"point23 = np.column_stack((x_rotated3, y_rotated3, z_rotated3))\n",
|
|||
|
"point24 = np.column_stack((x_rotated4, y_rotated4, z_rotated4))\n",
|
|||
|
"point25 = np.column_stack((x_rotated5, y_rotated5, z_rotated5))\n",
|
|||
|
"point26 = np.column_stack((x_rotated6, y_rotated6, z_rotated6))\n",
|
|||
|
"point27 = np.column_stack((x_rotated7, y_rotated7, z_rotated7))\n",
|
|||
|
"point28 = np.column_stack((x_rotated8, y_rotated8, z_rotated8))\n",
|
|||
|
"point29 = np.column_stack((x_rotated9, y_rotated9, z_rotated9))\n",
|
|||
|
"point30 = np.column_stack((x_rotated10, y_rotated10, z_rotated10))\n",
|
|||
|
"point31 = np.column_stack((x_rotated11, y_rotated11, z_rotated11))\n",
|
|||
|
"point32 = np.column_stack((x_rotated12, y_rotated12, z_rotated12))\n",
|
|||
|
"point33 = np.column_stack((x_rotated13, y_rotated13, z_rotated13))\n",
|
|||
|
"point34 = np.column_stack((x_rotated14, y_rotated14, z_rotated14))\n",
|
|||
|
"point35 = np.column_stack((x_rotated15, y_rotated15, z_rotated15))\n",
|
|||
|
"point36 = np.column_stack((x_rotated16, y_rotated16, z_rotated16))\n",
|
|||
|
"point37 = np.column_stack((x_rotated17, y_rotated17, z_rotated17))\n",
|
|||
|
"point38 = np.column_stack((x_rotated18, y_rotated18, z_rotated18))\n",
|
|||
|
"point39 = np.column_stack((x_rotated19, y_rotated19, z_rotated19))\n",
|
|||
|
"point40 = np.column_stack((x_rotated20, y_rotated20, z_rotated20))\n",
|
|||
|
"point41 = np.column_stack((x_rotated21, y_rotated21, z_rotated21))\n",
|
|||
|
"\n",
|
|||
|
"rotated_point21 = np.dot(R, point21.T).T\n",
|
|||
|
"rotated_point22 = np.dot(R, point22.T).T\n",
|
|||
|
"rotated_point23 = np.dot(R, point23.T).T\n",
|
|||
|
"rotated_point24 = np.dot(R, point24.T).T\n",
|
|||
|
"rotated_point25 = np.dot(R, point25.T).T\n",
|
|||
|
"rotated_point26 = np.dot(R, point26.T).T\n",
|
|||
|
"rotated_point27 = np.dot(R, point27.T).T\n",
|
|||
|
"rotated_point28 = np.dot(R, point28.T).T\n",
|
|||
|
"rotated_point29 = np.dot(R, point29.T).T\n",
|
|||
|
"rotated_point30 = np.dot(R, point30.T).T\n",
|
|||
|
"rotated_point31 = np.dot(R, point31.T).T\n",
|
|||
|
"rotated_point32 = np.dot(R, point32.T).T\n",
|
|||
|
"rotated_point33 = np.dot(R, point33.T).T\n",
|
|||
|
"rotated_point34 = np.dot(R, point34.T).T\n",
|
|||
|
"rotated_point35 = np.dot(R, point35.T).T\n",
|
|||
|
"rotated_point36 = np.dot(R, point36.T).T\n",
|
|||
|
"rotated_point37 = np.dot(R, point37.T).T\n",
|
|||
|
"rotated_point38 = np.dot(R, point38.T).T\n",
|
|||
|
"rotated_point39 = np.dot(R, point39.T).T\n",
|
|||
|
"rotated_point40 = np.dot(R, point40.T).T\n",
|
|||
|
"rotated_point41 = np.dot(R, point41.T).T\n",
|
|||
|
"\n",
|
|||
|
"# Extract the rotated coordinates\n",
|
|||
|
"x_rotated21, y_rotated21, z_rotated21 = rotated_point21.T\n",
|
|||
|
"x_rotated22, y_rotated22, z_rotated22 = rotated_point22.T\n",
|
|||
|
"x_rotated23, y_rotated23, z_rotated23 = rotated_point23.T\n",
|
|||
|
"x_rotated24, y_rotated24, z_rotated24 = rotated_point24.T\n",
|
|||
|
"x_rotated25, y_rotated25, z_rotated25 = rotated_point25.T\n",
|
|||
|
"x_rotated26, y_rotated26, z_rotated26 = rotated_point26.T\n",
|
|||
|
"x_rotated27, y_rotated27, z_rotated27 = rotated_point27.T\n",
|
|||
|
"x_rotated28, y_rotated28, z_rotated28 = rotated_point28.T\n",
|
|||
|
"x_rotated29, y_rotated29, z_rotated29 = rotated_point29.T\n",
|
|||
|
"x_rotated30, y_rotated30, z_rotated30 = rotated_point30.T\n",
|
|||
|
"x_rotated31, y_rotated31, z_rotated31 = rotated_point31.T\n",
|
|||
|
"x_rotated32, y_rotated32, z_rotated32 = rotated_point32.T\n",
|
|||
|
"x_rotated33, y_rotated33, z_rotated33 = rotated_point33.T\n",
|
|||
|
"x_rotated34, y_rotated34, z_rotated34 = rotated_point34.T\n",
|
|||
|
"x_rotated35, y_rotated35, z_rotated35 = rotated_point35.T\n",
|
|||
|
"x_rotated36, y_rotated36, z_rotated36 = rotated_point36.T\n",
|
|||
|
"x_rotated37, y_rotated37, z_rotated37 = rotated_point37.T\n",
|
|||
|
"x_rotated38, y_rotated38, z_rotated38 = rotated_point38.T\n",
|
|||
|
"x_rotated39, y_rotated39, z_rotated39 = rotated_point39.T\n",
|
|||
|
"x_rotated40, y_rotated40, z_rotated40 = rotated_point40.T\n",
|
|||
|
"x_rotated41, y_rotated41, z_rotated41 = rotated_point41.T\n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"# Plot the line\n",
|
|||
|
"fig = plt.figure()\n",
|
|||
|
"ax = fig.add_subplot(111, projection='3d')\n",
|
|||
|
"ax.plot(x_rotated21, y_rotated21, z_rotated21)\n",
|
|||
|
"ax.plot(x_rotated22, y_rotated22, z_rotated22)\n",
|
|||
|
"ax.plot(x_rotated23, y_rotated23, z_rotated23, 'k-')\n",
|
|||
|
"ax.plot(x_rotated24, y_rotated24, z_rotated24, 'k-')\n",
|
|||
|
"ax.plot(x_rotated25, y_rotated25, z_rotated25, 'k-')\n",
|
|||
|
"ax.plot(x_rotated26, y_rotated26, z_rotated26, 'k-')\n",
|
|||
|
"ax.plot(x_rotated27, y_rotated27, z_rotated27, 'k-')\n",
|
|||
|
"ax.plot(x_rotated28, y_rotated28, z_rotated28, 'k-')\n",
|
|||
|
"ax.plot(x_rotated29, y_rotated29, z_rotated29, 'k-')\n",
|
|||
|
"ax.plot(x_rotated30, y_rotated30, z_rotated30, 'k-')\n",
|
|||
|
"ax.plot(x_rotated31, y_rotated31, z_rotated31, 'k-')\n",
|
|||
|
"ax.plot(x_rotated32, y_rotated32, z_rotated32, 'k-')\n",
|
|||
|
"ax.plot(x_rotated33, y_rotated33, z_rotated33, 'k-')\n",
|
|||
|
"ax.plot(x_rotated34, y_rotated34, z_rotated34, 'k-')\n",
|
|||
|
"ax.plot(x_rotated35, y_rotated35, z_rotated35, 'k-')\n",
|
|||
|
"ax.plot(x_rotated36, y_rotated36, z_rotated36, 'k-')\n",
|
|||
|
"ax.plot(x_rotated37, y_rotated37, z_rotated37, 'k-')\n",
|
|||
|
"ax.plot(x_rotated38, y_rotated38, z_rotated38, 'k-')\n",
|
|||
|
"ax.plot(x_rotated39, y_rotated39, z_rotated39, 'k-')\n",
|
|||
|
"ax.plot(x_rotated40, y_rotated40, z_rotated40, 'k-')\n",
|
|||
|
"ax.plot(x_rotated40, y_rotated40, z_rotated40, 'k-')\n",
|
|||
|
"#ax.plot(x_rotated41, y_rotated41, z_rotated41)\n",
|
|||
|
"\n",
|
|||
|
"ax.set_xticks([])\n",
|
|||
|
"ax.set_yticks([])\n",
|
|||
|
"ax.set_zticks([])\n",
|
|||
|
"\n",
|
|||
|
"ax.set_xlabel('')\n",
|
|||
|
"ax.set_ylabel('')\n",
|
|||
|
"ax.set_zlabel('')\n",
|
|||
|
"plt.show()"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"kernelspec": {
|
|||
|
"display_name": "Python 3 (ipykernel)",
|
|||
|
"language": "python",
|
|||
|
"name": "python3"
|
|||
|
},
|
|||
|
"language_info": {
|
|||
|
"codemirror_mode": {
|
|||
|
"name": "ipython",
|
|||
|
"version": 3
|
|||
|
},
|
|||
|
"file_extension": ".py",
|
|||
|
"mimetype": "text/x-python",
|
|||
|
"name": "python",
|
|||
|
"nbconvert_exporter": "python",
|
|||
|
"pygments_lexer": "ipython3",
|
|||
|
"version": "3.10.12"
|
|||
|
}
|
|||
|
},
|
|||
|
"nbformat": 4,
|
|||
|
"nbformat_minor": 5
|
|||
|
}
|