I was looking into this issue this afternoon, and its more complicated
than it might appear at first. Removing a point in a 2D plot is
relatively simple, but when you remove a point in a 3D plot you could
be affecting several faces. There is also the matter that evaluation
is separate from triangulation, so you have to find out how to
communicate the fact that a vertex doesn't exist between the two
stages (since ParametricSurface usually assumes it has a uniform
grid).

If during evaluation you could set the vertex coordinates at a non-
existent point to be some kind of special NaN value, you could omit
that vertex later during triangulation. Does anyone know how you could
get at such a NaN value for Cython doubles?

- Bill

On Nov 10, 12:34 pm, kcrisman <kcris...@gmail.com> wrote:
> In 4.2.1.alpha0:
>
> sage: f(x,y)=ln(x)
> sage: P=plot3d(f,(x,0,1),(y,0,1))
> sage: P
> ERROR: An unexpected error occurred while tokenizing input
> The following traceback may be corrupted or invalid
> The error message is: ('EOF in multi-line statement', (16,0))
> ---------------------------------------------------------------------------
> ValueError                                Traceback (most recent call
> last)
> <snip a lot>
> ValueError: math domain error
>
> Switch to (x,0.1,1), and all is well.  I am pretty sure the problem is
> that line 404 in plot/plot3d/parametric_surface.pyx doesn't have an
> exception handler forlog(0) or other such nan type values:
>
> sage: math.log(0)
> <snip>
> ValueError: math domain error
>
> But in the plotting context, it's silly not to just ignore this; we
> check for things like this all the time:
> sage: plot(log,0,1)
> <works fine>
>
> Unfortunately, I don't know enough about C/Cython to fix this.  For
> now it would probably be enough to fix it for the z variable.  This is
> now #7423.  Any takers, or hints as to how to fix this?  Thanks!
>
> - kcrisman
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to