Created
November 4, 2019 04:08
-
-
Save MetroWind/0b379d58b487e6e3ae4e731768c34f9e to your computer and use it in GitHub Desktop.
Cover for statistical mechanics
This file contains hidden or 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
unitsize(2mm); | |
srand(101); | |
real Width = 100.0; | |
real Height = 133.04; | |
real ColorOffset = 0.3; | |
path BBox = (0,0)--(Width, 0)--(Width, Height)--(0, Height)--cycle; | |
path BAR = scale(0.1*Width, 0.7*Width) * shift(-0.5, -0.5) * unitsquare; | |
real random(real lower, real upper); | |
random = new real(real lower, real upper) | |
{ | |
return unitrand() * (upper - lower) + lower; | |
}; | |
for(int i = 0; i < 150; ++i) | |
{ | |
path Bar = shift(random(0, Width), random(0, Height)) * rotate(70) * BAR; | |
filldraw(Bar, rgb(random(ColorOffset, 1), random(ColorOffset, 1), random(ColorOffset, 1)), | |
linewidth(5) + white); | |
} | |
usepackage("fontspec"); | |
usepackage("xunicode"); | |
usepackage("xltxtra"); | |
texpreamble("\setmainfont{Palatino LT Std}"); | |
Label L = Label("{\bf Statistical Mechanics}"); | |
path[] Ls = texpath(L); | |
filldraw(shift(Width / 2, Height * 0.6) * rotate(-20) * scale(0.8) * Ls, rgb(0.1, 0.2, 0.21), linewidth(1) + white); | |
// label(rotate(-20) * scale(4) * L, (Width / 2, Height * 0.6)); | |
clip(BBox); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment