Sunday, August 21, 2016

Tiling using Rounded Crosses















( Mathematical software used: Graph )


Related posts:

Wednesday, August 17, 2016

Rounded Cross - cross with rounded corners (圓角十字形)



gnuplot script:

a = 2
b = 1
c = 1
w = 8
max(x,y) = x < y ? y : x
min(x,y) = x < y ? x : y
fun(x,y) = \
  min(min(max(abs(x)-b,0)**2 + max(abs(y)-(a+b+2*c),0)**2 - c**2, \
  max(abs(x)-(a+b+2*c),0)**2 + max(abs(y)-b,0)**2 - c**2), \
  max((abs(x)-(b+c))**2 + (abs(y)-(b+c))**2 - c**2, \
  c**2 - (abs(x)-(b+2*c))**2 - (abs(y)-(b+2*c))**2))
set xrange [-w:w]
set yrange [-w:w]
set size ratio -1
set samples 512
set isosamples 512
set contour base
set cntrparam levels discrete 0.0
unset key
unset surface
set table 'fun.dat'
splot fun(x,y)
unset table
plot 'fun.dat' w l lw 1.5 lc rgb "red"

(a = 2, b = 1, c = 1)


(a = 4, b = 0.5, c = 0.5)


(a = 0, b = 0, c = 2)


(a = 0, b = 2, c = 4/3)


(a = 2, b = 0, c = 4/3)


( Mathematical softwares used: Graph, gnuplot )


Related posts:

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 )