## Re: [PyX-devel] Curves with infinite curvature]

 Re: [PyX-devel] Curves with infinite curvature] From: Michael Schindler - 2005-09-09 09:22:52 ```[sorry, I forgot to send this to the list, here it comes:] 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) > > > > The curveradius_pt returns "None" for parameter value 1. But the > > trafo/rotation does something quite unexpected. The tangent vector > > > > n.rotation([0.999999])[0].apply_pt(1, 0) > > > > seems to converge against (-1, 0) while adding more "9"s to the > > parameter. However, the tangent at the parameter value 1 is (1, 0). > > > > My question now is, how well do we want to really reproduce the true > > underlying geometry? We should return "None" for the rotation at such > > points also. > > 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. > Geometrically, everything is well-defined, it's only that we commit some > numerical error because the length of (dx/dt, dy/dt) goes to zero. But > we should be able to treat this case better. What do you think of? We could look at the neighborhood and return a value that is expected to be the limiting rotation when we pass to the critial point. Michael. -- "A mathematician is a device for turning coffee into theorems" Paul Erdös. ```