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 )

No comments:

Post a Comment