Message Boards Message Boards


[GIF] Twinkle (Pseudo-randomly located oscillators)

Posted 4 years ago
6 Replies
10 Total Likes

Pseudo-randomly located oscillators


Inspired by Jerome Herr. Here's the code:

DynamicModule[{points, start?, cols},
 cols = RGBColor /@ {"#598EA3", "#B0DDDF", "#F0AB7B", "#2D4861"};
 points = 
    r {Cos[?], Sin[?]}, {r \[Distributed] 
      NormalDistribution[1, 1/8], ? \[Distributed] 
      UniformDistribution[{0, 2 ?}]}], 1000];
 start? = RandomReal[{0, 2 ?}, 1000];
  Graphics[{Table[{cols[[Mod[i, 3, 1]]], 
      PointSize[.0065 + .0025 Sin[? + start?[[i]]]], 
      Point[points[[i]]]}, {i, 1, 1000}]}, Background -> cols[[4]], 
   PlotRange -> 1.9, ImageSize -> 540], {?, 0, 2 ?}]
6 Replies

This feels like something that could pop up in a Doctor Who episode, where it would of course contain a subliminal alien message. Wolfram Research, what have you done with RandomVariate? And don't tell me it's "random".

Wait, what's wrong with RandomVariate?

I'm sorry, I can't quite tell if you're playing along or if my joke was too silly to register as a joke... this forum needs smilies!

(Either way I enjoy the animation, obviously!)

Sorry, literalism gene kicked in there. Anyway, thanks for the kind words!

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

Posted 4 years ago

That's beautiful!
I'm using Animate instead of Manipulate to have it play "live" in the notebook.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract