Skip to content

Commit

Permalink
updated matrix tutorial notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenovic committed Feb 4, 2021
1 parent 2595f28 commit b36a713
Showing 1 changed file with 36 additions and 35 deletions.
71 changes: 36 additions & 35 deletions docs/tutorials/MatrixRepresentationsOfGeometricFunctions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "recovered-conflict",
"id": "desperate-hypothesis",
"metadata": {},
"source": [
"# Matrix Representations of Geometric Functions\n",
Expand All @@ -23,11 +23,12 @@
{
"cell_type": "code",
"execution_count": null,
"id": "offshore-indianapolis",
"id": "living-backing",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np \n",
"\n",
"def func2Mat(f,I):\n",
" '''\n",
" Convert a function acting on a vector into a matrix, given \n",
Expand All @@ -41,7 +42,7 @@
},
{
"cell_type": "markdown",
"id": "activated-reasoning",
"id": "dirty-registration",
"metadata": {},
"source": [
"Start with initializing a plane old euclidean N-dimensional algebra and assign our pseudoscalar to $I$, pretty standard. "
Expand All @@ -50,20 +51,20 @@
{
"cell_type": "code",
"execution_count": null,
"id": "sapphire-driving",
"id": "chemical-boring",
"metadata": {},
"outputs": [],
"source": [
"from pylab import * \n",
"from clifford import Cl\n",
"from math import * \n",
"\n",
"l,b = Cl(3) # returns (layout,blades). you can change dimesion here\n",
"I = l.pseudoScalar "
]
},
{
"cell_type": "markdown",
"id": "unauthorized-expansion",
"id": "dated-lover",
"metadata": {},
"source": [
"## Anti-symmetric Matrix,\n",
Expand All @@ -75,7 +76,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "opening-rebecca",
"id": "objective-rachel",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -86,7 +87,7 @@
},
{
"cell_type": "markdown",
"id": "serial-moisture",
"id": "tutorial-maryland",
"metadata": {},
"source": [
"Whats the B? you can read its values straight off the matrix. "
Expand All @@ -95,7 +96,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "contemporary-olive",
"id": "overhead-debut",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -104,7 +105,7 @@
},
{
"cell_type": "markdown",
"id": "potential-cemetery",
"id": "viral-madrid",
"metadata": {},
"source": [
"## Diagonal Matrix ( Directional Scaling)\n",
Expand All @@ -117,7 +118,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "powered-fluid",
"id": "intended-norwegian",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -132,7 +133,7 @@
},
{
"cell_type": "markdown",
"id": "based-invention",
"id": "egyptian-society",
"metadata": {},
"source": [
"## Rotation\n",
Expand All @@ -145,7 +146,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "manufactured-anthony",
"id": "expired-roberts",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -157,7 +158,7 @@
},
{
"cell_type": "markdown",
"id": "potential-armor",
"id": "checked-circulation",
"metadata": {},
"source": [
"The inverse of this, is easy , $ x\\rightarrow \\tilde{R}xR$"
Expand All @@ -166,7 +167,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "innovative-discovery",
"id": "annoying-offset",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -176,7 +177,7 @@
},
{
"cell_type": "markdown",
"id": "varied-teaching",
"id": "friendly-shame",
"metadata": {},
"source": [
"## Reflection \n",
Expand All @@ -187,7 +188,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "attempted-tactics",
"id": "breeding-release",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -198,7 +199,7 @@
},
{
"cell_type": "markdown",
"id": "hourly-peripheral",
"id": "peaceful-deadline",
"metadata": {},
"source": [
"Notice the determinant for reflection is -1, and for rotation is +1. "
Expand All @@ -207,7 +208,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "therapeutic-session",
"id": "banned-harmony",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -217,7 +218,7 @@
},
{
"cell_type": "markdown",
"id": "noted-stevens",
"id": "burning-receptor",
"metadata": {},
"source": [
"## Symmetric \n",
Expand All @@ -236,7 +237,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "polished-channels",
"id": "competent-grenada",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -247,7 +248,7 @@
},
{
"cell_type": "markdown",
"id": "sixth-apartment",
"id": "theoretical-africa",
"metadata": {},
"source": [
"## Eigen stuffs\n",
Expand All @@ -256,15 +257,15 @@
},
{
"cell_type": "markdown",
"id": "legitimate-commodity",
"id": "victorian-philippines",
"metadata": {},
"source": [
"### Rotation"
]
},
{
"cell_type": "markdown",
"id": "sufficient-glasgow",
"id": "baking-laser",
"metadata": {},
"source": [
"The eigen blades of a rotation are really the axis and plane of rotation. "
Expand All @@ -273,7 +274,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "coral-jewelry",
"id": "flexible-fellowship",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -285,7 +286,7 @@
},
{
"cell_type": "markdown",
"id": "hispanic-consent",
"id": "bizarre-empire",
"metadata": {},
"source": [
"If you checkout the real column, and compare this to the bivector which generated this rotation (aka the generator), after its been normalized "
Expand All @@ -294,7 +295,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "given-macro",
"id": "employed-multiple",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -304,7 +305,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "loved-desktop",
"id": "honest-samuel",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -314,7 +315,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "stunning-lesbian",
"id": "returning-lyric",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -324,7 +325,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "coordinate-ticket",
"id": "strong-property",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -334,7 +335,7 @@
},
{
"cell_type": "markdown",
"id": "annoying-afghanistan",
"id": "complete-workshop",
"metadata": {},
"source": [
"### Symmetric\n",
Expand All @@ -344,7 +345,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "julian-custom",
"id": "fossil-habitat",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -354,7 +355,7 @@
},
{
"cell_type": "markdown",
"id": "informal-cinema",
"id": "suitable-reflection",
"metadata": {},
"source": [
"This is easily found by using the rotation part of the symmetric operator, "
Expand All @@ -363,7 +364,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "efficient-hamilton",
"id": "close-spell",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -373,7 +374,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "level-trustee",
"id": "pretty-liberal",
"metadata": {},
"outputs": [],
"source": []
Expand Down

0 comments on commit b36a713

Please sign in to comment.