Formulas for equidistant curves - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-24T08:38:43Z http://mathoverflow.net/feeds/question/60902 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/60902/formulas-for-equidistant-curves Formulas for equidistant curves Iulian Serbanoiu 2011-04-07T07:58:23Z 2011-04-07T17:33:51Z <p>Hello,</p> <p>I'm trying to draw on the computer a curve that keeps always the same distance(given as parameter) from a given curve. I know the formula for the given curve. I tried moving perpendicular to the first derivative but in some cases when the curve is sharp there are a lot of points creating some problems. This problem happens when the moving the curve with a distance greater that the radius of the curve.</p> <p>Is there a simple/standard way of drawing this kind of drawing?</p> <p>To be more precise I'm using <a href="http://mathworld.wolfram.com/ParallelCurves.html" rel="nofollow">these</a> formulas when obtaining the above result. It works fine as long as the curve has no "sharp turns". This is the case that bothers me.</p> <p>Thank you,</p> <p>Iulian</p> http://mathoverflow.net/questions/60902/formulas-for-equidistant-curves/60910#60910 Answer by Bill Thurston for Formulas for equidistant curves Bill Thurston 2011-04-07T09:50:01Z 2011-04-07T13:32:37Z <p>If you just want a good easy picture, the simplest thing to do, as sugggested by Charles Matthews' comment, is to draw lots of equal radius circles centered about points on the curve. Your eye and brain will see the envelope. You could also draw lots of disks, or just use a computer drawing program such as Adobe Illustrator, make two copies of the curve (for instance on different layers) and give the lower copy a large stroke-width and a light color. (You can start from a PDF file that contains the mathematical curve, open it in Illustrator or a similar program, and edit as above).</p> <p>If you want a more mathematical description or construction, the equidistant curves for a smooth curve $\gamma$ depend on the cut locus for $\gamma$. The cut locus is the set of points where there is more than one closest point on $\gamma$, and it is closely related to the whole theory of Voronoi diagrams. You can compute a good approximation of it from a Voronoi diagram program or a convex hull program, if you lift the curve to the paraboloid $z = x^2 + y^2 \subset \mathbb R^3$. In the complement of the cut locus, there is a smooth map $(x, y) \to C(x, y)$ where $C(x,y)$ is the closest point on $\gamma$; it can be traced out implicitly, it's the inverse function to what you're already doing. For a generic smooth curve, the cut locus is a piecewise smooth tree, whose endpoints are centers of osculating circles where the curvature of $\gamma$ has a local maximum. (However, in general, the cut locus can be quite complicated and have infinitely many branches, even for a $C^\infty$ curve). The edges of the cut locus can be traced from these endpoints, using the implicit function theorem; the main difficulty is keeping track of enough information to get the correct combinatorics for the graph. It's equivalent to the problem of constructing the convex hull of a simple curve on the paraboloid above.</p> http://mathoverflow.net/questions/60902/formulas-for-equidistant-curves/60919#60919 Answer by Joseph O'Rourke for Formulas for equidistant curves Joseph O'Rourke 2011-04-07T11:15:11Z 2011-04-07T17:33:51Z <p>You might look at the <a href="http://www.cgal.org/" rel="nofollow">CGAL</a> Manual, <a href="http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Minkowski_sum_2/Chapter_main.html" rel="nofollow">Section 24.3 "Offsetting a Polygon</a>," which describes how to compute the offset curve for a simple polygon via convolutions. The left image below shows the basic idea (and also serves to illustrate Bill Thurston's point about drawing equal-radii circles), and the right image illustrates a challenging example. [Both images from the CGAL manual.] Offset curves are used in many practical contexts (e.g., numerically controlled (CNC) milling machines), and so have been studied intensively. Despite that study, there is no simple way known to compute the offset. <br /> <img src="http://cs.smith.edu/~orourke/MathOverflow/OffsetPolygons.jpg" alt="Offset Polygons"> <br /> To further supplement Bill's answer, Adobe <em>Illustrator</em> has an "offset-curve" option: Select the curve, select "Object | Path > Offset Path ...", enter the radius, and you get something like this: <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://cs.smith.edu/~orourke/MathOverflow/IllustratorOffset.jpg" alt="Offsets"></p>