Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

SageMath notebooks associated to the Black Hole Lectures (https://luth.obspm.fr/~luthier/gourgoulhon/bh16)

Project: BHLectures
Views: 20107
Kernel: SageMath 7.4.beta6
%display latex
var('u v')
def W(x): if x < -1: return RDF(0) return RDF(lambert_w(RDF(x)/RDF(e))+1)
plot(W, (x,-2,5), aspect_ratio=1)
Image in a Jupyter notebook
def h(u,v): return sinh(tan(u))*sinh(tan(v))-1
a = 0.99*pi/2
implicit_plot(h, (u,-a,a), (v,-a,a), plot_points=400, fill=True, fillcolor='yellow')
Image in a Jupyter notebook
def g(u,v): return 4*W(-sinh(tan(u))*sinh(tan(v)))^2 * cos(u)^2 * cos(v)^2
graph = plot3d(g, (u,-a,a), (v,-a,a), plot_points=200)
graph += plot3d(lambda u,v: 0.001, (u,-a,a), (v,-a,a), color='yellow')
show(graph.rotate((0,0,1), pi/2), viewer='tachyon', view_point=(-3,3,2))
Image in a Jupyter notebook
graph