Raymond Toy ?????:
>>>>>>"Vadim" == Vadim V Zhytnikov <vvzhy@mail.ru> writes:
>
>
> Vadim> Hi!
>
> Vadim> Presently Maxima wraps all plotted expression using
> Vadim> "coerce-float-fun' (plot.lisp). The wrapper catches lisp
> Vadim> errors and returns either floating point value or T
> Vadim> if expression is singular or not well defined.
> Vadim> This is more or less OK with 2D plotting. It seems that
> Vadim> plot2d is smart enough to ignore this non numerical values.
> Vadim> The only not quite well handled situation is the case
> Vadim> when plotted expression cannot be evaluated numerically,
> Vadim> e.g. contains unknown function or variable. In this
> Vadim> situation plot2d tries hard for quite long time
> Vadim> to build the plot and finally produces gnuplot error.
>
> I think this issue could be solved if we could have more fine-grained
> control with conditions and error-handlers. I think every system we
> support has conditions now, even gcl.
>
Unfortunately GCL 2.6.2 is not ready for this yet. Although
handler-case is here but error types generated by various
functions are absolutely non ANSI. I'm sure next stable GCL
release will be OK.
> Then when we get a division by zero or an overflow, we know that the
> problem was and can do the right thing. Right now, every error is
> treated as if it were an arithmetic error. Not good, as you've seen.
>
> Vadim> Situation with 3D plots isn't so good.
>
> Not sure what to do here. I was hoping someone else would do an
> adaptive 3D plotter. But errors are still a problem.
>
Is adaptive 3d plotting algorithm available somewhere?
> Vadim> Other quick and dirty solution is to make "coerce-float-fun"
> Vadim> return 0.0 instead of T for singular points.
>
> The T is needed for the 2D adaptive plotting to work. A non-number
> signals a singularity, so the adaptive plotter can try more points.
>
I see. But we still can change T->0.0 for 3D plotting as a quick fix.
I still don't like the fact that 2D plotting wastes time in the hopeless
situation with wrong plotting expression. I see that the problem can be
resolved by fine-grained error handling but maybe we just can count
number of plot expression evaluations and number of failed evaluations.
If after 10 or 20 attempts these counters equal then plotting must be
aborted.
> Ray
>
--
Vadim V. Zhytnikov
<vvzhy@mail.ru>
<vvzhy@netorn.ru>