Last active
April 7, 2020 14:16
-
-
Save oganm/c29b02d3b49ae15941c278b4788bade6 to your computer and use it in GitHub Desktop.
flagCoords
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source https://en.wikipedia.org/wiki/Flag_of_Turkey | |
# suggested width for narrow images | |
coverWidth = 590 | |
starOverlap = 2/5-1/3 | |
# approximate and arbitrary | |
G = coverWidth* (4/3 - starOverlap) | |
# height and width of big (white) circle | |
bigR = round(G/2) | |
# height and width of small (red) circle | |
smallR = round(2*G/5) | |
# diameter of circle around the star | |
starR = (G/4) | |
# width and height of the star icon | |
starWidth = round((starR/2)/0.525731) | |
starHeight = round(starWidth*cos(18*pi/180)) | |
bigSmallDelta = round(G/16) | |
# x coordinates of objects | |
bigX = coverWidth/2-bigR | |
smallX = bigX + bigSmallDelta | |
starSmallDelta = (2*G/10) - (2*G/5 - G/3) + starHeight/2 | |
starX = round(smallX + starSmallDelta) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment