POV-Ray : Newsgroups : povray.general : Lens Flares? : Re: Lens Flares? Server Time
7 Aug 2024 11:21:55 EDT (-0400)
  Re: Lens Flares?  
From: Ron Parker
Date: 7 Nov 2001 11:11:51
Message: <slrn9uina8.gj7.ron.parker@fwi.com>
On 7 Nov 2001 10:22:09 -0500, Warp wrote:

>: #macro c()union{cylinder{x+y/2x.1}difference{torus{.5,.1rotate 90*x}box{x+z/5
>: ,-.2-(x+y)/2}translate(1-z)/2}#end merge{c()}c()scale<-1,1,1>}cylinder{y/2,0,
>: .1}pigment{crackle scale.5rotate 90turbulence.75color_map{[.05rgb 1][.1rgb<1,
>: .25,1>][.25rgbf 1]}}finish{ambient 1}}camera{location-2*z+y/4look_at y/2}
> 
>   Well, I think I can beat that:
> 
> #macro c(X)torus{.5.1clipped_by{box{<.7.2><-.7,-.2.7>}}rotate-90*x translate
> x*X}#end #macro C(A)cylinder{A,A-y*.5.1}#end merge{c(.5)c(-.5)C(x)C(-x)C(0)
> translate z*2pigment{crackle scale.5rotate 90turbulence.75color_map{[.05rgb
> 1][.1rgb<1,.25,1>][.25rgbf 1]}}finish{ambient 1}}


#macro c(X)torus{.5.1clipped_by{plane{z,0}}rotate x*90translate x*X}#end#macro C
(A)cylinder{A,A-y*.5.1}#end merge{c(.5)c(-.5)C(x)C(-x)C(0)translate z*2pigment{
crackle scale.5turbulence.75rotate 90color_map{[.05rgb 1][.1rgb 1-.75*y][.25rgbf
1]}}finish{ambient 1}}

and depending on just how unimportant the exact texture is, the rotate 90 could
be changed to rotate 9 or removed altogether (and the translate z*2 could be 
moved to the end, which would also change the texture.)

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}


Post a reply to this message

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