POV-Ray : Newsgroups : povray.binaries.images : Lame Short Code Contest attempt Server Time
11 Aug 2024 21:19:15 EDT (-0400)
  Lame Short Code Contest attempt (Message 11 to 20 of 27)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>
From: Christoph Hormann
Subject: Re: Lame Short Code Contest attempt
Date: 23 Feb 2004 04:48:03
Message: <ogtog1-qs4.ln1@triton.imagico.de>
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

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 11 Jan. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Dan P
Subject: Re: Lame Short Code Contest attempt
Date: 23 Feb 2004 09:21:12
Message: <403a0c58$1@news.povray.org>
"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!
:-)


Post a reply to this message

From: andrel
Subject: Re: Lame Short Code Contest attempt
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

From: Dan P
Subject: Re: Lame Short Code Contest attempt
Date: 23 Feb 2004 10:19:25
Message: <403a19fd$1@news.povray.org>
"andrel" <a_l### [at] hotmailcom> wrote in message
news:403### [at] hotmailcom...
>
>
> Dan P wrote:
>
> > "Christoph Hormann" <chr### [at] gmxde> wrote in message
> > news:ogt### [at] tritonimagicode...
>
> 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}

Sweet! I wish I knew about the numbers thing before I put my entry in. I
think I might also be able to lose [0rgb 0] as well to get:

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

I don't have pov at work, though; does the above compile?


Post a reply to this message

From: Christoph Hormann
Subject: Re: Lame Short Code Contest attempt
Date: 23 Feb 2004 10:36:09
Message: <15jpg1-qua.ln1@triton.imagico.de>
andrel wrote:
> 
> [...]
> 
> #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.

There is - but hey, this is a *contest*... ;-)

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 11 Jan. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: andrel
Subject: Re: Lame Short Code Contest attempt
Date: 23 Feb 2004 10:41:24
Message: <403A1EEB.8070207@hotmail.com>
> 
> Sweet! I wish I knew about the numbers thing before I put my entry in. I
> think I might also be able to lose [0rgb 0] as well to get:
> 
> #declare f=function{pigment{mandel 999interior
> 1,1translate-.17color_map{[1rgb 1]}scale
> 2}}light_source{y*.2rgb1}height_field{function
> 999,999{f(x,y,z).gray*.1}pigment{rgb1}translate-.5}camera{rotate
> x*45translate-.7*z}
> 
> I don't have pov at work, though; does the above compile?
After you replace 'rgb1' by 'rgb 1' it does.
It is not the same image though ;)
You can gain another char by using '.red' for '.gray'
(I do not know why. I never had time to investigate
much about function :( I mostly do meshes and patches.)


Post a reply to this message

From: ABX
Subject: Re: Lame Short Code Contest attempt
Date: 23 Feb 2004 10:46:44
Message: <p08k3092tnmacsnqc1lnfr997750g0jlbi@4ax.com>
On Mon, 23 Feb 2004 16:34:25 +0100, Christoph Hormann <chr### [at] gmxde> >
> but hey, this is a *contest*... ;-)

... and source of my irritation. Now if a day could heve the same number of
hours as short code chars... I hope I will find some hours for participate.

ABX


Post a reply to this message

From: Christopher James Huff
Subject: Re: Lame Short Code Contest attempt
Date: 23 Feb 2004 11:35:44
Message: <cjameshuff-D54816.11362823022004@news.povray.org>
In article <403### [at] hotmailcom>,
 andrel <a_l### [at] hotmailcom> wrote:

> #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}

Replace ".gray" with ".hf" to save two characters.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Dan P
Subject: Re: Lame Short Code Contest attempt
Date: 23 Feb 2004 11:41:48
Message: <403a2d4c$1@news.povray.org>
"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cjameshuff-D54816.11362823022004@news.povray.org...
> In article <403### [at] hotmailcom>,
>  andrel <a_l### [at] hotmailcom> wrote:
>
> > #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}
>
> Replace ".gray" with ".hf" to save two characters.

It's amazing, really, how much we learn from a Short Code contest.
Coming at things from a different angle can definitely serve as a great
learning tool!
Thanks, guys!!!


Post a reply to this message

From: Warp
Subject: Re: Lame Short Code Contest attempt
Date: 23 Feb 2004 18:28:48
Message: <403a8cb0@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> I'm guessing you did it something like this:

  That doesn't have any blurring.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>

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