I do something like that over here, which was, in fact, the way I generated my sig. I wrote it years ago as a quick hack to help a friend out who was painstakingly trying to do something like it by hand in order to impress a girl he met via an HTML-aware guestbook. The code is too embarrassing to be let out into the wild.

Note that my version keeps going round and round, but never actually gets back to the starting point, thereby insuring a steady stream of different hues.


In reply to Dog and Pony, yes, I'm rotating the channels independently. I use the output of sin(), scaling the range -1..1 to 0..255. When the sine output is positive and the difference from the previous value is negative, then I'm at the top o' the wave, so to speak, so I choose another period (13 chars, 17 chars...).

I use prime numbers to ensure that the three frequencies are all relatively prime to each other... although I'm not sure that that is important, just that each channel uses a different period, even if they are multiples of each other.


print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'

In reply to Re: HTML text toner by grinder
in thread HTML text toner by Dog and Pony

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.