From: Michael Schindler <mschindler@us...>  20050909 09:23:31

[sorry, I forgot to send this to the list, here it comes:] On 09.09.05, Joerg Lehmann wrote: > On 09.09.05, Michael Schindler wrote: > > On 09.09.05, Joerg Lehmann wrote: > > > Hi Michael! > > > > > > On 09.09.05, Michael Schindler wrote: > > > > I have hit a problem concerning the geometry things of the normpaths. > > > > Consider a Bezier curve that contains a point with infinite curvature. > > > > This is very easy to produce by setting e.g. the last two points to > > > > the same coordinates > > > > > > > > n = normcurve_pt(0,0, 1,1, 1,0, 1,0) > > > > > > I think, we should return the correct rotation instead of None. > > > > That is my problem. If you have infinite curvature, there is no > > geometrically defined rotation. Because the curvature is the change of > > the normal vector along the curve length, projected onto the tangent > > vector (or equally the other way round), you see that both vectors > > change infinitely fast. Thus, they do not exist in this point. > > Maybe I'm missing the point, but for me the rotation doesn't have > anything to do with the curvature, but is solely defined in terms of > the tangent. Correct. The tangent is not defined in such point. This is what I have learned some years ago in a lecture on differential geometry: Consider a parameterization of a curve. The parameterization can be Cinfty. But: if the length "velocity" (dx/dt, dy/dt) is zero somewhere, you can easily create a cusp in that curve. So, the curve is not smooth anymore, and in that cusp the tangent vector is not continuous: From both sides the tangents approach different values. > So I would assume that we take the limiting case of the rotation defined > by the tangent as param>1. This you can easily calculate via l'Hopital > and it gives you (1, 0) in the present case. In the present case we have only one side to do this. It would be very nice if already this worked. Nevertheless, the problem remains if the parameterization velocity vanishes somewhere in the middle. > Having said all that, I just want to remark that Ghostscript also > isn't quite a fan of a Bézier curve with two identical control points. > Just try to stroke the above normpath and view the resulting EPS > file... Well, my ghostscript does not complain. But the tangent does not seem to be (1, 0) at the end. > So, maybe we're discussing a point which is quite academical anyway. I tapped into this while writing the parallel deformer where infinte curvatures are a big issue. Michael.  "A mathematician is a device for turning coffee into theorems" Paul Erdös. 