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








( Mathematical software used: gnuplot )

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 )

Tuesday, November 4, 2014

Tic-Tac-Toe (井字遊戲)



Let f(a,b,x,y) = 1/exp(1/(a² - x²)²) + 1/exp(1/(a² - y²)²) - b

Equations:

Blue grid (#) ..... f(2, 0.999, x, y) = 0
Green nought (o) ..... f(0.125, 0.85, x, y) = 0
Red cross (x) ..... f(0.125, 0.999, 2(y+x), 2(y-x)) = 0


(Tessellations)


When the parameter 'a' changes from 0 to 2, the graph
changes shape from a plus sign(+) to a number sign(#).


In order to avoid discontinuities, we redefine f as follows:
f(a,b,x,y) = 1/exp(1/(s + (a² - x²)²)) + 1/exp(1/(s + (a² - y²)²)) - b,
where s(=0.001) is a small positive number.


Graph example:
  • Click here to download the example file (tic_tac_toe.zip).


( Mathematical software used: Graph )

Sunday, August 17, 2014

Spiral Inequality (螺旋不等式)

(1) Archimedean spiral





(2) Fermat's spiral (Parabolic spiral)





(3) Hyperbolic spiral (Reciprocal spiral)





(4) Lituus





(5) Logarithmic spiral





( Mathematical software used: gnuplot )

Sunday, August 10, 2014

Spiral Polyskelion

Spiral Types:


(1) Archimedean spiral: r(θ) = a*θ


(1 < number of spiral turns < 2)

(2 < number of spiral turns < 3)


(2) Fermat's spiral (Parabolic spiral): r(θ) = a*sqrt(θ)


(1 < number of spiral turns < 2)

(2 < number of spiral turns < 3)


(3) Hyperbolic spiral (Reciprocal spiral): r(θ) = a/θ




(4) Lituus: r(θ) = a/sqrt(θ)




(5) Logarithmic spiral: r(θ) = a*exp(b*θ)


(b = 0.25)

(b = 0.618)


( Mathematical software used: GeoGebra )