Problem with Geodesic Plotting

asked 2023-05-09 19:51:27 +0200

Jack Zuffante gravatar image

The output of all this for me was an x-y plot with a p_0, but no curve. I'm noticing that there is a message at the bottom that maybe implies that ymax and xmax were forced to be 0. Does this have anything to do with why there is no curve visible?

%display latex
M = Manifold(3, 'M', structure='Lorentzian')
X.<t,x,y> = M.chart(r't:(-oo,+oo) x:(-oo,+oo) y:(-oo,+oo)')
X
R2 = Manifold(2, 'R^2', latex_name=r'\mathbb{R}^2')
X2.<x,y> = R2.chart()
to_R2 = M.diff_map(R2, {(X, X2): [x,y]})
to_R2.display()
r=sqrt((x-3*t)^2+y^2)
f=(tanh(r+4)-tanh(r-4))/(2*tanh(4))
g = M.metric()
g[0,0] = (9*f^2-1)
g[0,1] = -3*f
g[1,1] = 1
g[2,2] = 1
g.display()
p0 = M.point((0,0,0), name='p_0')
v0 = M.tangent_space(p0)((1.25, 5, 0), name='v_0')
v0.display()
s = var('s')
geod = M.integrated_geodesic(g, (s, 0, 5), v0); geod
sol = geod.solve() 
interp = geod.interpolate()                 
graph = geod.plot_integrated(chart=X2, mapping=to_R2, plot_points=10, 
                         thickness=2, label_axes=False)           
graph += p0.plot(chart=X2, mapping=to_R2, size=4)                                
show(graph)

Integrated geodesic in the 3-dimensional Lorentzian manifold M
lsoda--  at t (=r1), too much accuracy requested  
   for precision of machine..  see tolsf (=r2) 
  in above,  r1 =  0.5000000000000D-01   r2 =                  NaN
verbose 0 (2201: graphics.py, get_minmax_data) xmin was NaN (setting to 0)
verbose 0 (2201: graphics.py, get_minmax_data) xmax was NaN (setting to 0)
verbose 0 (2201: graphics.py, get_minmax_data) ymin was NaN (setting to 0)
verbose 0 (2201: graphics.py, get_minmax_data) ymax was NaN (setting to 0)
Launched png viewer for Graphics object consisting of 3 graphics primitives
edit retag flag offensive close merge delete