Group Abstract Group Abstract

Message Boards Message Boards

5
|
14.4K Views
|
4 Replies
|
8 Total Likes
View groups...
Share
Share this post:

Updating a One-Liner Competition Winner

Posted 10 years ago

The 2015 One-Liner Competition has some awesome entries. The third-place award is a particularly cool one, and was posted with a challenge from the judges:

Third Place

I decided to try my hand at it. I'm still well over 128 characters, but I was able to make a non-stop animated version:

r := RandomReal[1, {7, 2}];
p = r;
p2 = r;
c = 0;
data[t_] := p + t (p2 - p);
Dynamic[
 c = c + .01;
 If[c == 1, p = p2; p2 = r; data[t_] := p + t (p2 - p);];
 c = FractionalPart[c];
 Graphics[{Hue@(data[c][[1]]), 
   BSplineCurve[data[c], SplineClosed -> 2 > 1]}, 
  PlotRange -> {{0, 1}, {0, 1}}]]

And it works! I'm sure it can be done better, but I had fun anyway.

Result

POSTED BY: Evan Ot
4 Replies
Posted 10 years ago
POSTED BY: J. M.
POSTED BY: Sander Huisman
POSTED BY: Patrick Stevens

Just an idea, not sure how to make it, - I think this needs memory. Basically if we show a sequence of a few loops ( trailing ) the the visual will be much more striking. I think also after awhile this gets stuck in a short cycle of repetitive behavior. It became so dense, hard to understand. Could someone tell me - is it really just a random vector of 2D points slightly incremented by another random vector?

POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard