The Olympic and Paralympic Games will be held in Tokyo in the summer of 2020. The emblems for them are shown below:
There is the explanation of these emblems on the official page.
Composed of three varieties of rectangular shapes, the design represents different countries, cultures and ways of thinking.It incorporates the message of "unity in diversity".It also expresses that the Olympic and Paralympic Games seek to promote diversity as a platform to connect the world.
And I have heard that someone who examined a rule in the emblem told that three rectangles that are inscribed in a small regular 12 polygon(dodecagon) is placed around a large regular 24 polygon(icositetragon). I would like to confirm this with Mathematica.
Three rectangles are below.
eBlue = CMYKColor[1, .8, 0, .5]; (*emblem Blue*)
n = 12;
{rp, cp} = {RegularPolygon[n], CirclePoints[n]};
{rpx, cpx} = {RegularPolygon[{1, 0}, n],
CirclePoints[{1, 0}, n]}; Grid[{{"small", "middle",
"large"}, {Graphics[{EdgeForm[Directive[Thin, Gray]], White, rp,
eBlue, Rectangle[cp[[10]], cp[[4]]]}],
Graphics[{EdgeForm[Directive[Thin, Gray]], White, rpx, eBlue,
Rectangle[cpx[[8]], cpx[[2]]]}],
Graphics[{EdgeForm[Directive[Thin, Gray]], White, rp, eBlue,
Rectangle[cp[[11]], cp[[5]]]}]}}, Frame -> All]
Olympic Emblem
Define colors and rotation angles to be used after this.
oBlue = CMYKColor[1, .37, 0, 0];
oYellow = CMYKColor[0, .34, .91, 0];
oGreen = CMYKColor[1, 0, 1, 0];
oRed = CMYKColor[0, 0.94, 0.65, 0];
angle = Table[i*2 Pi/24, {i, 0, 24}];
Import an emblem and find the corners.
SetDirectory[NotebookDirectory[]];
emblem = Import["Tokyo_2020_Olympics_emblem.png"];
pad = 120;
i = ImagePad[emblem, pad, Transparent];
isize = (i // ImageDimensions);
pts = Sort@ImageCorners[i, 2, .001];
HighlightImage[i, pts]
Number the corners and display them.
ListPlot[pts -> ToString /@ Range[Length@pts],
LabelingFunction -> Above, Axes -> False, AspectRatio -> 1]
Find the radius and center of the regular 24 polygon that surrounds the emblem. Then, try composing the emblem and the regular 24 polygon.
radius24 = EuclideanDistance[pts[[1]], pts[[-1]]]/2;
c = (pts[[1]] + pts[[-1]])/2;
tmp = ImageCrop@
Graphics[{EdgeForm[Directive[Thick, oBlue]], Transparent,
RegularPolygon[c, radius24, 24]},
ImageSize -> isize - 2 pad];
rp24 = ImageResize[ImagePad[tmp, pad, White], isize];
ImageCompose[rp24, i]
Finds the radius and vertex of a regular dodecagon based on the size of a regular 24 polygon.
radius12 = EuclideanDistance[pts[[1]], pts[[4]]]/2;
p = CirclePoints[c, radius12, 12];
Defines a function that fits a rectangle inscribed in a regular dodecagon to a rectangle in the emblem.
fit[f1_, f2_, t1_, t2_, col_] := Module[{dis, deg, rec, rp12x, grp12},
dis = t1 - f1;(*move*)
deg = PlanarAngle[{0, 0} -> {f2 - f1, t2 - t1}, "Counterclockwise"];
deg = First@Nearest[angle, deg, 1];(*Angle correction*)
rec = Rotate[Rectangle[f1 + dis, f2 + dis], deg, t1];(*rotate*)
rp12x = Rotate[RegularPolygon[c + dis, radius12, 12], deg, t1];
grp12 = ImageResize[ImageCrop@Graphics[{
PointSize[.005], Gray, Point[{0, 0}],
Point[isize],(*Set markers in the lower left and upper right*)
eBlue, rec,
EdgeForm[Directive[Thick, col]], Transparent, rp12x
}, ImageSize -> isize], isize]
]
Place small and large rectangles.
s1 = fit[p[[10]], p[[4]], pts[[57]], pts[[70]], oYellow];
s2 = fit[p[[10]], p[[4]], pts[[34]], pts[[43]], oYellow];
s3 = fit[p[[10]], p[[4]], pts[[33]], pts[[49]], oYellow];
s4 = fit[p[[10]], p[[4]], pts[[3]], pts[[2]], oYellow];
s5 = fit[p[[10]], p[[4]], pts[[21]], pts[[4]], oYellow];
s6 = fit[p[[10]], p[[4]], pts[[27]], pts[[9]], oYellow];
l1 = fit[p[[11]], p[[5]], pts[[59]], pts[[69]], oGreen];
l2 = fit[p[[11]], p[[5]], pts[[36]], pts[[48]], oGreen];
l3 = fit[p[[11]], p[[5]], pts[[12]], pts[[18]], oGreen];
ImageMultiply[rp24, s1, s2, s3, s4, s5, s6, l1, l2, l3]
Place the remaining middle rectangles.
px = CirclePoints[c, {radius12, 0}, 12];
m1 = fit[px[[8]], px[[2]], pts[[49]], pts[[57]], oRed];
m2 = fit[px[[8]], px[[2]], pts[[48]], pts[[59]], oRed];
m3 = fit[px[[8]], px[[2]], pts[[18]], pts[[33]], oRed];
m4 = fit[px[[8]], px[[2]], pts[[38]], pts[[24]], oRed];
m5 = fit[px[[8]], px[[2]], pts[[20]], pts[[3]], oRed];
m6 = fit[px[[8]], px[[2]], pts[[21]], pts[[37]], oRed];
olym = ImageMultiply[rp24, s1, s2, s3, s4, s5, s6, l1, l2, l3, m1, m2,
m3, m4, m5, m6]
Now that we have a third of the emplem, rotate it 120 and 240 degrees to complete the emplem.
ImageMultiply[olym,
ImageRotate[olym, 2 Pi/3, Full, Masking -> Full, Padding -> White],
ImageRotate[olym, 4 Pi/3, Full, Masking -> Full, Padding -> White]]
This emblem is made up of 45 rectangles of 15 types that are rotated based on 3 types of rectangles.
list = {s1, s2, s3, s4, s5, s6, l1, l2, l3, m1, m2, m3, m4, m5, m6};
imgs = Join[list,
ImageRotate[#, 2 Pi/3, Full, Masking -> Full, Padding -> White] & /@
list, ImageRotate[#, 4 Pi/3, Full, Masking -> Full,
Padding -> White] & /@ list];
imgs = Join[list,
ImageRotate[#, 2 Pi/3, Masking -> Full, Padding -> White] & /@
list, ImageRotate[#, 4 Pi/3, Masking -> Full,
Padding -> White] & /@ list];
olymparts =
ImageCrop@ImageCrop[#, 0.99*(# // ImageDimensions)] & /@ imgs;
c = ClusterClassify[olymparts, 15];
olymparts = GatherBy[olymparts, c];
Grid[Prepend[
Map[ImageResize[#, 50] &,
olymparts[[{2, 12, 3, 4, 5, 1, 13, 6, 7, 14, 15, 10, 11, 9,
8}]], {2}], {"parts of Olympic emblem", SpanFromLeft,
SpanFromLeft}], Frame -> All]
Paralympic Emblem
Repeat the same for the Paralympic emblem.
STEP 1 Import an emblem and find the corners.
SetDirectory[NotebookDirectory[]];
emblem = Import["Tokyo_2020_Paralympics_emblem.png"];
pad = 120;
i = ImagePad[emblem, pad, Transparent];
isize = (i // ImageDimensions);
pts = Sort@ImageCorners[i, 2, .001];
HighlightImage[i, pts]
Number the corners and display them.
ListPlot[pts -> ToString /@ Range[Length@pts],
LabelingFunction -> Above, Axes -> False, AspectRatio -> 1]
Find the radius and center of the regular 24 polygon that surrounds the emblem. Then, try composing the emblem and the regular 24 polygon.
radius24 = EuclideanDistance[pts[[1]], pts[[-1]]]/2;
c = (pts[[1]] + pts[[-1]])/2;
tmp = ImageCrop@
Graphics[{EdgeForm[Directive[Thick, oBlue]], Transparent,
RegularPolygon[c, radius24, 24]},
ImageSize -> isize - 2 pad];
rp24 = ImageResize[ImagePad[tmp, pad, White], isize];
ImageCompose[rp24, i]
Finds the radius and vertex of a regular dodecagon based on the size of a regular 24 polygon.
radius24 = EuclideanDistance[pts[[1]], pts[[-1]]]/2;
c = (pts[[1]] + pts[[-1]])/2;
radius12 = EuclideanDistance[pts[[1]], pts[[4]]]/2;
p = CirclePoints[c, radius12, 12];
px = CirclePoints[c, {radius12, 0}, 12];
Place all rectangles.
s1 = fit[p[[10]], p[[4]], pts[[30]], pts[[39]], oYellow]; s2 =
fit[p[[10]], p[[4]], pts[[8]], pts[[13]], oYellow];
s3 = fit[p[[10]], p[[4]], pts[[3]], pts[[2]], oYellow];
s4 = fit[p[[10]], p[[4]], pts[[14]], pts[[5]], oYellow];
s5 = fit[p[[10]], p[[4]], pts[[25]], pts[[47]], oYellow];
s6 = fit[p[[10]], p[[4]], pts[[47]], pts[[61]], oYellow];
s7 = fit[p[[10]], p[[4]], pts[[53]], pts[[65]], oYellow];
s8 = fit[p[[10]], p[[4]], pts[[64]], pts[[66]], oYellow];(*later*)
s9 = fit[p[[10]], p[[4]], pts[[42]], pts[[59]], oYellow];
s10 = fit[p[[10]], p[[4]], pts[[57]], pts[[72]], oYellow];(*later*)
l1 = fit[p[[11]], p[[5]], pts[[19]], pts[[32]], oGreen];
l2 = fit[p[[11]], p[[5]], pts[[10]], pts[[23]], oGreen];
l3 = fit[p[[11]], p[[5]], pts[[22]], pts[[29]], oGreen];
l4 = fit[p[[11]], p[[5]], pts[[44]], pts[[51]], oGreen];
l5 = fit[p[[11]], p[[5]], pts[[63]], pts[[70]], oGreen]; (*later*)
m1 = fit[px[[8]], px[[2]], pts[[21]], pts[[30]], oRed];
m2 = fit[px[[8]], px[[2]], pts[[12]], pts[[8]], oRed];
m3 = fit[px[[8]], px[[2]], pts[[18]], pts[[3]], oRed];
m4 = fit[px[[8]], px[[2]], pts[[35]], pts[[14]], oRed];
m5 = fit[px[[8]], px[[2]], pts[[23]], pts[[46]], oRed];
m6 = fit[px[[8]], px[[2]], pts[[29]], pts[[42]], oRed];
m7 = fit[px[[8]], px[[2]], pts[[51]], pts[[57]], oRed];
m8 = fit[px[[8]], px[[2]], pts[[35]], pts[[53]], oRed];
m9 = fit[px[[8]], px[[2]], pts[[52]], pts[[64]], oRed];
para = ImageMultiply[rp24, s1, s2, s3, s4, s5, s6, s7, s9, l1, l2, l3,
l4, m1, m2, m3, m4, m5, m6, m7, m8, m9]
Now that you have a half of the emblem, reflect it and add three rectangles in the middle to complete the emblem.
ImageMultiply[para, s8, s10, l5, ImageReflect[para, Left]]
This emblem is made up of 45 rectangles of 15 types that are rotated based on 3 types of rectangles.
list = {s1, s2, s3, s4, s5, s6, s7, s9, l1, l2, l3, l4, m1, m2, m3,
m4, m5, m6, m7, m8, m9};
paraimgs = Join[list, ImageReflect[#, Left] & /@ list, {s8, s10, l5}];
paraparts =
ImageCrop@ImageCrop[#, 0.99*(# // ImageDimensions)] & /@ paraimgs;
c = ClusterClassify[paraparts, 15];
paraparts = GatherBy[paraparts, c];
The Olympic emblem and the Paralympic emblem are made of the same 45 rectangles!
{Grid[Prepend[
Map[ImageResize[#, 50] &,
olymparts[[{2, 12, 3, 4, 5, 1, 13, 6, 7, 14, 15, 10, 11, 9,
8}]], {2}], {"parts of Olympic emblem", SpanFromLeft,
SpanFromLeft}], Frame -> All],
Grid[Prepend[
Map[ImageResize[#, 50] &, paraparts, {2}], {"parts of Paralympic",
SpanFromLeft, SpanFromLeft}], Frame -> All]}
I am looking forward to Tokyo 2020. Before that, I will enjoy the Rugby World Cup 2019 in Japan this September.