DISCONTINUITIES IN A CURVE



>>>>> "Rupert" == Rupert Swarbrick <rswarbrick at gmail.com> writes:

    Rupert> Bernard LUCE <bluce at wanadoo.fr> writes:
    >> Before all, many thanks for your collective prompt-and-deep investigations.
    >> 
    >> As far as I understand, you discard the discontinuities in the curve
    >> by avoiding the undefined value -2 and +1 and drawing on intervals
    >> [t,-20,-2.1] ,[t,-1.9,0.9],[t,1.1,20].

    Rupert> Just to make sure you're not confused: The scribbly lines that appeared
    Rupert> all over your original plot were not quite because of points where the
    Rupert> function isn't defined. You can get the same behaviour with a
    Rupert> (non-parametric) plot of, say,

    Rupert>   f(x) = 1/(x-1)

    Rupert> over [0, 2.1]. The problem here is that at a point slightly less than 1,
    Rupert> f(x) is a large negative number. Assuming that the plotting program
    Rupert> doesn't try to evaluate f at 1 (which I avoid by giving a weird
    Rupert> endpoint), the next point is large and positive. The result is a
    Rupert> whopping great almost vertical line at 1.

This shouldn't be a problem with the current plot2d.  It uses an
adaptive plotting algorithm to use more points where the curve is
changing too fast.  If, by chance, plot2d tries to evaluate f(1),
maxima catches that error and pretends (I think) that there is a
discontinuity at that point and tries to add more points in the
neighborhood to get a better plot.

Of course, if the discontinuity is very narrow and the number of
initial sample points is too sparse, plot2d will never see it and hence
never plot it.  No surprise there.

The adaptive plotter isn't used for any other kind of plot such as
parametric plots, unfortunately.

Ray