|
 |
Ron Parker <par### [at] fwi com> wrote:
: Also, can someone send me some photon test code that uses the new
: syntax? The only stuff I could find on this server is for the old
: patch with the 'density' modifier.
-----------------------------------------------------------------------
#declare phd=2;
#include "photons.inc"
camera { location <2,2,-8> look_at 0 angle 35 }
light_source { <100,20,0>,1 }
plane { y,-1 pigment { checker rgb 1, rgb .5 rotate y*45 } }
plane { x,-2 pigment { checker rgb 1, rgb .5 rotate x*45 } }
cylinder
{ -y,y,.8 Photons(yes,yes,no)
pigment { rgbf <.5,1,.5,.95> }
finish { specular .5 roughness .02 reflection .2 }
interior { ior 1.5 }
}
-----------------------------------------------------------------------
photons.inc:
-----------------------------------------------------------------------
#ifndef(UsePhotons) #declare UsePhotons=yes; #end
#ifndef(phd) #declare phd=1; #end
global_settings
{
#if(UsePhotons)
photons
{ gather 20,100
radius 0.1*phd, 2, 0.1*phd
autostop 0
jitter .4
expand_thresholds 0.2, 40
#ifdef(PhotonsMaxTraceLevel) max_trace_level PhotonsMaxTraceLevel #end
#ifdef(PhotonsADCBailout) adc_bailout PhotonsADCBailout #end
}
#end
}
#macro Photons(Refl,Refr,Ignore)
#if(UsePhotons)
photons
{ separation .01*phd
reflection Refl
refraction Refr
#if(Ignore) ignore_photons #end
}
#end
#end
-----------------------------------------------------------------------
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |