{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 6.838, Shape Analysis: Homework 1\n", "\n", "As an experiment, we will be doing our homework in Jupyter notebooks. These support $\\LaTeX$ and Python, allowing us to share mathematical formulas and code easily. Please get started early to make sure that you are comfortable with this new tool.\n", "\n", "The course staff will be extremely generous helping students figure out these problems if needed.\n", "\n", "All homeworks will be graded out of 100 points." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Problem 1: Variational calculus (30 points)
\n", "Note: This problem may be tricky to think about for computer science students who are not used to these sorts of calculations. Leave yourself plenty of time, and get help from the instructional staff!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "a (10 points). Suppose $f:\\mathbb{R}^n\\rightarrow \\mathbb{R}$ is a smooth function with a local minimum at $x^\\ast\\in\\mathbb{R}^n$. Now, take an arbitrary vector $y\\in\\mathbb{R}^n$. Justify the relationship $$\\frac{d}{dh}f(x^\\ast+hy)|_{h=0}=0.$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Answer: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "b (10 points). Suppose you are given a regular plane curve $\\gamma:[0,1]\\rightarrow\\mathbb{R}^2$, and take $V:[0,1]\\rightarrow\\mathbb{R}^2$ to be a smooth vector field along $\\gamma$. Recall that the arc length of $\\gamma$ is given by $$s[\\gamma]=\\int_0^1\\|\\gamma'(t)\\|\\,dt.$$ Explain how the derivative $\\frac{d}{dh}s[\\gamma+hV]|_{h=0}$ can be thought of as a directional derivative of arc length in the \"$V$ direction.\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Answer: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "c (10 points). Suppose $V(0)=V(1)=0$ . Define a function $W(s)$ so that $$\\frac{d}{dh}s[\\gamma+hV]|_{h=0}=\\int_0^{s(1)} V(s^{-1}(\\bar s))\\cdot W(\\bar s)\\,d\\bar s,$$ where $s(t)=\\int_0^t \\|\\gamma'(t)\\|\\,dt$ on the right-hand side is the arc length function and $W:s\\mapsto\\mathbb{R}^2$ can be written in terms of the curvature and Frenet frame of $\\gamma$.

Note: Your formula for $W(t)$ should not include any term involving $V(t)$.

Hint: Start by simplifying the left-hand side of the expression above. Use integration by parts after you differentiate." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Answer:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Problem 2 (40 points): Discrete curvature of a plane curve\n", "\n", "a (5 points). Suppose we have a discrete curve given by a series of points $x_1,x_2,\\ldots,x_n\\in\\mathbb{R}^2$. You can think of the vertex positions as parameterized by a vector $x\\in\\mathbb{R}^{2n}$. Define an arc length functional $s(x):\\mathbb{R}^{2n}\\rightarrow\\mathbb{R}_+$.

Note: You can write your answer as a function $s(x_1,x_2,\\ldots,x_n).$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Answer: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "b (10 points). Suppose \$1Answer: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "c (15 points). Modify the following code to plot the derivative from part (b) on the sampled curve:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "