Glass Sculpture --------------- My first idea was that I wanted to make something with photons. Of course everything that is needed in order to make photons to work in the first place uses so many so long keywords, so there would not be too much space for the scene itself. But I wanted to try anyways. After discarding a lathe idea because it would have taken way too much space, I decided to try to build an object by merging spheres. After trying quite many variations on how to create the spheres, I came up with something I could be happy with: #macro C(N,S) sphere { .5 } #if(N) C(N-1 S) #end #end merge { C(70 seed(3)) ... } This gave something which was not too simple but also not too random. Of course the spheres alone wouldn't do anything (and would be rather useless with regard to the photons), so I added a plane as a floor. After quite some fine-tuning, I came up with this version of the scene: global_settings{photons{count 1e6} #macro C(N,S) sphere{.5photons{target refraction 1}} #if(N)C(N-1S)#end #end} merge {C(70seed(3)) plane{y,-1pigment{rgb<1,.6>}} pigment{rgbf 1}finish{ior 1.5reflection.3phong 2} rotate-x*9} light_source{9,1} The problem with this was that, when all needless whitespace is removed, it takes exactly 257 bytes. There just isn't anything that can be removed from there without affecting negatively the quality of the image. Changing the color of the plane to red would decrease the size of the file, but the image is much uglier. The 'rotate' could be removed, but the resulting image is not as nice. I didn't want to remove the entire 'rotate' just because of one single byte. Another slight bummer here is that the plane is not reflective, even though I really wanted it to be. However, I didn't lose hope. The 'pigment' keyword is repeated twice inside the same merge block, and I just wanted to remove this duplication. After trying tons of the most ingenuous and unimaginable tricks I could come up with in order to remove the duplication of the 'pigment', it suddenly just hit me and I came up with the idea that is used in the entry that I submitted. With the new idea the code looked like this: global_settings{photons{count 1e6}#macro C(P,N,S)pigment{P}finish{ior 1.5reflection.3phong 2}}#if(N)sphere{.5photons {target refraction 1}C(rgbf 1N-1S)#end#end}merge{plane{y,-1C(rgb<1,.6> 70seed(3))rotate-x*9}light_source{9,1} And what was just absolutely great, I could give the plane the same finish as the spheres, so the plane got its reflection and phong too! Now I had one small problem: The entry was 250 bytes! I had 6 bytes to spare! How could I use these 6 bytes for something useful? I could have used 5 bytes to get variable reflection on the objects, but since it didn't make too much of a difference, it seemed just a waste, so I didn't use that. I want every character to count, to do something useful, something visible, and the variable reflection just didn't make enough difference to count, so I left it out. Another option was to use 3 characters to add a blue component to the color of the plane, making a more elaborated color than just rgb <1,.6>. Since I couldn't think of anything more useful, I did that. Thus the entry was 253 bytes long. After that I came up with another idea: Is the rand() really necessary? I tried to see what happens if I just substitute it with N/70. The result was actually not bad at all. Definitely not worse than with the rand(). This allowed me to remove the seed code completely, thus making the scene just 240 bytes long. iow. giving me a whopping 16 free characters. I immediately knew what I wanted: Area light. I tried it, but it made the scene a few characters too long. Bummer. Then I looked more into the code and... doh! The two 'rgb' keywords could be merged into one! After doing that, the scene was exactly 256 bytes long, and most probably cannot be reduced without changing the looks of the scene. So, it's rather optimal. Over half of this (148 characters) went onto setting up photons, textures and lighting (so only 108 characters were used for actual object creation).