This script is a close variant of Re^2: [ASCII art graphs] Kisses. It's drawing Lissajous curves in ascii-art.

Sorry for replying so late: since there you say "So here's a perl one, just to disprove blazar's statement" and my statement was that "those [Lissajous figures] would have required either ANSI sequences (and then are nice to be seen while being drawn - I wanted something to paste into email instead) or mangling with a buffer"... I've long wanted to reply: well done! Actually the basics of your approach are easy to understand: instead of drawing implicitly, just do so explicitly, taking slices. Had you asked me in advance wrt Lissajous figures, I would have told: oh yeah, certainly possible - an exercise of masochism, if one exists. But your code contradicts me, since it doesn't seem that overly complex after all. Yet in its minimality, it looks much like a macho algorithm master show off: to work out the details for the uninitiated and the less knowledgeable is certainly possible, but likely to take some time. So why don't you consider expanding it to a full tutorial or something like that? IMHO it will be certainly instructive and Perl is not generally considered for this "kinda stuff", but why not anyway?


In reply to Re: Lissajous curves by blazar
in thread Lissajous curves by ambrus

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.