Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A way to draw equidistant curve

I posted this question on mathoverflow but I want to know your opinion regarding this also. What I want to do is to draw a curve that is always at a certain distance from the normal to the surface of a given curve. I know the formula of the given curve (a piecewise cubic spline). The problem appears to be when the deviation distance is more than the radius of the curve - the points get scrambled. Has anyone encountered such problem. Is there a nice solution?

Thanks for any ideas,

Iulian

LATER: The problem is perfectly described below by Mr. Wizard.

like image 758
INS Avatar asked Apr 07 '11 08:04

INS


People also ask

What is equidistant curve?

In hyperbolic geometry, a hypercyclehypercyclehypercycle (plural hypercycles) (hyperbolic geometry) A curve whose points have the same orthogonal distance from a given straight line. (chemistry) A system of self-replicating molecules, as an explanation for the self-organization of prebiotic systems.https://en.wiktionary.org › wiki › hypercyclehypercycle - Wiktionary, hypercircle or equidistant curve is a curve whose points have the same orthogonal distance from a given straight line (its axis).

What is a equidistant in geometry?

Two objects are equidistant from a point if the distance between each object and that point are the same.

What does equidistant of a circle mean?

In a very strict, technical sense, equidistant means exactly the same distance apart. In geometry, the center of a circle is known to be equidistant from any point on its circumference (its outer boundary).


2 Answers

I think you will run into trouble with your definition: "... draw a curve that is always at a certain distance from the normal to the surface of a given curve."

If you draw a series of lines inside a concave curve, at some point the line will fold back on itself, ultimately creating a geometric inversion.

Applied to an ellipse, for example:

enter image description here

like image 106
Mr.Wizard Avatar answered Oct 18 '22 03:10

Mr.Wizard


EDIT: NOTE: This answer isn't about avoiding corner-wrapping (which is a feature of strict equidistant curves).

According to Wikipedia,

The curve at a fixed offset from a given Bézier curve, often called an offset curve (lying "parallel" to the original curve, like the offset between rails in a railroad track), cannot be exactly formed by a Bézier curve (except in some trivial cases). However, there are heuristic methods that usually give an adequate approximation for practical purposes.

So, there are heuristic methods that you'll have to use to get an approximation. There's an academic paper called Comparing offset curve approximation methods including a comparison of 9 algorithms.

If you want to skip the research and just get a solution, take a look at this blog post describing an implementation of De Casteljau's algorithm. EDIT: I have to admit that I'm not sure how this implementation behaves with sharp turns.

like image 31
StackExchange saddens dancek Avatar answered Oct 18 '22 01:10

StackExchange saddens dancek