2D implicit_plot Problem

asked 2019-09-15 05:38:06 -0600

Ingo gravatar image

updated 2019-09-16 15:40:30 -0600

Consider the following cell content:

var('x,y,d')

f(d,x,y)=(0.577350269189626*d + 0.7071067811865475*x + 0.408248290463863*y)^2 + (0.577350269189626*d - 0.7071067811865472*x + 0.40824829046386296*y)^2 + (0.577350269189626*d - 0.816496580927726*y)^2 - 1

@interact
def _(d=slider(-2,2,default=1.73,label="$d$",step_size=0.1)):

    show(N(f(d,0,0)))
    show(implicit_plot(f(d,x,y)==0,(x,-2,2),(y,-2,2)))

The plot draws a point at (0,0), though the value of f(1.73,0,0) is far from zero. When working with fixed value of d instead of slider, a warning is issued that no contour could be found, but the point is drawn nevertheless. I’d have expected that nothing is drawn.

Background: I'd like to draw the students' attention to what happens when touching a surface with a plane- i. e. before - when NOTHING (not even a single point!) is in the plane - , at touch point and with intersection.

In a larger context I also observed sometimes that the point at (0,0) appears only after moving the slider a bit.

edit retag flag offensive close merge delete