{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "[Oregon Curriculum Network](http://www.4dsolutions.net/ocn)
\n", "[Discovering Math with Python](Introduction.ipynb)\n", "\n", "\n", "# Chapter 8: TRANSFORMATIONS\n", "\n", "We only need to talk about three types of transformation in this chapter: translation, rotation, and scaling.\n", "\n", "To translate a polyhedron is to slide it around in space without having it turn around an axis. Just adding the same translation vector to every vertex vector effectively slides it.\n", "\n", "Rotation is most easily defined about the origin, i.e. we center our polyhedron around the center of our coordinate system before applying our rotation algorithm. \n", "\n", "If the polyhedron was not at centered at the origin to begin with, we may translated it (slide it without rotation), do the rotation, and translate it back to where we found it.\n", "\n", "We'll be looking at two ways to rotate our polyhedron:\n", "\n", "* applying a rotation matrix to each vertex vector\n", "* applying a quaternion to each vertex vector, and then its inverse\n", "\n", "The second technique will be the topic of Chapter 11.\n", "\n", "Scaling means having the polyhedron grow or shrink. The same translation trick may be applied, as once a polyhedron is centered at the origin, we need only multiply each vertex vector by a scaler, thereby elongating or shortening all the vectors. See Chapter 6." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class Vector:\n", " pass" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Back to Chapter 7: [Polyhedrons](Polyhedrons.ipynb)
\n", "Continue to Chapter 9: [Symmetry Groups](Symmetry%20Groups.ipynb)
\n", "[Introduction / Table of Contents](Introduction.ipynb)" ] } ], "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.6.0" } }, "nbformat": 4, "nbformat_minor": 2 }