From: Michael Schindler <mschindler@us...>  20050909 10:39:28

Hello Jörg, On 09.09.05, Joerg Lehmann wrote: > On 09.09.05, Michael Schindler wrote: > > > 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. > > Ah, ok, the limits from above and below do not agree. But in the output, > there is no cusp because we do not see the behaviour for param > 1. > Hmm... > > > 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. > > Can this happen in the case of Bézier curves? Very easily: n = normcurve_pt(0,0, 1,1, 0,1, 1,0) has a cusp at parameter 0.5, where the tangent switches from (0,1) to (0,1). > > > 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. > > I suspected something like this... It is even that bad that I consider giving up the "None" business for the curvature radius. But then, after thinking about it for a while, I consider it better to throw something like "None" rather than an "inf" or "inf" value. For the latter it would be very convenient to calculate a curvature. One can divide by it and gets 0. On the other hand, when calculating with "inf" one soon gets "inf" everywhere, and the output will then be an invalid postscript. This would be really worse than thowing Exceptions here and there, when a "None" occurs where it should not. André asked me why there is a curveradius and not a curvature method. I answered that we need a length here, because lengths (and not inverse lengths) are natural to PyX. But I am not so convinced of this anymore because I need to convert the curvradius here and there in the deformers. Michael.  "A mathematician is a device for turning coffee into theorems" Paul Erdös. 