{ "cells": [ { "cell_type": "markdown", "id": "6b84cd39", "metadata": {}, "source": [ "# Gaussian and Mean Curvature of a Graph Surface\n", "\n", "Let a surface in Euclidean three-space be the graph\n", "\n", "$$\n", "X(x,y)=(x,y,f(x,y)).\n", "$$\n", "\n", "This notebook derives both fundamental forms and then computes the\n", "Gaussian curvature $K$ and mean curvature $H$. Egison keeps the\n", "derivatives of the arbitrary function $f$ symbolic.\n" ] }, { "cell_type": "markdown", "id": "20fedc81", "metadata": {}, "source": [ "## Tangent plane\n", "\n", "The coordinate tangent vectors are\n", "\n", "$$\n", "X_x=(1,0,f_x),\\qquad X_y=(0,1,f_y).\n", "$$\n", "\n", "Their cross product is $(-f_x,-f_y,1)$, so its norm is\n", "$W=\\sqrt{1+f_x^2+f_y^2}$.\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "646ca5b2", "metadata": {}, "outputs": [], "source": [ "declare symbol x, y: MathValue\n", "\n", "def f : MathValue := function (x, y)\n", "def X : Vector MathValue := [| x, y, f x y |]\n", "\n", "def vx : Vector MathValue := [| 1, 0, ∂/∂ (f x y) x |]\n", "def vy : Vector MathValue := [| 0, 1, ∂/∂ (f x y) y |]\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "05ae2f83", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 1 \\\\ 0 \\\\ \\frac{\\partial f}{\\partial 1}\\\\ \\end{pmatrix}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "vx\n" ] }, { "cell_type": "code", "execution_count": 3, "id": "0b25d70b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 0 \\\\ 1 \\\\ \\frac{\\partial f}{\\partial 2}\\\\ \\end{pmatrix}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "vy\n" ] }, { "cell_type": "markdown", "id": "3a274d02", "metadata": {}, "source": [ "## Oriented unit normal\n", "\n", "We choose the upward-pointing normal\n", "\n", "$$\n", "n=\\frac{X_x\\times X_y}{\\lVert X_x\\times X_y\\rVert}.\n", "$$\n", "\n", "Reversing this orientation changes the sign of $H$ but not of $K$.\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "e6d2b7e5", "metadata": {}, "outputs": [], "source": [ "def normalNumerator : Vector MathValue := crossProduct vx vy\n", "def W : MathValue := sqrt (V.* normalNumerator normalNumerator)\n", "def normal : Vector MathValue := normalNumerator / W\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "cfbc0b09", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} -\\frac{\\partial f}{\\partial 1} \\\\ -\\frac{\\partial f}{\\partial 2} \\\\ 1\\\\ \\end{pmatrix}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "normalNumerator\n" ] }, { "cell_type": "code", "execution_count": 6, "id": "ab6a31ad", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} -\\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial f}{\\partial 1} \\\\ -\\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial f}{\\partial 2} \\\\ \\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1}\\\\ \\end{pmatrix}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "normal\n" ] }, { "cell_type": "markdown", "id": "e9ad7a25", "metadata": {}, "source": [ "## First and second fundamental forms\n", "\n", "With\n", "\n", "$$\n", "I=E\\,dx^2+2F\\,dx\\,dy+G\\,dy^2,\n", "\\qquad\n", "II=L\\,dx^2+2M\\,dx\\,dy+N\\,dy^2,\n", "$$\n", "\n", "the coefficients are dot products of tangent vectors and derivatives of\n", "tangent vectors with the chosen normal.\n" ] }, { "cell_type": "code", "execution_count": 7, "id": "b7d717ed", "metadata": {}, "outputs": [], "source": [ "def E : MathValue := V.* vx vx\n", "def F : MathValue := V.* vx vy\n", "def G : MathValue := V.* vy vy\n", "\n", "def L : MathValue := V.* (∂/∂ vx x) normal\n", "def M : MathValue := V.* (∂/∂ vx y) normal\n", "def N : MathValue := V.* (∂/∂ vy y) normal\n" ] }, { "cell_type": "code", "execution_count": 8, "id": "c0c97a16", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$(\\frac{\\partial f}{\\partial 1}^{2} + 1, \\frac{\\partial f}{\\partial 1} \\frac{\\partial f}{\\partial 2}, \\frac{\\partial f}{\\partial 2}^{2} + 1)$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "(E, F, G)\n" ] }, { "cell_type": "code", "execution_count": 9, "id": "08c7dbf4", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$(\\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial^2 f}{\\partial 1^2}, \\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial^2 f}{\\partial 1 \\partial 2}, \\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial^2 f}{\\partial 2^2})$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "(L, M, N)\n" ] }, { "cell_type": "markdown", "id": "81e8100a", "metadata": {}, "source": [ "## Curvature\n", "\n", "The determinant and trace of the shape operator give\n", "\n", "$$\n", "K=\\frac{LN-M^2}{EG-F^2},\\qquad\n", "H=\\frac{EN-2FM+GL}{2(EG-F^2)}.\n", "$$\n", "\n", "These formulas apply wherever the graph chart is regular. For a graph,\n", "$EG-F^2=1+f_x^2+f_y^2$ is always positive.\n" ] }, { "cell_type": "code", "execution_count": 10, "id": "5ac914cc", "metadata": {}, "outputs": [], "source": [ "def K : MathValue := (L * N - M^2) / (E * G - F^2)\n", "def H : MathValue := (E * N - 2 * F * M + G * L) / (2 * (E * G - F^2))\n" ] }, { "cell_type": "code", "execution_count": 11, "id": "c0fe438c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\frac{-\\frac{\\partial^2 f}{\\partial 1 \\partial 2}^{2} + \\frac{\\partial^2 f}{\\partial 1^2} \\frac{\\partial^2 f}{\\partial 2^2}}{\\frac{\\partial f}{\\partial 2}^{4} + \\frac{\\partial f}{\\partial 1}^{4} + 2 \\frac{\\partial f}{\\partial 1}^{2} \\frac{\\partial f}{\\partial 2}^{2} + 2 \\frac{\\partial f}{\\partial 2}^{2} + 2 \\frac{\\partial f}{\\partial 1}^{2} + 1}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "K\n" ] }, { "cell_type": "code", "execution_count": 12, "id": "d7f9d8da", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\frac{\\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial^2 f}{\\partial 1^2} \\frac{\\partial f}{\\partial 2}^{2} + \\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial f}{\\partial 1}^{2} \\frac{\\partial^2 f}{\\partial 2^2} - 2 \\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial f}{\\partial 1} \\frac{\\partial^2 f}{\\partial 1 \\partial 2} \\frac{\\partial f}{\\partial 2} + \\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial^2 f}{\\partial 2^2} + \\sqrt{\\frac{\\partial f}{\\partial 2}^{2} + \\frac{\\partial f}{\\partial 1}^{2} + 1}^{-1} \\frac{\\partial^2 f}{\\partial 1^2}}{2 \\frac{\\partial f}{\\partial 2}^{2} + 2 \\frac{\\partial f}{\\partial 1}^{2} + 2}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "H\n" ] }, { "cell_type": "markdown", "id": "488fe260", "metadata": {}, "source": [ "## Interpretation\n", "\n", "$K$ is intrinsic: it can be recovered entirely from distances measured on\n", "the surface. Positive, zero, and negative values correspond locally to\n", "elliptic, parabolic, and hyperbolic behavior. $H$ is extrinsic and depends\n", "on the embedding and orientation; the equation $H=0$ is the minimal-surface\n", "equation for a graph.\n" ] } ], "metadata": { "kernelspec": { "display_name": "Egison", "language": "egison", "name": "egison" }, "language_info": { "codemirror_mode": "egison", "file_extension": ".egi", "mimetype": "text/x-egison", "name": "egison" } }, "nbformat": 4, "nbformat_minor": 5 }