Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Hi all,
I haven't posted anything of my own for a while.
Here's my latest effort: a vt100 obfu (sorry as ever to windows users...).
The bumpmap could do with rounding and the raytracing (!) routine isn't ideal, but i'm reasonably happy with it
- maybe i'll fix these problems for an updated version at some point.
Update: I've done a new version with a generated sphere and a better shading routine. it's here.

The * at 0,0 is the lightsource.

$_=q%$_=" 88GGCI"; @a=/./g;@_=('IP ""YI','IjjjjI', 'IiciII') ;whil e($c=pop@ a){ma p{$_=$c.$_ .$c}@_ ;@_=(($t=( $n=$a[ $#a]||"@").$ {c}x(- 2+length$_[0]).$n),@_, $t)}$_='j8_4xj4,@@8b,x j2,@14bxjd@16bxd@18bx@ 20x@20x@20xY@18PxjY@16 Pxj`Y@14Pxj4`@10Pxj8"5 x';s#(.)(\d*)#$1x($2|| 1)#eg;$m=2;$n=-1;$|=1; $p=9;$q=20;{$q+=$n*= $q<11|$q>50?-1:1;$p+ =$m*=$p<8|$p>16?-1 :1;$u=-$q*6/($l=($ q**2+$p**2)**.5 );$v=-2-$p*6/$l; $r=$p-6;$ s=$q-9;$y=0 ;select$x ,$x,$x,.2*print "\ec*",(m ap{$l =0;"\e[".$ r++."; ${s}H",$y++<$v?$_:do{@ c=split//,$_[$y-$v-1]; map{$l++>$u&/@/&&($t=$ c[$l-$u-2])?$t:$_}/./g },$/}splitjx),"\e[30 H";redo}%;s#\s##g; s#j#$"#g;eval
enjoy.

alex
ps. i got the shape from http://music.hyperreal.org/artists/b12/gallery/ascii/fl/sphere.htm
The result of searching (given my job i'm not going to say googling!) for ascii art.
Update: added link to updated code


In reply to Balls! by teamster_jr

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (11)
    As of 2014-12-27 17:57 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (177 votes), past polls