{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "![satacad](./images/satacadlogo.gif)\n", "TOC: [1](./mm1.ipynb) [3](./mm3.ipynb) [4](./mm4.ipynb) [5](./mm5.ipynb) [6](./mm6.ipynb)\n", "\n", "# MARTIAN MATH IS SCIENCE FICTION\n", "\n", "[MM @ Reed](http://www.4dsolutions.net/satacad/martianmath/toc.html) (Earlier Edition)\n", "\n", "Martian Math is an introduction to some mathematics against the backdrop of science fiction stories.\n", "\n", "### STORYBOARD: ETs COME TO EARTH, BRINGING WITH THEM AN ALIEN MATHEMATICS\n", "\n", "These ETs (lets call them Martians) seem much more interested in 60 degree angles than we are. When they multiply two numbers, they consider the area to be a triangle. \n", "\n", "Here is 6 x 2 = 12:\n", "\n", "\"5\n", "\n", "Here is what it looks like when they multiply three numbers together, 2 x 2 x 5 = 20.\n", "\n", "\"Martian\n", "\n", "Their volumes seem simpler than ours in a lot of ways.\n", "\n", "![animation](./images/smhierarchyanim.gif)\n", "\n", "![cubeanim](./images/cubeanim.gif)\n", "\n", "![volumes](./images/vols.gif)\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "| SHAPE | VOLUME |\n", "--------------------------------------------\n", "| tetrahedron | 1 |\n", "| cube | 3 |\n", "| octahedron | 4 |\n", "| rhombic dodecahedron | 6 |\n" ] } ], "source": [ "# build a Python dictionary from this information, then loop over the items, printing a table\n", "volumes = dict(((\"tetrahedron\", 1), (\"cube\", 3), (\"octahedron\", 4), (\"rhombic dodecahedron\", 6)))\n", "template = \"| {s:30} | {v:6} |\"\n", "print(template.format(s = \"SHAPE\", v = \"VOLUME\"))\n", "print(\"-\" * 44)\n", "for shape, volume in volumes.items():\n", " print(template.format(s=shape, v=volume))" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true, "jupyter": { "outputs_hidden": true } }, "outputs": [], "source": [ "import tetravolume as tv\n", "import qrays as qv" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.0\n", "0.9428090415820635\n" ] } ], "source": [ "unit_volume = tv.Tetrahedron(1,1,1,1,1,1)\n", "print(unit_volume.ivm_volume())\n", "print(unit_volume.xyz_volume())" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.0\n", "0.9428090415820635\n" ] } ], "source": [ "a = qv.Qvector((1,0,0,0))\n", "b = qv.Qvector((0,1,0,0))\n", "c = qv.Qvector((0,0,1,0))\n", "d = qv.Qvector((0,0,0,1))\n", "tet = tv.Tetrahedron((a-b).length(), (a-c).length(), (a-d).length(), \n", " (b-c).length(), (c-d).length(), (d-b).length())\n", "print(tet.ivm_volume())\n", "print(tet.xyz_volume())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Resources\n", "\n", "* [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)\n", "* [More about Quadrays](https://github.com/4dsolutions/Python5/blob/master/QuadraysJN.ipynb)\n", "* [Sepp Hasslberger Blog](http://blog.hasslberger.com/2010/10/tetrahedral_coordinates_mathem-print.html)\n", "* [Quadrays on Wikipedia](https://en.wikipedia.org/wiki/Quadray_coordinates)\n", "* [Tensegrity](http://kennethsnelson.net/)\n", "* [The Gloves We'll Wear](https://medium.com/s/futurehuman/the-gloves-well-wear-on-mars-b5cb0f637e44)\n", "* [Four Basis Vectors?](https://youtu.be/hs8rorJT7Ys)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }