Flat Spacetime Penrose Diagram

scriplus= ;scriminus= ;
(*failed to enter a scri+ or scri- image or character The correct character has unicode 2110, but MAthematica displays it as LaTeX does in math mode. So I also use the same symbol ℐ, entered as 
"\: 2110" - no space between : and 2110 .... The 𝒾 is entered as [Esc]sci[Esc]  *)
(*Show[ImageGraphics[scriplus]] *)
gboundary=Graphics[{
Thick,Black,Line[{{π/2,0      },{0      ,   π/2}}],
Thick,Black,Line[{{π/2,0      },{0      ,-π/2}}],
Thick,Black,Line[{{0      ,π/2},{0      ,-π/2}}],
Thick,Black,Line[{{0      ,0      },{π/2,0        }}],
Black,Text[Style["(SuperPlus[𝒾])",Large],{0                 ,  π/2+0.1},FormatType->StandardForm],
Black,Text[Style["(SuperMinus[𝒾])",Large],{0                 ,-π/2-0.1},FormatType->StandardForm],
Black,Text[Style["(𝒾^0)",Large],{π/2+0.1,  0                  },FormatType->StandardForm],
Black,Text[Style["(SuperPlus[ℐ])",Large],{π/4+0.2,  π/4+0.2},FormatType->StandardForm],
Black,Text[Style["(SuperMinus[ℐ])",Large],{π/4+0.2,-π/4-0.2},FormatType->StandardForm]
}];

Frame of the Penrose diagram:

Timelike curves: close to the speed of light: travelling close to null infinities, eventually hitting future timelike infinity.
Moving outwards on constant radial speed worldlines

r  [t_] = v t ;
tp[t_] = 0.5 (ArcTan[t+r[t]]+ArcTan[t-r[t]]);
rp[t_] = 0.5 (ArcTan[t+r[t]]-ArcTan[t-r[t]]);
gplot=ParametricPlot[
{
{rp[t],tp[t]}/. v-> 0.99999,
{rp[t],tp[t]}/. v-> 0.999,
{rp[t],tp[t]}/. v-> 0.99
},{t,0,2000000},PlotRange->All];
Show[gboundary,gplot]

Slower particles.

r  [t_] = v t ;
tp[t_] = 0.5 (ArcTan[t+r[t]]+ArcTan[t-r[t]]);
rp[t_] = 0.5 (ArcTan[t+r[t]]-ArcTan[t-r[t]]);
gplot=ParametricPlot[
{
{rp[t],tp[t]}/. v-> 0.5,
{rp[t],tp[t]}/. v-> 0.6,
{rp[t],tp[t]}/. v-> 0.7,
{rp[t],tp[t]}/. v-> 0.8,
{rp[t],tp[t]}/. v-> 0.9
},{t,0,100},PlotRange->All];
Show[gboundary,gplot]

r  [t_] =  v( 1+Cos[t] )/2;
tp[t_] = 0.5 (ArcTan[t+r[t]]+ArcTan[t-r[t]]);
rp[t_] = 0.5 (ArcTan[t+r[t]]-ArcTan[t-r[t]]);
gplot=ParametricPlot[
{
{rp[t],tp[t]}/. v-> 0.5,
{rp[t],tp[t]}/. v-> 0.6,
{rp[t],tp[t]}/. v-> 0.7,
{rp[t],tp[t]}/. v-> 0.8,
{rp[t],tp[t]}/. v-> 0.999
},{t,0,100},PlotRange->All];
Show[gboundary,gplot]

Spacelike curves: hitting spacelike infinity

r  [t_] = v t ;
tp[t_] = 0.5 (ArcTan[t+r[t]]+ArcTan[t-r[t]]);
rp[t_] = 0.5 (ArcTan[t+r[t]]-ArcTan[t-r[t]]);
gplot=ParametricPlot[
{
{rp[t],tp[t]}/. v-> 1.1,
{rp[t],tp[t]}/. v-> 1.3,
{rp[t],tp[t]}/. v-> 1.5,
{rp[t],tp[t]}/. v-> 1.8,
{rp[t],tp[t]}/. v-> 3
},{t,0,100},PlotRange->All];
Show[gboundary,gplot]

