[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Fwd: Please Forward: Ruby Quiz Submission

James Gray

5/29/2007 5:44:00 PM

Begin forwarded message:

> From: "Justin Ethier" <justin.ethier@gmail.com>
> Date: May 29, 2007 12:42:14 PM CDT
> To: submission@rubyquiz.com
> Subject: Please Forward: Ruby Quiz Submission
>
>
> Hello Everyone,
>
> Here are links to the code for my solution:
>
> http://justin.ethier.googlepages.com/fracta...
> http://justin.ethier.googlepages.com/fract...
> http://justin.ethier.googlepages.com/tc_fractal_...
>
> Basically there are 2 parts to it. The first one takes the depth
> level and base fractal shape, and recursively creates a list of
> directions that can be traced to draw the fractal. For example, the
> fractal at level 1 is defined as:
>
> [0, 90, 0, 270, 0] also written as [Right, Up, Right, Down, Right]
>
> The second part creates an RMagick canvas and traces out each line
> one-at-a-time to draw the actual fractal.
> There are probably more efficient ways of doing this, but this
> approach works well at lower levels.
>
> Thanks,
>
> Justin