POV-Ray : Newsgroups : povray.general : macro - without () : Re: [long][ot]macro - without () Server Time
5 Aug 2024 16:13:12 EDT (-0400)
  Re: [long][ot]macro - without ()  
From: Rafal 'Raf256' Maj
Date: 4 Oct 2002 07:53:51
Message: <Xns929D8D1369996raf256com@204.213.191.226>
"Tom Melly" <tom### [at] tomandlucouk> wrote in
news:3d9d7908$1@news.povray.org 

> The point is, you're complaining about something as though you can't
> do it, when you can, and very easily.

Where I'm *complaining* ?
 
> Take a look at most user's complex pov-scripts and you will see a
> whole bunch of stuff like:
> #declare do_grass = false;
> #declare do_tree = false;
> #declare do_big_time_consuming_media = false;

Realy this isn't *complex* ;) Complex is i.e. signeture :)
Alsow this code is simple :

#debug "\n======================================================\n"
#ifndef (using_ini)
  #debug "*** NOT using INI file ***\n"
  #include "cfg/1std.inc"
  #include "comp/1space.inc"
  #include "data/1atom1.inc" 
  #include "qq/0turbo.inc"
  #declare DbgAny=1;
#else  
  #debug "*** Including setup files (as ordered in .INI) ***\n"
  #declare iniNames=array[2]{"0custom","1std"}  
  #include concat("cfg/",iniNames[inc_file_cfg],".inc") 
  #declare iniNames=array[2]{"0custom","1space"}  
  #include concat("comp/",iniNames[inc_file_comp],".inc") 
  #declare iniNames=array[2]{"0custom","1atom1"}  
  #include concat("data/",iniNames[inc_file_data],".inc") 
  #declare 
iniNames=array[6]{"0turbo","1fast","2good","3nice","4best","5photo"}
  #include concat("qq/",iniNames[inc_file_qq],".inc")  
  #declare DbgAny=0;
#end
// --- [debug] -----------------------------------------
#declare ShowIsosBounding = 0 *DbgAny; // 0/1 show isosurface bounding                
 
#declare ObjectShadowTest = 0 *DbgAny; // 0/1 special objects for shadow

btw. it contians workaround for one "problem" - declare in INI accept's 
only float (strings are disallowed).
.INI file is :

[...]
declare=using_ini=1
declare=inc_file_cfg=1
declare=inc_file_comp=1
declare=inc_file_data=1
declare=inc_file_qq=3

Maybe ther is nicer workaround ? I would prefere to have in .INI
  declare=inc_file_comp=space
  declare=inc_file_data=atom1
and AFAIK this is possible if I add to .pov code :
  #declare space=1;  #declare outdoor=1;
  #declare atom1=1;  #declare h2o=2;
but this comolicate even more .POV  ini-options-parsing code

-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

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