Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

Hello,

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.

Is there a simple/standard way of drawing this kind of drawing?

To be more precise I'm using these 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.

Thank you,

Iulian

share|improve this question
    
I don't know; but you are talking about the envelope of a family of circles. en.wikipedia.org/wiki/Envelope_(mathematics) may be of some help. –  Charles Matthews Apr 7 '11 at 8:15
add comment

2 Answers 2

up vote 10 down vote accepted

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).

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.

share|improve this answer
add comment

You might look at the CGAL Manual, Section 24.3 "Offsetting a Polygon," 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.
Offset Polygons
To further supplement Bill's answer, Adobe Illustrator has an "offset-curve" option: Select the curve, select "Object | Path > Offset Path ...", enter the radius, and you get something like this:
           Offsets

share|improve this answer
    
I didn't know about the object > path > offset path function. Cool! I've been doing this kind of thing in more roundabout ways, using Object > Expand .... after making a thick path. I see that for a closed curve, it offsets in only one direction. –  Bill Thurston Apr 8 '11 at 2:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.