POV-Ray : Newsgroups : povray.binaries.images : Shorten Code Tips Server Time
19 Nov 2024 00:35:25 EST (-0500)
  Shorten Code Tips (Message 1 to 3 of 3)  
From: Raf256
Subject: Shorten Code Tips
Date: 29 Feb 2004 12:46:43
Message: <Xns949EBF61125EFspamraf256com@203.29.75.35>
Hi,
anyone maybe have idea how to shorten

  L(y)L(y)L(z)L(z)L(x)L(x)
and
  union{... rotate R*90translate T scale.5}
?

Btw, in some case You can skip an colon ',' between macro arguments, this 
is expected behaviour? M(1,x) could become M(1x) other nice tricks are 
ofcourse writting  xxx 1 yyy 2  as  xxx 1yyy 2  and xxx 0.3 as xxx.3


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Shorten Code Tips
Date: 29 Feb 2004 12:57:13
Message: <404227f9@news.povray.org>
> Hi,
> anyone maybe have idea how to shorten
>
>   L(y)L(y)L(z)L(z)L(x)L(x)

Nope, not unless I know the macros and have an idea how they might simply do
double output.

> and
>   union{... rotate R*90translate T scale.5}

Maybe the objects in the union could be scaled by .5 directly (e.g. using
radius of .5 instead of 1 for a sphere) but you'd have to add less than 7
digits for that to have an effect. Otherwise, I don't know. It's kinda
difficult to shorten such little code without the background of why and
where it is needed, and how you arrive there. Sometimes, you can leave
things out way earlier, or make them a little different, but thereby save
some amount of code later on.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Shorten Code Tips
Date: 29 Feb 2004 18:27:09
Message: <Xns949F48A2E6E9raf256com@203.29.75.35>
tim.nikias (@) nolights.de news:404227f9@news.povray.org


(ups I posted to quite wrong n-g so now FUT: to .general)

>> anyone maybe have idea how to shorten
>>   L(y)L(y)L(z)L(z)L(x)L(x)
> Nope, not unless I know the macros and have an idea how they might
> simply do double output.

it's impossible to shorten L() macro itself probably

code is in .b.i

 
>> and
>>   union{... rotate R*90translate T scale.5}
> Maybe the objects in the union could be scaled by .5 directly (e.g.

same as above. I was thinking, wasn't it be shorten to use matrix syntax?



-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics



-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

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