Skip to content

Commit

Permalink
doc fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenovic committed Oct 3, 2016
1 parent 60bfbb0 commit 296515f
Showing 1 changed file with 57 additions and 33 deletions.
90 changes: 57 additions & 33 deletions docs/ConformalGeometricAlgebra.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"Conformal Geometric Algebra (CGA) is a projective geometry tool which allows conformal transformations to be implemented with rotations. To do this, the original geometric algebra is extended by two dimensions, one of positive signature $e_+$ and one of negative signature $e_-$. It is convenient to define a *null* basis given by \n",
"\n",
"$$\n",
"e_o = \\frac{1}{2}(e_- -e_+)\\\\\n",
"e_\\infty = e_-+e_+\n",
"e_o = \\frac{1}{2}(e_{-} -e_{+})\\\\\n",
"e_{\\infty} = e_{-}+e_{+}\n",
"$$\n",
"\n",
"A vector in the original space $x$ is *up-projected* into a conformal vector $X$ by \n",
Expand All @@ -48,15 +48,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## using `conformalize()`\n",
"## Using `conformalize()`\n",
"The purpose of `conformalize` is to remove the redunancy assocaited with creating a conformal geometric algebras. `conformalize` takes an existing geometric algebra layout and *conformalizes* it by adding two dimensions, as described above. Additionally, this function returns a new layout for the CGA, a dict of blades for the CGA, and dictionary containing the added basis vectors and up/down projection functions. \n",
"\n",
"To demonstrate we will conformalize $G_2$, producing a CGA of $G_{3,1}$."
]
},
{
"cell_type": "code",
"execution_count": 54,
"execution_count": 2,
"metadata": {
"collapsed": false
},
Expand All @@ -67,7 +67,7 @@
"{'e1': (1.0^e1), 'e12': (1.0^e12), 'e2': (1.0^e2)}"
]
},
"execution_count": 54,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -89,7 +89,7 @@
},
{
"cell_type": "code",
"execution_count": 55,
"execution_count": 3,
"metadata": {
"collapsed": false
},
Expand All @@ -114,7 +114,7 @@
" 'e4': (1.0^e4)}"
]
},
"execution_count": 55,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -135,7 +135,7 @@
},
{
"cell_type": "code",
"execution_count": 56,
"execution_count": 4,
"metadata": {
"collapsed": false
},
Expand All @@ -153,7 +153,7 @@
" 'up': <function clifford.<lambda>>}"
]
},
"execution_count": 56,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -167,6 +167,7 @@
"metadata": {},
"source": [
"It contains the following:\n",
"\n",
"* `ep` - postive basis vector added\n",
"* `en` - negative basis vector added\n",
"* `eo` - zero vecror of null basis (=.5*(en-ep))\n",
Expand All @@ -177,12 +178,12 @@
"* `homo()` - function ot homogenize a CGA vector\n",
"\n",
"\n",
"we can put the blades and the stuff into the local namespace, "
"We can put the `blades` and the `stuff` into the local namespace, "
]
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": 5,
"metadata": {
"collapsed": false
},
Expand All @@ -196,30 +197,53 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As a sanity check, make sure down/up are consistent"
"Now we can use the `up()` and `down()` functions to go in and out of CGA"
]
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": 23,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"True"
"(1.0^e1) + (1.0^e2) + (0.5^e3) + (1.5^e4)"
]
},
"execution_count": 58,
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"down(up(e1+e2)) == e1+e2"
"x = e1+e2\n",
"X = up(x)\n",
"X"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(1.0^e1) + (1.0^e2)"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"down(X)"
]
},
{
Expand All @@ -245,7 +269,7 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": 8,
"metadata": {
"collapsed": false
},
Expand All @@ -259,7 +283,7 @@
"<IPython.core.display.Image object>"
]
},
"execution_count": 59,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -285,7 +309,7 @@
},
{
"cell_type": "code",
"execution_count": 60,
"execution_count": 9,
"metadata": {
"collapsed": true
},
Expand All @@ -306,14 +330,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"$ e_+ X e_+$\n",
"$ e_{+} X e_{+} $\n",
"\n",
"Inversion is a reflection in hyperplane normal to $e_-$, this swaps $e_o$ and $e_{\\infty}$"
]
},
{
"cell_type": "code",
"execution_count": 61,
"execution_count": 10,
"metadata": {
"collapsed": false
},
Expand All @@ -338,7 +362,7 @@
},
{
"cell_type": "code",
"execution_count": 62,
"execution_count": 11,
"metadata": {
"collapsed": false
},
Expand All @@ -351,21 +375,21 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Dialations"
"#### Dilations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$D_\\alpha = e^{-\\frac{\\ln{\\alpha}}{2} \\,E_0} $\n",
"$D_{\\alpha} = e^{-\\frac{\\ln{\\alpha}}{2} \\,E_0} $\n",
"\n",
"$D_\\alpha \\, X \\, \\tilde{D_\\alpha} $"
"$D_{\\alpha} \\, X \\, \\tilde{D_{\\alpha}} $"
]
},
{
"cell_type": "code",
"execution_count": 63,
"execution_count": 12,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -399,7 +423,7 @@
},
{
"cell_type": "code",
"execution_count": 64,
"execution_count": 13,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -436,7 +460,7 @@
},
{
"cell_type": "code",
"execution_count": 65,
"execution_count": 14,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -481,7 +505,7 @@
},
{
"cell_type": "code",
"execution_count": 66,
"execution_count": 15,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -510,7 +534,7 @@
},
{
"cell_type": "code",
"execution_count": 67,
"execution_count": 16,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -551,7 +575,7 @@
},
{
"cell_type": "code",
"execution_count": 68,
"execution_count": 17,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -587,7 +611,7 @@
},
{
"cell_type": "code",
"execution_count": 69,
"execution_count": 18,
"metadata": {
"collapsed": false
},
Expand Down

0 comments on commit 296515f

Please sign in to comment.