POV-Ray : Newsgroups : povray.binaries.images : blue's code : Re: blue's code Server Time
10 Jun 2024 08:30:22 EDT (-0400)
  Re: blue's code  
From: alphaQuad
Date: 26 Jul 2008 10:15:03
Message: <web.488b31192dc5bc4ef2eba14c0@news.povray.org>
trace seems to fail on these CSG lenses, so ... input radius and return x of the
curve.

in other words, if you have the light radius at lens2_impact, you have the
distance to lens center


/* function-curve {

  ; r=xwidthradius b=yheightofarc and r==b for circle
} */
#declare quadx = function(wrad,hrad,yinput) {
  // (r,b,y)
  sqrt((wrad*wrad) - pow(yinput*wrad/hrad,2))

}
#declare quady = function(wrad,hrad,xinput) {
sqrt(wrad*wrad-xinput*xinput) * (hrad / wrad)

}


object { concav_glass_ translate <-8 +
(4-quadx(4,4,1.5)) + (lens_focal_len(8,-8,1.5,1.6) / 2)
,2,-10> }

0.291901 + 4.137943
(if 1.5 radius at lens2_impact)

Tis my guess, didnt read it anywhere. results concur


Post a reply to this message

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