| Hosted by CoCalc | Download
var('a,b,c,t'); #initialize variable names w = 4; #plot size hh = implicit_plot3d(-a^2-b*c-1,(a,-w,w),(b,-w,w/4),(c,0,w),alpha=0.5); #sl2R model of H^2 nn = implicit_plot3d(-a^2-b*c+1,(a,-w,w),(b,-w,w/4),(c,-w/4,w),color="darkgray",alpha=.25); #norm -1 surface def geo(A,T,t_min,t_max): #parametric plot of geodesic passing through A in hh with tangent vector T such that <T,T>=-1 return parametric_plot3d(vector(A)*cosh(t)+vector(T)*sinh(t),(t,t_min,t_max),color="green",radius=0.05);#.add_condition(cond,50); AA = (1,-1,2); TT = (0,sqrt(2)/2,sqrt(2)); #elements of sl2R, AA on hh and TT of norm -1 orthogonal to AA ll = geo(AA,TT,-1.5,.8); from sage.plot.plot3d.shapes2 import Line; #import Line function vecAA = Line([(0,0,0),AA],arrow_head=True,thickness=5,color="red"); #graphical version of AA vecTT = Line([(0,0,0),TT],arrow_head=True,thickness=5,color="red"); #graphical version of TT def wedge(T,A): #wedge product of vectors T and A in sl2R matT = matrix([[T[0],T[1]],[T[2],-T[0]]]); matA = matrix([[A[0],A[1]],[A[2],-A[0]]]); matWedge = 1/2*(matT*matA-matA*matT); return (matWedge[0,0],matWedge[0,1],matWedge[1,0]); NN = wedge(TT,AA); #normal vector to the geodesic through AA with tangent vector TT vecNN = Line([(0,0,0),NN],arrow_head=True,thickness=5,color="red"); #graphical version of NN basePic = hh+nn; AAPic = ll+vecAA+vecTT+vecNN; #now do it all again with different AA and TT: aaa=-1/2; bbb = -3/4; ccc = 5/3; AAA = (aaa,bbb,ccc); vecAAA = Line([(0,0,0),AAA],arrow_head=True,thickness=5,color="blue"); ttt =-1/4; uuu = (3*ttt+3*sqrt(-4*ttt^2+5))/10; vvv = 4/3*(5*uuu/3-ttt); #fancy arithmetic to get TTT in AAA^\perp with norm -1 TTT = (ttt,uuu,vvv); vecTTT = Line([(0,0,0),TTT],arrow_head=True,thickness=5,color="blue"); lll = geo(AAA,TTT,-1.8,0.9); NNN = wedge(TTT,AAA); vecNNN = Line([(0,0,0),NNN],arrow_head=True,thickness=5,color="blue"); AAAPic = vecAAA+vecTTT+lll+vecNNN; totalPic = basePic+AAPic+AAAPic; totalPic.show() #blue = hh, gray = nn, green = geodesics, red arrows = ATN for one geodesic, blue arrows = ATN for other geodesic
(a, b, c, t)
3D rendering not yet implemented
︠90ff104f-2de4-47e6-a269-9f6f3cbeef99︠ ︠bf798045-6a73-49d3-a8b7-c0a3b8ad67ed︠ ︠2ffd5b51-a067-4f15-a8b6-73d4034d2fe7︠ ︠30cade39-5db3-4770-91b0-a645dcf62c57︠ ︠a184f8cd-49ae-4923-ab4b-4bd99e4b935a︠