{ "cells": [ { "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "*******************************************************\n", "A Quick and Dirty Introduction to Differential Geometry\n", "*******************************************************\n", "\n", "(1) Review *Derivatives of Vector-Valued Functions* from :cite:`belkdg2011`\n", " as well as `differentiation of inverse functions`_.\n", "(#) Skim lectures 1 and 2 from :cite:`solomonsa2017`.\n", "(#) Read chapter 2 and the appendices in :cite:`crane2015discrete`.\n", "(#) Read the following:\n", "\n", " - Lecture 3 from :cite:`solomonsa2017`.\n", " - Lecture 2 student notes, materials, and supplements from\n", " :cite:`basjddg2013`.\n", " - Lecture 3 student notes from :cite:`basjddg2013`.\n", "\n", ".. _differentiation of inverse functions: https://en.wikipedia.org/wiki/Inverse_functions_and_differentiation\n", "\n", "http://graphics.stanford.edu/courses/cs468-13-spring/schedule.html\n", "http://groups.csail.mit.edu/gdpgroup/6838_spring_2017.html\n", "\n", "http://math.bard.edu/belk/math352f11/\n", "\n", "http://faculty.bard.edu/belk/math352f11/Outline%20-%20Parallel%20Transport.pdf" ] }, { "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Curvature of a Circle\n", "=====================\n", "\n", "Suppose the parameterization of a circle of radius :math:`r` with respect to arc\n", "length is given by\n", ":math:`\\gamma(s) = \\left( r \\cos sr^{-1}, r \\sin sr^{-1} \\right)`. The length\n", "of the path up to :math:`s` is defined as\n", "\n", ".. math::\n", "\n", " l(s) = \\int_0^s \\left\\Vert \\dot{\\gamma}(\\tau) \\right\\Vert_2 d\\tau.\n", "\n", "By the fundamental theorem of calculus :cite:`djoyce2014mcutvc`,\n", "\n", ".. math::\n", "\n", " \\frac{dl}{ds} = \\left\\Vert \\dot{\\gamma}(s) \\right\\Vert_2\n", " \\implies\n", " dl = \\sqrt{d\\gamma_1^2 + \\cdots + d\\gamma_n^2}.\n", "\n", "Denote the unit tangent vector (for arbitrary parameterization) as\n", "\n", ".. math::\n", "\n", " T(s) =\n", " \\frac{\\dot{\\gamma}(s)}{\\left\\Vert \\dot{\\gamma}(s) \\right\\Vert_2} =\n", " \\frac{d\\gamma}{ds} \\frac{ds}{dl} =\n", " \\frac{d\\gamma}{dl}.\n", "\n", "Observe that\n", "\n", ".. math::\n", "\n", " \\frac{d}{ds} \\left\\Vert \\dot{\\gamma}(s) \\right\\Vert_2\n", " &= \\frac{d}{ds} \\sqrt{\n", " \\left( \\frac{d\\gamma_1(s)}{ds} \\right)^2 + \\cdots +\n", " \\left( \\frac{d\\gamma_n(s)}{ds} \\right)^2\n", " }\\\\\n", " &= \\frac{1}{2}\n", " \\left\\Vert \\dot{\\gamma} \\right\\Vert_2^{-1}\n", " \\frac{d}{ds} \\left[\n", " \\left( \\frac{d\\gamma_1}{ds} \\right)^2 + \\cdots +\n", " \\left( \\frac{d\\gamma_n}{ds} \\right)^2\n", " \\right]\n", " & \\quad & \\text{chain rule}\\\\\n", " &= \\frac{1}{2}\n", " \\left\\Vert \\dot{\\gamma} \\right\\Vert_2^{-1}\n", " \\left[\n", " 2 \\dot{\\gamma}_1 \\ddot{\\gamma}_1 + \\cdots +\n", " 2 \\dot{\\gamma}_n \\ddot{\\gamma}_n\n", " \\right]\\\\\n", " &= \\left\\Vert \\dot{\\gamma} \\right\\Vert_2^{-1}\n", " \\left\\langle \\dot{\\gamma}, \\ddot{\\gamma} \\right\\rangle.\n", "\n", "The curvature :math:`\\kappa_\\gamma` at :math:`s` is the angular rate of change\n", "of :math:`T` per unit change in the distance along the path. That is,\n", "\n", ".. math::\n", "\n", " \\kappa_\\gamma = \\left\\Vert \\frac{dT}{dl} \\right\\Vert_2\n", "\n", "where the geodesic curvature vector\n", "\n", ".. math::\n", "\n", " \\kappa_\\gamma(s) = \\frac{dT}{dl}\n", " &= \\frac{ds}{dl} \\frac{dT}{ds}\\\\\n", " &= \\frac{1}{\\left\\Vert \\dot{\\gamma}(s) \\right\\Vert_2}\n", " \\frac{d}{ds}\n", " \\frac{\\dot{\\gamma}(s)}{\\left\\Vert \\dot{\\gamma}(s) \\right\\Vert_2}\\\\\n", " &= \\frac{1}{\\left\\Vert \\dot{\\gamma} \\right\\Vert_2}\n", " \\left(\n", " \\frac{\\ddot{\\gamma}}{\\left\\Vert \\dot{\\gamma} \\right\\Vert_2} -\n", " \\dot{\\gamma} \\frac{\n", " \\frac{d}{ds} \\left\\Vert \\dot{\\gamma} \\right\\Vert_2\n", " }{\n", " \\left\\Vert \\dot{\\gamma} \\right\\Vert_2^2\n", " }\n", " \\right)\n", " & \\quad & \\text{quotient rule}\\\\\n", " &= \\frac{1}{\\left\\Vert \\dot{\\gamma} \\right\\Vert_2^2}\n", " \\left(\n", " \\ddot{\\gamma} -\n", " \\dot{\\gamma} \\frac{\n", " \\left\\langle \\dot{\\gamma}, \\ddot{\\gamma} \\right\\rangle\n", " }{\n", " \\left\\Vert \\dot{\\gamma} \\right\\Vert_2^2\n", " }\n", " \\right).\n", "\n", "The curvature of a circle parameterized in terms of arc length is given by\n", "\n", ".. math::\n", "\n", " \\kappa_\\gamma\n", " &= \\left\\Vert \\frac{dT}{dl} \\right\\Vert_2\\\\\n", " &= \\left\\Vert \\ddot{\\gamma} \\right\\Vert_2\n", " & \\quad & \\left\\Vert \\dot{\\gamma} \\right\\Vert_2 = 1\n", " \\quad \\text{and} \\quad\n", " \\left\\langle \\dot{\\gamma}, \\ddot{\\gamma} \\right\\rangle = 0\\\\\n", " &= \\left\\Vert\n", " \\begin{bmatrix}\n", " -r^{-1} \\cos sr^{-1}\\\\\n", " -r^{-1} \\sin sr^{-1}\n", " \\end{bmatrix}\n", " \\right\\Vert_2\n", " & \\quad & \\dot{\\gamma}(s) =\n", " \\begin{bmatrix} -\\sin sr^{-1}\\\\ \\cos sr^{-1} \\end{bmatrix}\\\\\n", " &= \\frac{1}{r}." ] }, { "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Any Parameterization of Curvature\n", "=================================\n", "\n", "Let :math:`C` be a smooth curve defined by :math:`\\gamma(t)` where :math:`t` is\n", "any parameter. The geodesic curvature vector is given by\n", "\n", ".. math::\n", "\n", " \\kappa_\\gamma(t) =\n", " \\frac{dT(t)}{dt} =\n", " \\frac{dT}{dl(t)} \\frac{dl(t)}{dt} =\n", " \\frac{dT}{dl} \\left\\Vert \\dot{\\gamma} \\right\\Vert_2\n", " \\implies\n", " \\frac{dT}{dl} = \\frac{dT}{dt} \\left\\Vert \\dot{\\gamma} \\right\\Vert_2^{-1}.\n", "\n", "Thus, the curvature parameterized in terms of arc length is equivalent to\n", "\n", ".. math::\n", "\n", " \\kappa_\\gamma =\n", " \\left\\Vert \\frac{dT}{dl} \\right\\Vert_2 =\n", " \\frac{\n", " \\left\\Vert \\frac{dT}{dt} \\right\\Vert_2\n", " }{\n", " \\left\\Vert \\dot{\\gamma} \\right\\Vert_2\n", " } =\n", " \\frac{\n", " \\left\\Vert \\dot{T} \\right\\Vert_2\n", " }{\n", " \\left\\Vert \\dot{\\gamma} \\right\\Vert_2\n", " } =\n", " \\frac{\n", " \\left\\Vert \\dot{\\gamma} \\times \\ddot{\\gamma} \\right\\Vert_2\n", " }{\n", " \\left\\Vert \\dot{\\gamma} \\right\\Vert_2^3\n", " }.\n", "\n", "The last equivalence relation can be derived as follows :cite:`lavalm2203vfc`.\n", "Notice that\n", "\n", ".. math::\n", "\n", " T(t) = \\frac{\\dot{\\gamma}(t)}{\\left\\Vert \\dot{\\gamma}(t) \\right\\Vert_2}\n", " \\implies\n", " \\dot{\\gamma} = \\frac{dl}{dt} T\n", " \\qquad \\text{and} \\qquad\n", " \\ddot{\\gamma} =\n", " \\frac{d}{dt} \\left( \\frac{dl}{dt} T \\right) =\n", " \\frac{d^2 l}{dt^2} T + \\frac{dl}{dt} \\dot{T}.\n", "\n", "The magnitude of their cross product\n", "\n", ".. math::\n", "\n", " \\dot{\\gamma} \\times \\ddot{\\gamma}\n", " &= \\frac{dl}{dt} \\frac{d^2 l}{dt^2} (T \\times T) +\n", " \\left( \\frac{d l}{dt} \\right)^2 \\left( T \\times \\dot{T} \\right)\\\\\n", " &= \\left( \\frac{d l}{dt} \\right)^2 \\left( T \\times \\dot{T} \\right)\n", "\n", "is given by\n", "\n", ".. math::\n", "\n", " \\left\\Vert \\dot{\\gamma} \\times \\ddot{\\gamma} \\right\\Vert_2\n", " &= \\left( \\frac{d l}{dt} \\right)^2\n", " \\left\\Vert T \\times \\dot{T} \\right\\Vert_2\\\\\n", " &= \\left( \\frac{d l}{dt} \\right)^2\n", " \\left\\Vert T \\right\\Vert_2 \\left\\Vert \\dot{T} \\right\\Vert_2 \\sin \\theta\\\\\n", " &= \\left( \\frac{d l}{dt} \\right)^2\n", " \\left\\Vert \\dot{T} \\right\\Vert_2 \\sin \\theta\n", " & \\quad & \\left\\Vert T \\right\\Vert_2 = 1\\\\\n", " &= \\left\\Vert \\dot{\\gamma} \\right\\Vert_2^2\n", " \\left\\Vert \\dot{T} \\right\\Vert_2\n", " & \\quad & T \\perp \\dot{T}.\n", "\n", "Therefore,\n", "\n", ".. math::\n", "\n", " \\kappa_\\gamma =\n", " \\frac{\n", " \\left\\Vert \\dot{T} \\right\\Vert_2\n", " }{\n", " \\left\\Vert \\dot{\\gamma} \\right\\Vert_2\n", " } =\n", " \\frac{\n", " \\left\\Vert \\dot{\\gamma} \\times \\ddot{\\gamma} \\right\\Vert_2\n", " }{\n", " \\left\\Vert \\dot{\\gamma} \\right\\Vert_2^3\n", " }." ] }, { "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Parallel Transport Approach to Curve Framing\n", "http://www.math.union.edu/~jaureguj/principal_curvatures.pdf\n", "http://brickisland.net/DDGSpring2016/wp-content/uploads/2016/02/DDGNotes.pdf\n", "http://graphics.stanford.edu/courses/cs468-13-spring/schedule.html\n", "https://math.stackexchange.com/questions/856381/curve-of-constant-curvature-on-unit-sphere-is-planar-curve\n", "http://graphics.stanford.edu/courses/cs468-13-spring/assets/hw1.pdf\n", "http://faculty.bard.edu/belk/math352f11/Outline%20-%20Parallel%20Transport.pdf\n", "\n", "@article{grinspun2006discrete,\n", " title={Discrete differential geometry: an applied introduction},\n", " author={Grinspun, Eitan and Wardetzky, Max and Desbrun, Mathieu and and Schr{\\\"o}der, Peter},\n", " journal={ACM SIGGRAPH ASIA Course},\n", " volume={7},\n", " year={2008}\n", "}" ] }, { "cell_type": "raw", "metadata": { "raw_mimetype": "text/restructuredtext" }, "source": [ "Principal Curvatures and Directions\n", "===================================\n", "\n", "@misc{jauregui2011pc,\n", " title={Principal Curvatures},\n", " author={Jauregui, Jeff},\n", " howpublished={\\url{https://www.math.upenn.edu/~shiydong/Math501X-7-GaussBonnet.pdf}},\n", " note={Accessed on 2017-09-22}\n", "}\n", "\n", "@misc{djoyceddsatp,\n", " title={Directional Derivatives, Steepest Ascent, Tangent Planes},\n", " author={David E. Joyce},\n", " howpublished={\\url{https://mathcs.clarku.edu/~djoyce/ma131/directional.pdf}},\n", " note={Accessed on 2017-10-10}\n", "}\n", "\n", ".. math::\n", "\n", " h(x, y) =\n", " ax^2 + by^2 + cxy + dx + ey + f =\n", " \\begin{bmatrix} x & y & 1 \\end{bmatrix}\n", " \\begin{bmatrix}\n", " a & c / 2 & d / 2\\\\\n", " c / 2 & b & e / 2\\\\\n", " d / 2 & e / 2 & f\n", " \\end{bmatrix}\n", " \\begin{bmatrix} x\\\\ y\\\\ 1 \\end{bmatrix} =\n", " \\frac{1}{2} \\mathbf{x}^\\top Q \\mathbf{x}\n", "\n", ".. math::\n", "\n", " \\nabla h(x, y) =\n", " \\frac{1}{2} (Q + Q^\\top) \\mathbf{x} =\n", " Q \\mathbf{x} =\n", " \\begin{bmatrix}\n", " 2ax + cy + d\\\\\n", " cx + 2by + e\\\\\n", " dx + ey + 2f\n", " \\end{bmatrix} =\n", " \\begin{bmatrix} h_x\\\\ h_y \\end{bmatrix} =\n", " \\begin{bmatrix} 2ax + cy + d\\\\ 2by + cx + e \\end{bmatrix}.\n", "\n", ".. math::\n", "\n", " J =\n", " \\begin{bmatrix}\n", " 1 & 0\\\\\n", " 0 & 1\\\\\n", " h_x & h_y\n", " \\end{bmatrix}\n", "\n", "Suppose a quadratic polynomial :math:`h(x, y) = ax^2 + by^2 + cxy + dx + ey + f`\n", "describes the height of the surface relative to the plane of the center\n", "triangle. The gradient of this scalar field is\n", "\n", ".. math::\n", "\n", " \\nabla h =\n", " \\begin{bmatrix} h_x\\\\ h_y \\end{bmatrix} =\n", " \\begin{bmatrix} 2ax + cy + d\\\\ 2by + cx + e \\end{bmatrix}.\n", "\n", "The directional derivative in the direction :math:`\\mathbf{v}` is defined as\n", ":cite:`djoyceddsatp`\n", "\n", ".. math::\n", "\n", " D_{\\mathbf{v}} h(x, y) = \\nabla h(x, y) \\cdot \\mathbf{v}.\n", "\n", "Define a plane curve as\n", "\n", ".. math::\n", "\n", " c(t) = \\begin{pmatrix} h_x t\\\\ h_y t\\\\ h(h_x t, h_y t) \\end{pmatrix}\n", "\n", "The surface points are parameterized as\n", "\n", ".. math::\n", "\n", " p(x, y) = (x, y, h(x, y))\n", " \\quad \\text{where} \\quad\n", " x, y \\in \\mathbb{R}.\n", "\n", "The first derivatives\n", "\n", ".. math::\n", "\n", " \\begin{aligned}\n", " p_x &= \\frac{\\partial p}{\\partial x}\n", " &= (1, 0, h_x)\\\\\n", " &= (1, 0, 2ax + cy + d)\n", " \\end{aligned}\n", " \\quad \\text{and} \\quad\n", " \\begin{aligned}\n", " p_y &= \\frac{\\partial p}{\\partial y}\n", " &= (0, 1, h_y)\\\\\n", " &= (0, 1, 2by + cx + e)\n", " \\end{aligned}\n", "\n", "are vectors that span the tangent plane to the surface at the barycenter of the\n", "center triangle. The surface normal :math:`n` at point :math:`p` is defined as\n", "the unit vector perpendicular to the tangent plane at point :math:`p`:\n", "\n", ".. math::\n", "\n", " N(p) =\n", " \\frac{p_x \\times p_y}{\\left\\Vert p_x \\times p_y \\right\\Vert} =\n", " \\frac{1}{\\sqrt{h_x^2 + h_y^2 + 1}}\n", " \\begin{bmatrix} -h_x\\\\ -h_y\\\\ 1 \\end{bmatrix}.\n", "\n", "where\n", "\n", ".. math::\n", "\n", " \\nabla h =\n", " \\begin{bmatrix} h_x\\\\ h_y \\end{bmatrix}.\n", "\n", "\n", " c'(t) =\n", " \\begin{pmatrix}\n", " h_x\\\\\n", " h_y\\\\\n", " 2 a h_x^2 t + 2 b h_y^2 t + 2 c h_x h_y t + d h_x + e h_y + f\n", " \\end{pmatrix}\n", "\n", " c''(t) =\n", " \\begin{pmatrix}\n", " 0\\\\\n", " 0\\\\\n", " 2 a h_x^2 + 2 b h_y^2 + 2 c h_x h_y\n", " \\end{pmatrix}\n", "\n", "The signed curvature :math:`\\kappa(p)` at :math:`p` with respect to the unit\n", "normal is\n", "\n", ".. math::\n", "\n", " \\kappa(p)\n", "\n", "and\n", "\n", ".. math::\n", "\n", " \\nabla^2 h =\n", " \\begin{bmatrix} h_{xx} & h_{xy}\\\\ h_{xy} & h_{yy} \\end{bmatrix} =\n", " \\begin{bmatrix} 2a & c\\\\ c & 2b \\end{bmatrix}.\n", "\n", "The curvature of a function is defined as\n", "\n", ".. math::\n", "\n", " \\det \\nabla^2 h = h_{xx} h_{yy} - h_{xy}^2\n", "\n", "http://www.math.union.edu/~jaureguj/principal_curvatures.pdf\n", "http://www.ahinson.com/algorithms_general/Sections/Mathematics/Eigensolution2x2.pdf\n", "http://www.cse.usf.edu/~r1k/MachineVisionBook/MachineVision.files/MachineVision_Chapter13.pdf" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "celltoolbar": "Raw Cell Format", "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.5.2" } }, "nbformat": 4, "nbformat_minor": 0 }