POV-Ray : Newsgroups : povray.general : sign "M" : Re: sign "M" Server Time
5 Aug 2024 22:18:21 EDT (-0400)
  Re: sign "M"  
From: Tor Olav Kristensen
Date: 23 Jul 2002 14:15:20
Message: <3D3D9D92.C5EB47FF@hotmail.com>

> 
> On Mon, 22 Jul 2002 22:37:08 +0200, Tor Olav Kristensen
> <tor### [at] hotmailcom> wrote:
> > light_source{y#macro p(c)#if(c>1)#local l=mod(c,1E2);g(x-2*div(l,10)+8,y
> > -2*mod(l,10)+8,0)*p(div(c,1E2))#end#end 2}sphere{#include"stdinc.inc"20*
> > z#local g=function{.4*abs(sin(9*f_r(x,y,0)))*pow(1-min(1,.3*f_r(x,y,0)),
> > 2)+.9}9pigment{function{p(26252423)p(36455644)p(66656463)1}}}//M
> 
> Personally I don't write sigs with #include but no reason to not simplify such
> ;-)

I agree with you that sigs are better without includes, but since f_r() is
an internal function, I made an exception; because the only "legal" way to
call such internal functions is via the "functions.inc" file.


> light_source{y#include"stdinc"2}sphere{20*z#macro p(c)#if(c>1)g(x-2*div(mod
> (c,49),7)+8,y-2*mod(c,7)+8,22)*p((c-mod(c,49))/49)#end#end#local g=function
> {abs(sin(9*f_r(x,y,0)))*pow(3-min(3,f_r(x,y,0)),2)/z+.9}9pigment{function{p
> (2399498)p(3257797)p(5762298)1}}}//M

Hehe - I thought that you would come up with such a suggestion.

I noticed that the image from your code is not identical to M's original
image, but I think that it's close enough.

Now this code contains 7 character less:

light_source{y#include"stdinc"2}sphere{20*z#macro p(c)#if(c>1)g(x-2*div(
mod(c,49),7)+8,y-2*mod(c,7)+8,22)*p(div(c,49))#end#end#local g=function{
abs(sin(9*f_r(x,y,0)))*pow(3-min(3,f_r(x,y,0)),2)/z+.9}9pigment{function
{p(2399498)p(3257797)p(5762298)1}}}//M

- And I have a feeling that it can still be shortened some more  ;)


Tor Olav


Post a reply to this message

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