TransWikia.com

Art on mathematica with filled circles and straight paths: how can I reproduce minimalist suns?

Mathematica Asked on July 11, 2021

I would like to know: how can I construct minimalist images like this one?

enter image description here

2 Answers

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]

enter image description here

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]

enter image description here

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}]}]

enter image description here

Correct answer by kglr on July 11, 2021

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}}

enter image description here

Answered by Daniel Huber on July 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP