This Jupyter/SageMath notebook is relative to the lectures Geometry and physics of black holes
version()
'SageMath version 10.0, Release Date: 2023-05-20'
The two intersecting light cones:
t, ph = var('t ph')
c1 = parametric_plot3d([(1 - t)*cos(ph), (1 - t)*sin(ph), t],
(t, 0, 1), (ph, 0, 2*pi), color='palegreen')
c2 = parametric_plot3d([1 + (1 - t)*cos(ph), (1 - t)*sin(ph), t],
(t, 0, 1), (ph, 0, 2*pi), color='palegreen')
c1 + c2
The 2-surface $\mathscr{S}$:
f(t) = 1 - sqrt(t^2 + 1/4)
s = parametric_plot3d([1/2, t, f(t) + 0.01], (t, -sqrt(3)/2, sqrt(3)/2),
color='red', thickness=4)
c1 + c2 + s
Adding some light rays:
l1 = (line([(1/2, 1/3, f(1/3)), (0,0,1)], color='green', thickness=3)
+ line([(1/2, 1/2, f(1/2)), (0,0,1)], color='green', thickness=3)
+ line([(1/2, 2/3, f(2/3)), (0,0,1)], color='green', thickness=3))
l2 = (line([(1/2, 1/3, f(1/3)), (1,0,1)], color='green', thickness=3)
+ line([(1/2, 1/2, f(1/2)), (1,0,1)], color='green', thickness=3)
+ line([(1/2, 2/3, f(2/3)), (1,0,1)], color='green', thickness=3))
graph = c1 + c2 + s + l1 + l2
and some labels:
tt = text3d('p', (1, 0, 1.2), fontfamily='MathJax_Math', fontsize='200%')
tt += text3d('q', (0, 0, 1.2), fontfamily='MathJax_Math', fontsize='200%')
tt += text3d('S', (1/2, 0, 0.75), fontfamily='MathJax_Script', fontsize='200%',
color='red')
show(graph + tt, frame=False)