#plotConics.maple # # This plots the traces of the hyperboloid in each of the planes P_1---P_4. # ########################################################################################### interface(quiet=true): read("procedures"): Digits:=10: with(plots): with(plottools): plotsetup(x11,plotoptions=`width=6in,height=6in`): ########################################################################################### PConic:=proc(a,b,c,d) local A,v: global s,t,u: A:=ParameterizeLine(MakeRegulus(b, c, d, s),v): return(subs(op(solve({A[1]=a[1],A[2]=a[2],A[3]=a[3]},{t,u,v})),[t,u])) end proc: ########################################################################################### PL:=proc(a,b) local A: global s,t,u: A:=ParameterizeLine(b,s): return(subs(op(solve({A[1]=a[1],A[2]=a[2],A[3]=a[3]})),[t,u])) end proc: ########################################################################################### # H := (t, a) -> [t, a, t*a]: l1:=[H(-1/2,1), H(1/2,1)]: l2:=[H(-1/2,-1), H(1/2,-1)]: l3:=[[1/2,1/2,1/4], [-1/2,-1/2,1/4]]: l4:=[H(-1/2,0), H(1/2,0)]: ############################################################################ P1:=[t,1+u,t]: # x-z=0 # l1 : (t,1,t) P2:=[t,u-1,-t]: # x+z=0 # l2 : (t,-1,-t) P3:=[t,t,1/4+u]: # x-y=0 # l3 : (t,t,1/4) P4:=[t,0,u]: # y=0 # l4 : (t,0,0) ########################################################################################### macro(db=COLOR(RGB, 0,0,.8)): macro(dr=COLOR(RGB, .8,0,0)): macro(dg=COLOR(RGB, 0,.8,0)): macro(dm=COLOR(RGB, .8, 0, .8)): # l1plot:=plot([t,0,t=-0.75..0.75],color=db,thickness=2,numpoints=2): l2plot:=plot([t,0,t=-0.75..0.75],color=dr,thickness=2,numpoints=2): l3plot:=plot([t,0,t=-0.75..0.75],color=dg,thickness=2,numpoints=2): l4plot:=plot([t,0,t=-0.75..0.75],color=dm,thickness=2,numpoints=2): ########################################################################################### # C1:=simplify(subs(s=(s+1)/(2*s),PConic(P1,l2,l3,l4))): #fsolve(denom(C1[1])=0): C1plot:=plot([C1[],s=-1.03..1.1],color=brown): #plotsetup(gif,plotoutput="P1.gif",plotoptions=`height=200,width=200`): display(C1plot,l1plot,axes=boxed); C2:=simplify(subs(s=(s+1)/(2*s),PConic(P2,l1,l3,l4))): #fsolve(denom(C2[1])=0); C2plot:=plot([C2[],s=-1.1..1.03],color=brown): #plotsetup(gif,plotoutput="P2.gif",plotoptions=`height=200,width=200`): display(C2plot,l2plot,axes=boxed); C3:=simplify(subs(s=s,PConic(P3,l1,l2,l4))): #fsolve(denom(C3[1])=0); C3plot:=plot([C3[],s=-0.25...1.25],color=brown): #plotsetup(gif,plotoutput="P3.gif",plotoptions=`height=200,width=200`): display(C3plot,l3plot,axes=boxed); C4:=simplify(subs(s=s,PConic(P4,l1,l2,l3))): #fsolve(denom(C4[1])=0); C4plot:=plot([C4[],s=-0.25...1.025],color=brown): #plotsetup(gif,plotoutput="P4.gif",plotoptions=`height=200,width=200`): display(C4plot,l4plot,axes=boxed); T:=[line([9.5, 0.],[-.511, 0.],color=dm,thickness=2,numpoints=2), line([9.5, 0.],[-1.087391273, -.5164581109],color=dm,thickness=2,numpoints=2), line([-1.087391273, -.5164581109],[-.511, 0.],color=dm,thickness=2,numpoints=2)]: #display(C4plot,T,axes=boxed);