Sunday, May 29, 2016

Head of a Little Girl - using the real part of a complex function





Consider the polar equation

    r³ - 3r + a = sin³θ  (where a is a fixed number, 1.7 ≦ a ≦ 1.8).

First, we plot the polar equation by plotting the equivalent rectangular equation(s).
The graph (See Image 1) consists of two disjoint closed curves, and the inner curve
looks like a little girl's hair!


Second, since the equation is a cubic equation in the variable r, we can solve it
for r in terms of θ, and plot the three solution functions r = r1(θ), r = r2(θ) and
r = r3(θ) (See Image 2). Note that the union of their graphs is the same as the
graph of the polar equation.


Finally, replace r3(θ) with its real part Re(r3(θ)) and plot again (See Image 3).
We see that the union of the graphs of r = r1(θ) and r = Re(r3(θ)) looks like
a little girl's head!



Image 1 -- Graph of
the polar equation r³ - 3r + a = sin³θ



Image 2 -- Graphs of
r = r1(θ)r = r2(θ)r = r3(θ)  (r∈R, 0≦θ≦2π)



Image 3 -- Graphs of
r = r1(θ)r = r2(θ)r = Re(r3(θ))  (r∈R, 0≦θ≦2π)



gnuplot script for image 1:

reset
a = 1.8
fun1(x,y) = (x**2 + y**2 - 3)*(x**2 + y**2)**2 \
    + a*(x**2 + y**2)*sqrt(x**2 + y**2) - y**3
fun2(x,y) = (x**2 + y**2 - 3)*(x**2 + y**2)**2 \
    - a*(x**2 + y**2)*sqrt(x**2 + y**2) - y**3
set xrange [-2.25:2.25]
set yrange [-2.25:2.25]
set size ratio -1
set samples 256
set isosamples 256
set contour base
set cntrparam levels discrete 0.0
unset key
unset surface
set table 'fun1.dat'
splot fun1(x,y)
unset table
set table 'fun2.dat'
splot fun2(x,y)
unset table
plot 'fun1.dat' w l lw 2 lc rgb "red", \
       'fun2.dat' w l lw 2 lc rgb "green"



gnuplot script for image 2:

reset
a = 1.8
h(t) = (sin(t)**3 - a + sqrt((sin(t)**3 - a)**2 - 4))**(1.0/3)
s = 2**(1.0/3)
p = (-0.5)*(1 + sqrt(3)*{0,1})
q = (-0.5)*(1 - sqrt(3)*{0,1})
r1(t) = s/h(t) + h(t)/s
r2(t) = p*s/h(t) + q*h(t)/s
r3(t) = q*s/h(t) + p*h(t)/s
set xrange [-2.25:2.25]
set yrange [-2.25:2.25]
set size ratio -1
set samples 4000
set polar
unset key
unset raxis
unset rtics
plot r1(t) w l lw 2 lc rgb "#0099ff", \
       r2(t) w l lw 2 lc rgb "green", \
       r3(t) w l lw 2 lc rgb "#ff00ff"



gnuplot script for image 3:

The script is the same as that of (2), except the last line:

       real(r3(t)) w l lw 2 lc rgb "#ff00ff"



Graph exampleHead of a Little Girl




( Mathematical softwares used: Graph, gnuplot )

Alien Children

The main equation is a branch of the polar equation
r³ - 3r = a(sinθ - abs(cosθ)), where a = 1.4

Its rectangular equation is
(x² + y² - 3)(x² + y²) = 1.4(y - abs(x))



The main equation is a branch of the polar equation
r³ - 3r + 3 = a(e^sinθ + abs(sinθ)^e), where a = 1.45

Its rectangular equation is
(x² + y² - 3) sqrt(x² + y²) + 3
= 1.45(e^(y/sqrt(x² + y²)) + abs(y/sqrt(x² + y²))^e)



( Mathematical software used: gnuplot )

Sunday, May 22, 2016

Swastika (卍)


Equation:

(196x² + y² - 1) × (196y² + x² - 1)
× (49x² + 98x + y² + y + 49) × (49x² + 98x + y² - y + 49)
× (49y² - 98y + x² + x + 49) × (49y² - 98y + x² - x + 49)
= 100000000


Note:

The swastika here is an ancient Buddhist symbol, not the Nazi one.
It means good luck, auspiciousness, well-being, and prosperity.

The pronunciation of the character 卍 (wàn) in Chinese is the same
as that of the character 萬 or 万 (means 10,000 or ten thousand).

Rewrite the above equation as

[4(7x)² + y² - 1] × [4(7y)² + x² - 1]
× [(7x)² + 2(7²x) + y² + y + 7²] × [(7x)² + 2(7²x) + y² - y + 7²]
× [(7x)² - 2(7²y) + x² + x + 7²] × [(7x)² - 2(7²y) + x² - x + 7²]
= 10000²,

we see that it is really an equation for good luck.
(It uses the lucky number 7 to produce good luck!)








( Mathematical software used: gnuplot )


Related posts:

Sunday, May 15, 2016

Cat Girl



Equations:

Contour lines:
(16*x^4 + y^4 - 16*x^2*y - 0.1) * (x^2 + (y - 0.5)^2 - 1) = 0.25
(16*x^4 + y^4 - 16*x^2*y - 0.1) * (x^2 + (y - 0.5)^2 - 1) = -2.5

Eyes:
(abs(x) - 0.5)^2 + (y - 0.75)^2 = 0.25^2

Pupils:
(abs(x) - 0.5)^2 + (y - 0.7)^2 = 0.06^2

Nose:
x^2 + 0.75*(y - 0.1)^2 = 0.1^2

Mouth:
x^2 + 8*(y + 0.25)^2 = 0.1^2

Whiskers:
y = sign(x)*(x - 0.55*asin(x)) - 0.025
y = sign(x)*(0.9*x - 0.8*asin(0.9*x)) - 0.025
y = sign(x)*(1.2*x - 1.1*asin(1.2*x)) - 0.025




( Mathematical software used: Graph, GeoGebra )