[SciPy-user] Getting coordinates of a level (contour) curve

Zachary Pincus zachary.pincus@yale....
Tue Aug 12 15:04:26 CDT 2008

On Aug 12, 2008, at 2:57 PM, Rob Clewley wrote:

>> A lot of the PyCont, etc., descriptions seem to be wrapped up in
>> pretty specialized terminology -- what would an example of tracing a
>> level curve look like, given f(x), fprime(x), and some x0?
> I can't really explain it easily off the top of my head. It's a lot
> like you described, and there are several ways to do it. A popular
> method is pseudo-arc length continuation, and the idea for it is
> graphically shown on the wiki page for "numerical continuation". It
> takes into account how the curve can bend at "fold points," where a
> naive method based on parameterization of the curve along one axis
> would lead to a singularity (f' = 0 leading to a 1/0 in the
> algorithm). You might also read about predictor-corrector methods.
> However, I might be able to help you set up an example of applying
> PyCont to finding a level curve - it would be valuable tutorial for
> the PyCont documentation (I think all our present examples are based
> on bifurcations in dynamical systems). There are some good book
> references on the wiki page, maybe the most accessible are [B1], [B5]
> and [B6] but I don't know a few of them to comment on them all. From
> the title, [B12] looks like it might be too.

Thanks for the background! A basic example on the PyCont page about  
tracing a level curve given python functions f(x, y), fprime(x, y) (*)  
and an initial (x0,y0) coordinate would be very useful indeed. I  
definitely had not realized that PyDSTool/PyCont could be used for  
these general purposes -- which purposes will be very useful for me  
and I presume others as well.


(*) Or perhaps f_fprime(x, y) which returns the value and gradient?  
I'm not sure how PyCont is set up...

More information about the SciPy-user mailing list