Showing posts with label Interlace. Show all posts
Showing posts with label Interlace. Show all posts

Wednesday, December 14, 2016

Five Interlaced Moons

Five Interlaced Crescents


Generalization:

Let A and B be two disks with radii a and b.
The set difference A\B is used to plot the moons 
in the following animations.


Animation parameter: the position of B


Animation parameter: b (the radius of B)


Animation parameter: the position of A


Animation parameter: a (the radius of A)


( Mathematical softwares used: gnuplot, GeoGebra )

Four Interlaced Crescents



A cross pattée!







( Mathematical softwares used: Graph, gnuplot )


Related posts:

Triple Crescent Moon

Triple Crescent Moon Symbol
(Boundary curves: circles)


Boundary curves: superellipses with exponent 2.5


Boundary curves: superellipses with exponent 4


A monster face!


Hi!


Exponents: 1.5, 2, 2.5, 3, 3.5, 4


( Mathematical software used: gnuplot )

Sunday, August 7, 2016

How to Draw the Olympic Rings Mathematically?


Inequalities (Relations) for the Olympic Rings:

  1. (Blue Ring)  min(max(R1(x,y), -y), max(R1(x,y), y, -R4(x,y))) < 0
  2. (Black Ring)  min(max(R2(x,y), -y, -R4(x,y)), max(R2(x,y), y, -R5(x,y))) < 0
  3. (Red Ring)  min(max(R3(x,y), -y, -R5(x,y)), max(R3(x,y), y)) < 0
  4. (Yellow Ring)  min(max(R4(x,y), -y, -R1(x,y)), max(R4(x,y), y, -R2(x,y))) < 0
  5. (Green Ring)  min(max(R5(x,y), -y, -R2(x,y)), max(R5(x,y), y, -R3(x,y))) < 0

Functions:
  • R1(x,y) = (sqrt((x+2d)² + (y-h)²) - a)² - b²
  • R2(x,y) = (sqrt(x² + (y-h)²) - a)² - b²
  • R3(x,y) = (sqrt((x-2d)² + (y-h)²) - a)² - b²
  • R4(x,y) = (sqrt((x+d)² + (y+h)²) - a)² - b²
  • R5(x,y) = (sqrt((x-d)² + (y+h)²) - a)² - b²

Constants:
  • a = 49.25
  • b = 4.75
  • d = 58.5
  • h = 25

Download Examples:


( Mathematical softwares used: Graph, gnuplot )

Wednesday, June 22, 2016

Folding Star Polygons using Equations (用方程式摺星形多邊形)

Regular star polygon {8/3}


Regular star polygon {12/4}


Regular star polygon {12/5}


Regular star polygon {10/4}


Regular star polygon {15/6}


( Mathematical softwares used: Graph, gnuplot )


Related posts:

Friday, June 17, 2016

Folding Stars using Equations (用方程式摺星星)














Example 1.

(n = 5, ratio = 1)

gnuplot script 1:


n = 5
ratio = 1.0
A = 2*pi/n
c = 2*cos(A)
d = ratio*c*(1 - cos(A))/(1 + cos(A))
max(x,y) = x < y ? y : x
f1(x,y) = max(max(abs(y - c) - d, y*cos(A) - x*sin(A) - c/cos(A)), \
   max(d - abs(y*cos(A) - x*sin(A) - c), y*cos(3*A) - x*sin(3*A) - c + d))
f2(x,y) = f1(y*sin(A) + x*cos(A), y*cos(A) - x*sin(A))
f3(x,y) = f1(y*sin(2*A) + x*cos(2*A), y*cos(2*A) - x*sin(2*A))
f4(x,y) = f1(y*sin(3*A) + x*cos(3*A), y*cos(3*A) - x*sin(3*A))
f5(x,y) = f1(y*sin(4*A) + x*cos(4*A), y*cos(4*A) - x*sin(4*A))
set xrange [-2.5:2.5]
set yrange [-2.5:2.5]
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 'f1.dat'
splot f1(x,y)
unset table
set table 'f2.dat'
splot f2(x,y)
unset table
set table 'f3.dat'
splot f3(x,y)
unset table
set table 'f4.dat'
splot f4(x,y)
unset table
set table 'f5.dat'
splot f5(x,y)
unset table
plot 'f1.dat' w l lw 2 lc rgb "#0099ff", \
       'f2.dat' w l lw 2 lc rgb "#0099ff", \
       'f3.dat' w l lw 2 lc rgb "#0099ff", \
       'f4.dat' w l lw 2 lc rgb "#0099ff", \
       'f5.dat' w l lw 2 lc rgb "#0099ff"


Example 2.

(n = 6, ratio = 1)

gnuplot script 2:


n = 6
ratio = 1.0
A = 2*pi/n
c = 1
d = ratio*c/3
max(x,y) = x < y ? y : x
f1(x,y) = max(max(abs(y - c) - d, y - sqrt(3)*x - 4*c), \
   max(d - abs(y*cos(A) - x*sin(A) - c), y*cos(4*A) - x*sin(4*A) - c + d))
f2(x,y) = f1(y*sin(A) + x*cos(A), y*cos(A) - x*sin(A))
f3(x,y) = f1(y*sin(2*A) + x*cos(2*A), y*cos(2*A) - x*sin(2*A))
f4(x,y) = f1(y*sin(3*A) + x*cos(3*A), y*cos(3*A) - x*sin(3*A))
f5(x,y) = f1(y*sin(4*A) + x*cos(4*A), y*cos(4*A) - x*sin(4*A))
f6(x,y) = f1(y*sin(5*A) + x*cos(5*A), y*cos(5*A) - x*sin(5*A))
set xrange [-2.5:2.5]
set yrange [-2.5:2.5]
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 'f1.dat'
splot f1(x,y)
unset table
set table 'f2.dat'
splot f2(x,y)
unset table
set table 'f3.dat'
splot f3(x,y)
unset table
set table 'f4.dat'
splot f4(x,y)
unset table
set table 'f5.dat'
splot f5(x,y)
unset table
set table 'f6.dat'
splot f6(x,y)
unset table
plot 'f1.dat' w l lw 2 lc rgb "#0099ff", \
       'f2.dat' w l lw 2 lc rgb "#0099ff", \
       'f3.dat' w l lw 2 lc rgb "#0099ff", \
       'f4.dat' w l lw 2 lc rgb "#0099ff", \
       'f5.dat' w l lw 2 lc rgb "#0099ff", \
       'f6.dat' w l lw 2 lc rgb "#0099ff"


Example 3.

(n = 8, ratio = 1)

Download Graph files:



( Mathematical softwares used: Graph, gnuplot )


Related posts: