# 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)
begin
(1-4*t)/(t-2)+12
end_proc

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)
begin
if
x^2 + y^2 > 3.4
then
h(x^2+y^2)
else
end_if
end_proc

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

h(3.4)

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(
plot::Function3d(f, x = -6 .. 6, y = -6 .. 6, Submesh = [3, 3]),
ViewingBox = [Automatic, Automatic, 3 .. 8],
Scaling = Constrained)

## January 29, 2013

Filed under: Linh Tinh — Tags: — Ngô Quốc Anh @ 5:37

I found this interesting note regarding to Matlab. In that note, they plotted the word HI using Matlab. Here I try to use MuPAD in order to get a slightly better picture.

As mentioned in the note, the full function we need to use is $\displaystyle e^{-x^2-\frac{1}{2}y^2} \cos(4x) + e^{-3\big( (x+\frac{1}{2})^2+\frac{1}{2}y^2 \big)}.$

If you plot that full function, what you are going to have is the following picture ## November 5, 2011

Filed under: Giải Tích 2, Giải Tích 5, Liên Kết — Tags: — Ngô Quốc Anh @ 0:26

This is not mathematics. I just found an equation so that we can draw a heart in 3D. Indeed, the following equation $\displaystyle {\left( {{x^2} + \frac{9}{4}{y^2} + {z^2} - 1} \right)^3} - {x^2}{z^3} - \frac{9}{{80}}{y^2}{z^3} = 0$

will generate a heart. I have tried and the following pictures show that fact.

## September 10, 2010

### MuPAD: Drawing a surface with a line on

Filed under: Uncategorized — Tags: — Ngô Quốc Anh @ 14:21

I took me years to figure out how did we plot such a picture in this entry. Thanks to MuPAD, we can do it quite easily. What I got is the following Firstly, we need to choose a function which has a mountain-pass shape. Thank to a special solution to the Toda system considered in this entry, we can choose $\displaystyle u(z) = \log \frac{{4\left( {1 + 4{{\left| z \right|}^2} + {{\left| {{z^2} + 2z} \right|}^2}} \right)}}{{{{\left( {1 + {{\left| {z + 1} \right|}^2} + {{\left| {{z^2}} \right|}^2}} \right)}^2}}}, \quad z \in \mathbb R^2$.

## December 2, 2009

Filed under: Linh Tinh — Tags: — Ngô Quốc Anh @ 22:21

MuPAD was a Computer algebra system (CAS). Originally developed by the MuPAD research group at the University of Paderborn, Germany, it was developed by the company SciFace Software GmbH & Co. KG in cooperation with the MuPAD research group and partners from some other universities since 1997.

I found MuPAD a very cool tool for plotting graph of functions. I will show you in details some examples. $f(x,y)=-(x^2+y^2)(\cos (3y) + \sin (7y))$.
f := plot::Function3d(exp(-x^2-y^2)*(cos(3*y)+sin(7*x)), x=-2..2, y=-2..2, Submesh=[1,1], FillColorFunction=((x, y, z) -> [(z+2)/4, 0.5, (2-z)/4])): plot(f) 