POV-Ray : Newsgroups : povray.binaries.images : Lame Short Code Contest attempt : Re: Lame Short Code Contest attempt Server Time
11 Aug 2024 23:24:05 EDT (-0400)
  Re: Lame Short Code Contest attempt  
From: andrel
Date: 23 Feb 2004 10:02:41
Message: <403A15D8.8020907@hotmail.com>
Dan P wrote:

> "Christoph Hormann" <chr### [at] gmxde> wrote in message
> news:ogt### [at] tritonimagicode...
> 
>>Dan P wrote:
>>  > Here's another fun way to use mandel:
>>
>>>#declare f=function{pigment{mandel 1000 interior 1,1 translate -0.17
>>>color_map{[0 rgb 0][1 rgb 1]}scale 2}}light_source{0.2*y rgb
>>>1}height_field{function 999,999{f(x,y,z).gray*0.1}pigment{rgb
>>>1}translate -0.5}camera{rotate 45*x translate -0.7*z}
>>>
>>>246 bytes :-)
>>
>>You don't honestly want to sell this as a shortest version, do you?  I
>>mean there are dozens of chars to save here.
>>
>>Christoph
> 
> 
> I think dere oughta be a rule -- "bring it" :-)
> I want to learn how to shave more chars... let's see the shorter version!
> :-)
> 

my hints:
- you don't need the zeros before the dot '-0.7' == '-.7'
- you don't need a space between a number and a keyword or variable
  '1000 interior' == '1000interior'
- you can thus also replace '45*x translate' by 'x*45translate'
- you do not need a space before a '-'
   'translate -0.7' == 'translate-.7'
- 1000 or 999 do not make much difference (except one char)

that gives:

#declare f=function{pigment{mandel 999interior 1,1translate-.17
color_map{[0rgb 0][1rgb 1]}scale 2}}light_source{y*.2rgb
1}height_field{function 999,999{f(x,y,z).gray*.1}pigment{rgb
1}translate-.5}camera{rotate x*45translate-.7*z}

which saves 14 bytes in total, not realy the dozens Christoph talks
about, so there is probably more.

    Andrel


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.