More general curves. Example 5.3, p83 Hartle
The hyperbolic functions cannot accept very large arguments and they fail for late times, esp when hitting the future null infinity.

rr[τ_] =  (1/a)( Cosh[a τ]-1);
tt[τ_] =  (1/a)    Sinh[a τ]        ;
tp[τ_] = 0.5 (ArcTan[tt[τ]+rr[τ]]+ArcTan[tt[τ]-rr[τ]]);
rp[τ_] = 0.5 (ArcTan[tt[τ]+rr[τ]]-ArcTan[tt[τ]-rr[τ]]);
gplot=ParametricPlot[
{
{rp[τ],tp[τ]}/. a-> .05,
{rp[τ],tp[τ]}/. a-> .1,
{rp[τ],tp[τ]}/. a-> .2,
{rp[τ],tp[τ]}/. a-> .3,
{rp[τ],tp[τ]}/. a-> .6,
{rp[τ],tp[τ]}/. a-> .8,
{rp[τ],tp[τ]}/. a-> .9,
{rp[τ],tp[τ]}/. a-> 1.2
},{τ,0,20},PlotRange->All];
Show[gboundary,gplot]

Lines of constant r:

rr[τ_] =  a;
tt[τ_] = τ;
tp[τ_] = 0.5 (ArcTan[tt[τ]+rr[τ]]+ArcTan[tt[τ]-rr[τ]]);
rp[τ_] = 0.5 (ArcTan[tt[τ]+rr[τ]]-ArcTan[tt[τ]-rr[τ]]);
gplot=ParametricPlot[
{
{rp[τ],tp[τ]}/. a-> .05,
{rp[τ],tp[τ]}/. a-> .1,
{rp[τ],tp[τ]}/. a-> .3,
{rp[τ],tp[τ]}/. a-> .5,
{rp[τ],tp[τ]}/. a-> .8,
{rp[τ],tp[τ]}/. a-> 1.5,
{rp[τ],tp[τ]}/. a-> 3,
{rp[τ],tp[τ]}/. a-> 10
},{τ,-20,20},PlotRange->All];
Show[gboundary,gplot]

Lines of constant t:

rr[τ_] =  τ;
tt[τ_] = a;
tp[τ_] = 0.5 (ArcTan[tt[τ]+rr[τ]]+ArcTan[tt[τ]-rr[τ]]);
rp[τ_] = 0.5 (ArcTan[tt[τ]+rr[τ]]-ArcTan[tt[τ]-rr[τ]]);
gplot=ParametricPlot[
{
{rp[τ],tp[τ]}/. a-> .1,
{rp[τ],tp[τ]}/. a-> .3,
{rp[τ],tp[τ]}/. a-> .6,
{rp[τ],tp[τ]}/. a-> 1,
{rp[τ],tp[τ]}/. a-> 1.5,
{rp[τ],tp[τ]}/. a-> 3,
{rp[τ],tp[τ]}/. a-> 15,
{rp[τ],tp[τ]}/. a-> -.1,
{rp[τ],tp[τ]}/. a-> -.3,
{rp[τ],tp[τ]}/. a-> -.6,
{rp[τ],tp[τ]}/. a-> -1,
{rp[τ],tp[τ]}/. a-> -1.5,
{rp[τ],tp[τ]}/. a->- 3,
{rp[τ],tp[τ]}/. a->- 15
},{τ,0,50},PlotRange->All];
Show[gboundary,gplot]

Metric Components

First u =  t - r ; v = t+r

Clear[t,r,tp,rp,u,v,up,vp,θ,ϕ]
t[u_,v_]:= (1/2) (v+u); r[u_,v_]:= (1/2)(v-u);
grt= (({{-1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, (r^2), 0}, {0, 0, 0, (r^2)((Sin[θ])^2)}}));
Λ = (({{(∂_u)t[u,v], (∂_v)t[u,v], 0, 0}, {(∂_u)r[u,v], (∂_v)r[u,v], 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}));
g= Λ\[Transpose].(grt/.r-> r[u,v]).Λ;
Print[
"(Subscript[g, μν])  = ",grt//MatrixForm," ,   ",
"(Subscript[g, μ' ν'])= ", g//MatrixForm," ,   ",
"(Subscript[(Λ^μ), μ']) = ",Λ //MatrixForm
]

Now u, v are the u’ = ArcTan[u], v’=ArcTan[v]

Clear[t,r,tp,rp,u,v,up,vp,θ,ϕ]
t[u_,v_]:= (1/2) (Tan[v]+Tan[u]); r[u_,v_]:= (1/2)(Tan[v]-Tan[u]);
grt= (({{-1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, (r^2), 0}, {0, 0, 0, (r^2)((Sin[θ])^2)}}));
Λ = (({{(∂_u)t[u,v], (∂_v)t[u,v], 0, 0}, {(∂_u)r[u,v], (∂_v)r[u,v], 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}));
g= Λ\[Transpose].(grt/.r-> r[u,v]).Λ;
Print[
"(Subscript[g, μν])  = ",grt//MatrixForm," ,   ",
"(Subscript[g, μ' ν'])= ", g//MatrixForm," ,   ",
"(Subscript[(Λ^μ), μ']) = ",Λ //MatrixForm
]

Now t = (1/2)(Tan[τ+ρ]+Tan[τ+ρ]),  r = (1/2)(Tan[τ+ρ]-Tan[τ-ρ])

Clear[t,r,tp,rp,u,v,up,vp,θ,ϕ,τ,ρ]
t[τ_,ρ_]:= (1/2) (Tan[τ+ρ]+Tan[τ-ρ]); r[τ_,ρ_]:= (1/2)(Tan[τ+ρ]-Tan[τ-ρ]);
grt= (({{-1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, (r^2), 0}, {0, 0, 0, (r^2)((Sin[θ])^2)}}));
Λ = (({{(∂_τ)t[τ,ρ], (∂_ρ)t[τ,ρ], 0, 0}, {(∂_τ)r[τ,ρ], (∂_ρ)r[τ,ρ], 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}))//Simplify;
g= Λ\[Transpose].(grt/.r-> r[τ,ρ]).Λ//Simplify;
Print[
"(Subscript[g, μν])  = ",grt//MatrixForm," ,   \n",
"(Subscript[g, μ' ν'])= ", g//MatrixForm," ,   \n",
"(Subscript[(Λ^μ), μ']) = ",Λ //MatrixForm
]

Figure out the conformal factor:

g ((Cos[ρ+τ])^2) ((Cos[ρ-τ])^2) //FullSimplify//MatrixForm

Cos[ρ+τ] Cos[ρ-τ]//TrigReduce

Sin[2 ρ]//TrigExpand

That gives us:
(ds^2)= (ω^(-2))(-((dτ)^2)+((dρ)^2)+(((sin(2ρ)/2))^2)(((dθ)^2)+(sin^2)((θdϕ)^2))), ω=cos(τ+ρ)cos(t-ρ)=(1/2)(cos(2τ)+cos(2ρ))
The metric d((OverTilde[s])^2)=-((dτ)^2)+((dρ)^2)+(((sin(2ρ)/2))^2)(((dθ)^2)+(sin^2)((θdϕ)^2)) is the metric on ℝ×(S^3), and
d((OverTilde[s])^2)=(ω^2)(ds^2)
conformally related, light cones are preserved.

Acknowledgements

This notebook has been programmed by Konstantinos Anagnostopoulos, Physics Department, National Technical University of Athens, Greece, while he was an instructor of the 4th year undergraduate course "General Relativity and Cosmology". It was created for fun, but it may turn out to be useful to everyone studying the General Theory of Relativity for the first time.
Email: konstant@mail.ntua.gr
Web:    http://physics.ntua.gr/konstant 
It is offered under a GPL/CC BY 4.0 license (in that order, depending on whether they apply on the programming part or the text part of the notebook).