ConicChord.py

from pygeo import *

v=display(scale=70)

p1 = FreePoint(-18,-12.,15,color=WHITE,pointsize=1.)
p2 = FreePoint(3,-8.0,0,color=WHITE,pointsize=1.)
p3 = FreePoint(-35.0,-2.0,25,color=WHITE,pointsize=1.)

plane=Plane(p1,p2,p3,level=3)
p4 = Slider(plane,-9,18,-1,color=WHITE)
p5 = Slider(plane,-35,17,-1,color=WHITE)

conic=Conic(p1,p2,p3,p4,p5,color=BLUE,density=500)

l1 = Slider(plane,-1,-11,-1,color=WHITE)
l2 = Slider(plane,12,-1,15,color=WHITE)
line=Line(l1,l2,color=BLUE)

ConicChord(conic,line,linewidth=.5,color=RED)


v.pickloop()