Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Balls! Pt 3

by teamster_jr (Curate)
on May 17, 2006 at 14:40 UTC ( #550028=obfuscated: print w/replies, xml ) Need Help??

Apologies for posting two in a row.
just did this:
s''openZF," >o.bmp";printZF Zpack("a2V13",BM, 37686,0,54,40,112,11 2,1572865,0,37632),map {chr(($_%112-55)**2+($ _/112-55)**2<3025?255- 3*(($_/112-75)**2+($_% 112-75)**2)**.5:0)x3 }0..12544';s#\s##g ;s#Z# #g;eval
hope you like it.
As L~R mentions - check for o.bmp;
also i've gently obfuscated it - otherwise it probably didn't belong here!
I've reformatted it to fit my balls format - this one is another ball shorter! (see the others here and here)
(and renamed to fit in with my balls naming scheme!)
change L to V in pack to force little endianness - this should fix some viewers. (from londonpm email thread).

Replies are listed 'Best First'.
Re: balls III
by Limbic~Region (Chancellor) on May 17, 2006 at 15:19 UTC
    Very impressive but you might want to mention that you need to look at the outputted file (o.bmp) to see the results.

    Cheers - L~R

Re: Balls! Pt 3
by krisahoch (Deacon) on May 17, 2006 at 20:18 UTC
    ++ for the deft usage of your statement 'my balls', in multiple places.
Re: Balls! Pt 3
by liverpole (Monsignor) on May 20, 2006 at 14:17 UTC
    Very cool!  I missed this when you posted it somehow, and just stumbled onto it now.

    teamstr_jr, you are the master of direct manipulation of file formats!

Re: Balls! Pt 3
by turo (Friar) on May 17, 2006 at 23:00 UTC

    did you use pov-ray to generate the sphere?

    very cool!

    perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'
Re: Balls! Pt 3
by wulvrine (Friar) on May 22, 2006 at 13:16 UTC
    ++ Nice job! Your ability to write code to directly generate graphical items never ceases to amaze me.

    s&&VALKYRIE &&& print $_^q|!4 =+;' *|
Re: Balls! Pt 3
by TedPride (Priest) on May 17, 2006 at 20:34 UTC
    Neither my Picture Viewer or Photoshop can view the bmp. What's it supposed to look like?
      xv, firefox or ie should all work. ms paint seems a bit funny - i've probably got a data border or a header value wrong somewhere.
      ah! In a londonpm mailing list conversation someone pointed out it should be "V" not "L" in pack - force it into little endianness. The above post is updated.
Re: Balls! Pt 3
by QM (Parson) on May 19, 2006 at 04:21 UTC

    Is it supposed to be wrapped around?

    Quantum Mechanics: The dreams stuff is made of

      no, it's not. I think i might have got one of the header values wrong - so the image data is read too far in - causing it to wrap.
      Or it may be an endian problem if it was run before i fixed that.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://550028]
Approved by Limbic~Region
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2017-07-26 22:07 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (402 votes). Check out past polls.