In [1]:
%display latex
# %load_ext line_profiler # line by line profiling
In [2]:
S = manifolds.Sphere(stereo2d=True, stereo_lim=2)
In [3]:
A = S.top_charts()[2] # spherical chart
In [4]:
t = var('t')
In [5]:
p = S((pi/2, 0.1), A)
In [6]:
Tp = S.tangent_space(p)
In [7]:
v = Tp((1, -1))
In [8]:
c = S.integrated_geodesic(S.metric(), (t, 0, 4), v, across_charts=True)
In [21]:
#%lprun -f c.solve_across_charts sol = c.solve_across_charts(step=0.02) # line by line profiling
sol = c.solve_across_charts(step=0.02)
In [22]:
interp = c.interpolate()
In [23]:
P = c.plot_integrated(mapping=S.embedding(), color=["red","green","blue","yellow"], thickness=3, plot_points=100, across_charts=True)
In [24]:
P += A.plot(number_values=15, chart=S.ambient().default_chart(), mapping=S.embedding(), color='grey')
In [25]:
P.show(viewer='threejs', online=True)
In [26]:
for inter in interp:
    print inter[0]
Chart (A, (th, ph))
Chart (U, (x, y))
Chart (V, (xp, yp))
Chart (U, (x, y))
In [ ]: