Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
var('x, y')
ft = (x+1)^2-(y)^2-1
f=circle((-1,0), 1)
p = plot(f,-5,5, thickness=2)

@interact
def _(r=(1..4)):
    g = circle((1,0), r)
    pt = plot(g,-5, 5, color='green', thickness=2)
    gt= (x-1)^2+ y^2-r
    pot = solve([ft,gt], x, y,solution_dict=True)
    P = []
    for L in pot:
        try:
            P.append(point((L[x],L[y]),color='red',pointsize=20))
        except:
            pass
    html('$tocke=\;%s$'%latex(pot))
    show(  p + pt + sum(P) , ymin = -5, ymax = 4,aspect_ratio=1)
var('x, y')
ft = (x+1)^2-(y)^2-1
f=circle((-1,0), 1)
p = plot(f,-5,5, thickness=2)
1,thickness=2)

@interact
def _(r=(1..4)):
    g = circle((1,0), r)
    pt = plot(g,-5, 5, color='green', r,color='green', thickness=2)
    gt= (x-1)^2+ y^2-r
    pot = solve([ft,gt], x, y,solution_dict=True)
    P = []
    for L in pot:
        try:
            P.append(point((L[x],L[y]),color='red',pointsize=20))
        except:
            pass
    html('$tocke=\;%s$'%latex(pot))
    show(  p f + pt g + sum(P) , ymin = -5, ymax = 4,aspect_ratio=1)