I would like to know: how can I construct minimalist images like this one?
Asked
Active
Viewed 897 times
10
-
1If you want to fully reproduce the image including the drop shadow, check out the following post: How can I add drop shadows and specular highlights to 2D graphics? – C. E. Mar 06 '21 at 10:36
2 Answers
21
Graphics[{Disk[{0, 0}, 1, {0, Pi}],
{Dashing[Riffle[RandomReal[.1, 25], RandomReal[.02, 25]]],
HalfLine[{{0, 0}, Through[{Cos, Sin}@#]}]} & /@ Subdivide[0, Pi, 50]},
PlotRange -> {{-3/2, 3/2}, {0, 4}},
Axes -> {True, False},
AxesStyle -> Directive[Thick, Black],
Ticks -> None]
raylengths = {2, 10};
Graphics[{Disk[{0, 0}, 1, {0, Pi}],
{Dashing[Riffle[RandomReal[.1, 25], RandomReal[.02, 25]]],
Line[{{0, 0}, (Last[raylengths = RotateLeft[raylengths]] /.
2 -> RandomReal[{2, 3}]) Through[{Cos, Sin}@#]}]} & /@
Subdivide[0, Pi, 60]},
PlotRange -> {{-3/2, 3/2}, {0, 4}},
Axes -> {True, False},
AxesStyle -> Directive[Thick, Black],
Ticks -> None]
Show[LinearGradientImage[{Bottom, Top} -> "SolarColors", {300, 400}],
Epilog -> {Black,
{Dashing[Riffle[RandomReal[{.01, .1}, 25], RandomReal[.02, 25]]],
HalfLine[{{150, 0}, {300, 400} Through[{Cos, Sin}@#]}]} & /@
Subdivide[0, Pi, 50],
Disk[Scaled[{.5, 0}], 100, {0, Pi}]}]
kglr
- 394,356
- 18
- 477
- 896
-
1Since the color of the sun is inverted, also the background should be inverted ;) – yarchik Mar 06 '21 at 12:15
-
1Weirdly enough,
Axesseems to produce artifacts on export, both in the form of a white line underneath the horizon, and a jump down in thickness at each corner. For this reason I'd recommend using something like{Thickness[0.015], InfiniteLine[{{-1,0},{1,0}}]}instead! – thorimur Mar 11 '21 at 00:36 -
5
Something like:
n = 50;
rays = Table[{Dashing[Flatten@Table[{RandomReal[.2], .01}, {10}]],
, Line[{{0, 0},
If[EvenQ[n ph/Pi], 2, RandomReal[{0.2, 0.9}]] {Sin[ph],
Cos[ph]}}]}, {ph, 0, 2 Pi, Pi/n}];
Graphics[{
Disk[{0, 0}, 0.3], rays
}, PlotRange -> {{-.6, .6}, {0, 1}}
Daniel Huber
- 51,463
- 1
- 23
- 57




