dariusk / NaNoGenMo-2015

National Novel Generation Month, 2015 edition.
341 stars 21 forks source link

The Cover of The Sun Also Rises #190

Open adregan opened 8 years ago

adregan commented 8 years ago

I generated this in the middle of Nov. and forgot to submit it: alsorises.org

The code used to generate it is here (the scripts are in the book_scripts dir): https://github.com/adregan/pnger

I took a picture of the cover of The Sun Also Rises converted it to a PNG and then decoded the PNG and for each pixel got the nearest named color. It's 800 chapters long and 803,218 word (according to wc). There is also an audio book version that's 173 hours and like 2.5 gigs.

hugovk commented 8 years ago

Wow!

greg-kennedy commented 8 years ago

Chapter 786 includes a sentence "Black, invisible."... It looks like your image had exactly one transparent (alpha-channel=0) pixel! This may be the highlight of the entire novel.

I couldn't read 800 chapters of this, so I coded a script to do it for me. Consider this the Cliff's Notes version: out

adregan commented 8 years ago

That is amazing @greg-kennedy! And I did in fact delete a single pixel leaving a transparent hole. There was a practical reason (seemingly), but I'm glad it's taken on a new life.

hugovk commented 8 years ago

It's great the original image was preserved so well in the book!

For your next trick, @greg-kennedy, decode the cover from the audiobook.

muffinista commented 8 years ago

Wow, this is awesome, well done! It's random, but at certain screen sizes it seems like you can't click on a couple links:

screenshot 2015-12-02 16 24 31

Neither "read online" or the hidden link are clickable for me, although resizing fixes it.

adregan commented 8 years ago

I forgot about that bug. Do you by chance have scrollbars on @muffinista?

I need to try to fix this up. The problem is that I am using the css viewport relative units and for some reason, the browser isn't taking into account the scrollbars, so the elements are as large as if there weren't scrollbars but behave as if the width of the viewport is the width with the scrollbars.

muffinista commented 8 years ago

I think I do? I have a vertical scrollbar on the page anyway. Here's a bigger screenshot:

screenshot 2015-12-02 16 43 33
adregan commented 8 years ago

There are the scrollbars :D. I added a quick fix, so you should be able to read all the text now.