added explainations, plus some futile attempts at the cubic packing
This commit is contained in:
parent
d80313a440
commit
f32db21b2d
1 changed files with 222 additions and 75 deletions
|
|
@ -1,8 +1,22 @@
|
||||||
{
|
{
|
||||||
"cells": [
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Calculations to find the quadratic form of the octahedron packing"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"$P$ is the matrix of the quadratic form corresponding to $h_1^2 + h_2^2 - \\tilde{b}b = 1$."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": 1,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
|
@ -16,7 +30,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": 2,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -28,7 +42,7 @@
|
||||||
"[ 0 0 0 1]"
|
"[ 0 0 0 1]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 4,
|
"execution_count": 2,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
|
|
@ -37,9 +51,18 @@
|
||||||
"P.inverse()"
|
"P.inverse()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"For an Apollonian packing, you can make a matrix, $W$, where the rows are the coordinates of each of the circles in a quadruple. In an octahedral packing, this is impossible, as there are six circles in a unit. You can try creating a $6\\times 4$ matrix, but, later, we end up needing to invert $WPW^T$, the product of a $6\\times 4$, $4\\times 4$, and $4\\times 6$ matrix, which is singular. Fortunately, the sextuples come in three pairs of circles. Each pair consists of circles that aren't tangent to each other. For whatever reason (we aren't sure yet why, but the Guettler and Mallows says this is the case), the average of the coordinates of the circles in a pair is the same across the sextuple. So, we can make a matrix where the first three rows are the coordinates of circles from different pairs, i.e. three mutually tangent circles, and the fourth is the average of the coordinates in a pair. From this, you can recover the coordinates for all the circles in a sextuple.\n",
|
||||||
|
"\n",
|
||||||
|
"Here $W$ is such a matrix computed for the $(0, 0, 1, 1, 2, 2)$ root sextuple."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 5,
|
"execution_count": 3,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
|
@ -51,9 +74,32 @@
|
||||||
"])"
|
"])"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Here we have $$\n",
|
||||||
|
" WPW^T = \\left(\\begin{matrix}\n",
|
||||||
|
" 1 & -1 & -1 & -1\\\\\n",
|
||||||
|
" -1 & 1 & -1 & -1\\\\\n",
|
||||||
|
" -1 & -1 & 1 & -1\\\\\n",
|
||||||
|
" -1 & -1 & -1 & -1\n",
|
||||||
|
" \\end{matrix}\\right) = M\n",
|
||||||
|
"$$\n",
|
||||||
|
"So, inverting both sides, we get $$\n",
|
||||||
|
" (WPW^T)^{-1} = M^{-1}\n",
|
||||||
|
"$$ $$\n",
|
||||||
|
" (W^T)^{-1}P^{-1}W^{-1} = M^{-1}\n",
|
||||||
|
"$$ $$\n",
|
||||||
|
" P^{-1} = W^TM^{-1}W\n",
|
||||||
|
".$$\n",
|
||||||
|
"\n",
|
||||||
|
"Like in the case with Apollonian packings, this is true for any sextuple $W$. So, we can substitute an arbitrary sextuple for $W$ and it must be equal to $P^{-1}$, letting us derive some useful quadratic forms."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 6,
|
"execution_count": 4,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"scrolled": true
|
"scrolled": true
|
||||||
},
|
},
|
||||||
|
|
@ -67,41 +113,19 @@
|
||||||
"[-1 -1 -1 -1]"
|
"[-1 -1 -1 -1]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 6,
|
"execution_count": 4,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"m = W * P * W.transpose()\n",
|
"M = W * P * W.transpose()\n",
|
||||||
"m"
|
"M"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 7,
|
"execution_count": 5,
|
||||||
"metadata": {
|
|
||||||
"scrolled": true
|
|
||||||
},
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": [
|
|
||||||
"-8"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"execution_count": 7,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
|
||||||
"m.determinant()"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": 8,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"scrolled": true
|
"scrolled": true
|
||||||
},
|
},
|
||||||
|
|
@ -115,18 +139,18 @@
|
||||||
"[-1/2 -1/2 -1/2 1/2]"
|
"[-1/2 -1/2 -1/2 1/2]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 8,
|
"execution_count": 5,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"m.inverse()"
|
"M.inverse()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 9,
|
"execution_count": 6,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
|
@ -142,32 +166,32 @@
|
||||||
"b3 = var('b3')\n",
|
"b3 = var('b3')\n",
|
||||||
"h31 = var('h31')\n",
|
"h31 = var('h31')\n",
|
||||||
"h32 = var('h32')\n",
|
"h32 = var('h32')\n",
|
||||||
"bt4 = var('bt4')\n",
|
"b5_avg = var('b5_avg')\n",
|
||||||
"b4 = var('b4')\n",
|
"b_avg = var('b_avg')\n",
|
||||||
"h41 = var('h41')\n",
|
"h1_avg = var('h1_avg')\n",
|
||||||
"h42 = var('h42')\n",
|
"h2_avg = var('h2_avg')\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"W2 = matrix([\n",
|
"W2 = matrix([\n",
|
||||||
" [bt1, b1, h11, h12],\n",
|
" [bt1, b1, h11, h12],\n",
|
||||||
" [bt2, b2, h21, h22],\n",
|
" [bt2, b2, h21, h22],\n",
|
||||||
" [bt3, b3, h31, h32],\n",
|
" [bt3, b3, h31, h32],\n",
|
||||||
" [bt4, b4, h41, h42],\n",
|
" [b5_avg, b_avg, h1_avg, h2_avg],\n",
|
||||||
"])"
|
"])"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 10,
|
"execution_count": 7,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"D = W2.transpose() * m.inverse() * W2"
|
"D = W2.transpose() * M.inverse() * W2"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 11,
|
"execution_count": 8,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
|
|
@ -179,7 +203,7 @@
|
||||||
"[ 0 0 0 1]"
|
"[ 0 0 0 1]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 11,
|
"execution_count": 8,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
|
|
@ -190,37 +214,37 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 12,
|
"execution_count": 9,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"[b4 == b1 + b2 + b3 - sqrt(2*b1*b2 + 2*(b1 + b2)*b3), b4 == b1 + b2 + b3 + sqrt(2*b1*b2 + 2*(b1 + b2)*b3)]"
|
"[b_avg == b1 + b2 + b3 - sqrt(2*b1*b2 + 2*(b1 + b2)*b3), b_avg == b1 + b2 + b3 + sqrt(2*b1*b2 + 2*(b1 + b2)*b3)]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 12,
|
"execution_count": 9,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"quad = 2 * factor(simplify(D[1][1]))\n",
|
"quad = 2 * factor(simplify(D[1][1]))\n",
|
||||||
"solve(quad == 0, b4)"
|
"solve(quad == 0, b_avg)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 13,
|
"execution_count": 10,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"b1^2 + b2^2 + b3^2 - 2*b1*b4 - 2*b2*b4 - 2*b3*b4 + b4^2"
|
"b1^2 + b2^2 + b3^2 - 2*b1*b_avg - 2*b2*b_avg - 2*b3*b_avg + b_avg^2"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 13,
|
"execution_count": 10,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
|
|
@ -229,18 +253,29 @@
|
||||||
"quad"
|
"quad"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"So, we end up deriving the quadratic form $$\n",
|
||||||
|
" b_1^2 + b_2^2 + b_3^2 + b_{\\text{avg}}^2 - 2b_{\\text{avg}}(b_1 + b_2 + b_3) = 0\n",
|
||||||
|
".$$\n",
|
||||||
|
"\n",
|
||||||
|
"This means that, given three mutually tangent circles with curvatures $b_1,b_2,b_3$, there are two solutions for $b_{\\text{avg}}$, allowing us to derive two new sets of three mutually tangent circles with curvatures $b_1' = 2b_{\\text{avg}} - b_1$ etc."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 14,
|
"execution_count": 11,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"1/2*b1*h11 - 1/2*b4*h11 + 1/2*b2*h21 - 1/2*b4*h21 + 1/2*b3*h31 - 1/2*b4*h31 - 1/2*b1*h41 - 1/2*b2*h41 - 1/2*b3*h41 + 1/2*b4*h41"
|
"1/2*b1*h11 - 1/2*b_avg*h11 - 1/2*b1*h1_avg - 1/2*b2*h1_avg - 1/2*b3*h1_avg + 1/2*b_avg*h1_avg + 1/2*b2*h21 - 1/2*b_avg*h21 + 1/2*b3*h31 - 1/2*b_avg*h31"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 14,
|
"execution_count": 11,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
|
|
@ -249,9 +284,18 @@
|
||||||
"factor(simplify(D[2][1]))"
|
"factor(simplify(D[2][1]))"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Calculations to find the curvatures of the dual circles of the octahedral packing\n",
|
||||||
|
"\n",
|
||||||
|
"Here the basic idea was to work out the intersection points of the circles and let the computer algebraically find the radii of the circles. The end up coming out, rather anticlimactically, to $(0, 0, \\sqrt 2, \\sqrt 2, \\sqrt 2, \\sqrt 2, 2\\sqrt 2, 2\\sqrt 2)$. It's rather satisfying and a bit surprising that the dual of the root sextuple of the octahedral packing is the root of the cubic packing, since the dual polyhedron of the octahedron is the cube."
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 20,
|
"execution_count": 12,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
|
@ -275,34 +319,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 21,
|
"execution_count": 13,
|
||||||
"metadata": {},
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": [
|
|
||||||
"(1/2, 1/2, 1/2*sqrt(2))"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"execution_count": 21,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
|
||||||
"circle_from_points((0, 1), (1, 0), (1, 1))"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": 23,
|
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
|
"(1/2*sqrt(2), 1)\n",
|
||||||
"sqrt(2)\n",
|
"sqrt(2)\n",
|
||||||
|
"(1/4*sqrt(2), 0)\n",
|
||||||
"2*sqrt(2)\n"
|
"2*sqrt(2)\n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -329,6 +355,7 @@
|
||||||
"b2 = line([(sqrt(2), -3), (sqrt(2), 3)], rgbcolor=(1, 0, 0))\n",
|
"b2 = line([(sqrt(2), -3), (sqrt(2), 3)], rgbcolor=(1, 0, 0))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"x, y, r = circle_from_points((sqrt(2) / 3, 1 / 3), (0, 1), (sqrt(2), 1))\n",
|
"x, y, r = circle_from_points((sqrt(2) / 3, 1 / 3), (0, 1), (sqrt(2), 1))\n",
|
||||||
|
"print('({}, {})'.format(x, y))\n",
|
||||||
"print(1 / r)\n",
|
"print(1 / r)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"b3 = circle(( x, y), r, rgbcolor=(1, 0, 0))\n",
|
"b3 = circle(( x, y), r, rgbcolor=(1, 0, 0))\n",
|
||||||
|
|
@ -337,6 +364,7 @@
|
||||||
"b6 = circle((-x, -y), r, rgbcolor=(1, 0, 0))\n",
|
"b6 = circle((-x, -y), r, rgbcolor=(1, 0, 0))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"x, y, r = circle_from_points((sqrt(2) / 3, 1 / 3), (0, 0), (sqrt(2) / 3, -1 / 3))\n",
|
"x, y, r = circle_from_points((sqrt(2) / 3, 1 / 3), (0, 0), (sqrt(2) / 3, -1 / 3))\n",
|
||||||
|
"print('({}, {})'.format(x, y))\n",
|
||||||
"print(1 / r)\n",
|
"print(1 / r)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"b7 = circle(( x, y), r, rgbcolor=(1, 0, 0))\n",
|
"b7 = circle(( x, y), r, rgbcolor=(1, 0, 0))\n",
|
||||||
|
|
@ -344,6 +372,125 @@
|
||||||
"\n",
|
"\n",
|
||||||
"show(c1 + c2 + c3 + c4 + c5 + c6 + b1 + b2 + b3 + b4 + b5 + b6 + b7 + b8)"
|
"show(c1 + c2 + c3 + c4 + c5 + c6 + b1 + b2 + b3 + b4 + b5 + b6 + b7 + b8)"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Futile attempt to derive the quadratic form for the cubic packing\n",
|
||||||
|
"\n",
|
||||||
|
"We attempted to derive the quadratic form for the cubic packing based on the data collected above, but the results don't match the results from the Stange at all and are significantly uglier. There's probably a mistake in here somewhere, but I'm not sure where."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 14,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def abbc_coords(b, h1, h2):\n",
|
||||||
|
" return [(h1^2 + h2^2 - 1) / b, b, h1, h2]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 15,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"[ 1 -3 -3 -5/4 -1 -1 -5 3/4]\n",
|
||||||
|
"[ -3 1 -3 1/2 -1 -1 -1 -3/2]\n",
|
||||||
|
"[ -3 -3 1 -5/4 -5 -1 -1 3/4]\n",
|
||||||
|
"[-5/4 1/2 -5/4 1 3/4 -3/2 3/4 -1]\n",
|
||||||
|
"[ -1 -1 -5 3/4 1 -3 -3 -5/4]\n",
|
||||||
|
"[ -1 -1 -1 -3/2 -3 1 -3 1/2]\n",
|
||||||
|
"[ -5 -1 -1 3/4 -3 -3 1 -5/4]\n",
|
||||||
|
"[ 3/4 -3/2 3/4 -1 -5/4 1/2 -5/4 1]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 15,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"Wc = matrix([\n",
|
||||||
|
" abbc_coords(sqrt(2), -1, sqrt(2)),\n",
|
||||||
|
" abbc_coords(2*sqrt(2), 1, 0),\n",
|
||||||
|
" abbc_coords(sqrt(2), -1, -sqrt(2)),\n",
|
||||||
|
" [sqrt(2) / 4, 0, 1, 0],\n",
|
||||||
|
" abbc_coords(sqrt(2), 1, sqrt(2)),\n",
|
||||||
|
" abbc_coords(2*sqrt(2), -1, 0),\n",
|
||||||
|
" abbc_coords(sqrt(2), 1, -sqrt(2)),\n",
|
||||||
|
" [sqrt(2) / 4, 0, -1, 0]\n",
|
||||||
|
"\n",
|
||||||
|
"])\n",
|
||||||
|
"\n",
|
||||||
|
"Wc * P * Wc.transpose()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 16,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"W = matrix([\n",
|
||||||
|
" abbc_coords(sqrt(2), -1, sqrt(2)),\n",
|
||||||
|
" abbc_coords(2*sqrt(2), 1, 0),\n",
|
||||||
|
" abbc_coords(sqrt(2), -1, -sqrt(2)),\n",
|
||||||
|
" [sqrt(2) / 4, 0, 1, 0]\n",
|
||||||
|
"])"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 17,
|
||||||
|
"metadata": {
|
||||||
|
"scrolled": true
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"[ 1 -3 -3 -5/4]\n",
|
||||||
|
"[ -3 1 -3 1/2]\n",
|
||||||
|
"[ -3 -3 1 -5/4]\n",
|
||||||
|
"[-5/4 1/2 -5/4 1]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 17,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"m = W * P * W.transpose()\n",
|
||||||
|
"m"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 18,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"97*b1^2 - 304*b1*b2 + 328*b2^2 - 290*b1*b3 - 304*b2*b3 + 97*b3^2 + 32*b1*b_avg - 1088*b2*b_avg + 32*b3*b_avg + 1280*b_avg^2"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 18,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"D = W2.transpose() * m.inverse() * W2\n",
|
||||||
|
"968*factor(simplify(D[1][1]))"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue