Ngô Quốc Anh

June 14, 2013

MuPAD: Drawing asymptotically flat spacetime

Filed under: Linh Tinh — Tags: — Ngô Quốc Anh @ 23:06

Today, I will show how to draw an asymptotically flat spacetime with two ends using MuPad. To draw ends, we use hyperbolic functions.

First, we talk about the end. The function that I am going to use is h(t)=\frac{1-4t}{t-2}+12. It is clear that h blow up at t=2 and approaches -4 at infinity. To use h, we use the following

h := proc(t)

I have added 12 to the function h so that h approaches 8 at infinity. Then to draw the (upper) end, I use the following function

f := proc(x, y)
    x^2 + y^2 > 3.4 

I have used the number 3.4 because I do not want my end is too tall, keep in mind that 2 is the blow-up number. We can calculate


to see that this number is nothing but 3 which is close to 1 as I need. We are now able to draw the first end using the following

     plot::Function3d(f, x = -6 .. 6, y = -6 .. 6, Submesh = [3, 3]),
     ViewingBox = [Automatic, Automatic, 3 .. 8], 
     Scaling = Constrained)

What we obtain is the following pictureEnd of AFS

By using the negative of f, i.e. -f, we can draw the lower end as follows

plot(plot::Function3d(f, x = -6 .. 6, y = -6 .. 6, Submesh = [3, 3]),
     plot::Function3d(-f, x = -6 .. 6, y = -6 .. 6, Submesh = [3, 3]),
     ViewingBox = [Automatic, Automatic, -8 .. 8], 
     Scaling = Constrained)

We obtain the following picture.

Two Ends of AFSThe only thing left is to draw the “compact set” of the spacetime. In order to make the whole smooth, I need to know the tangent line at the point 3.4 of the function h. I use


To draw the upper half compact core, I use an ellipse of the form \frac{x^2}{a^2}+\frac{y^2}{b^2}=1 for some a,b>0.

Suppose a \in (0,2) and b>0, let us consider the function

\displaystyle y=b\sqrt{\frac{x^2}{a^2}-1}.

By solving y=3, we find that

\displaystyle x = a \sqrt{\frac{9}{b^2}+1}.


\displaystyle y'=\frac{bt}{a^2\sqrt{\frac{t^2}{a^2}-1}}

we know that

\displaystyle y'(\sqrt{\frac{17}{5}})=\sqrt{\frac{17}{5}}\frac{b}{a^2\sqrt{\frac{17}{5a^2}-1}}.

Therefore, the condition y'(\sqrt{\frac{17}{5}})=287.304 gives

\displaystyle b=155.812a^2 \sqrt{\frac{17}{5a^2}-1} .

Using a=\sqrt 2, we obtain b=260.724.

In this case, we can also use a cylinder via

plot::Surface([sqrt(3.4)*cos(v), sqrt(3.4)*sin(v), u], u = -3 .. 3, v = 0 .. 2*PI)

Eventually, this is what we have


Note that in the above picture, I have used the point 2.5 instead of the point 3.4.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at

%d bloggers like this: