[ascoders] Re: distanz punkt bezierKurve

  • From: "Andre Michelle" <am@xxxxxxxxxxxxxxxxxx>
  • To: <ascoders@xxxxxxxxxxxxx>
  • Date: Mon, 30 Dec 2002 19:38:36 +0100

hi ralf & bokel,

> Ist Pdist bei dir nicht das Ende der Fahnenstange [
> http://code.audiofarm.de/temp/normale.swf ] oder anders: Kommst du von dem
> Punkt (x + nx * 100, y + ny * 100) aus nicht irgendwie im "Rückwärtsgang"
> auf die obige Formel ?

Leider nein, jedenfalls gibt es keine "einfache" Formel.

> Kann es da nicht mehrere  Lösungen geben ?
> Zum Beispiel wenn die Kurve einen Viertelkreis
> bildet und der Punkt in der Mitte des Viertelkreises
> liegt ?
>
> Geht das dann überhaupt mit einer Formel ?

Jein. Parallel zu diesem Forum habe ich die Frage in
comp.graphics.algorithms gestellt,
denn schon beim Suchen im Google ist mir bewusst geworden, dass es ein
haerteres Stueck Arbeit wird.
Im Prinzip ist alles nicht die Welt, wenn man das Mathezeugs noch drauf hat.

[Antwort auf mein Posting]

> which normal vector cross a point not on the curve.

This is related to the problem of calculating the closest point
on the curve to some specified point not on the curve.  Let
Q = (qx,qy) be the specified point.  The curve is (x(t),y(t))
and a tangent to the curve is the derivative (x'(t),y'(t)).  The
vector (x(t),y(t)) - (qx,qy) must be perpendicular to the
tangent, so the dot product must be zero
  0 = Dot((x(t)-qx,y(t)-qy),(x'(t),y'(t))
     = x'(t)*(x(t)-qx) + y'(t)*(y(t)-qy)
     = F(t)
Since your curve is quadratic, F(t) is a cubic polynomial.
Use your favorite root finder to locate any roots in the
interval [0,1].

[/Antwort]

Es koennte ne Zeit lang dauern, bis ich wieder weiss, wie man eine
parametrische Gleichung ableitet
und das Punktprodukt nach t aufloest.
Daher hoffe ich, dass jemand mir auf die Spruenge hilft.

@bokel:
An seiner Antwort sieht man, dass mehrere Loesungen moeglich sind,
denn die Funktion F(t) kann natuerlich mehrere Nullstellen haben...

--
andre michelle

extrajetzt
http://www.extrajetzt.com
flashblog:
http://www.andre-michelle.com


------------------------------------------------------
Archiv   : //www.freelists.org/archives/ascoders/
Optionen : //www.freelists.org/list/ascoders
------------------------------------------------------

Other related posts: