POV-Ray : Newsgroups : povray.binaries.images : blue's code Server Time
19 May 2024 08:59:25 EDT (-0400)
  blue's code (Message 21 to 30 of 37)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>
From: alphaQuad
Subject: Re: blue's code
Date: 24 Jul 2008 10:00:00
Message: <web.488889f52dc5bc4e619234250@news.povray.org>
"Jim Holsenback" <jho### [at] hotmailcom> wrote:

> what about thickness of the lens? that was to be my next test until i got
> side tracked


Doh!

also , area_light is missing at least 2 important items:

fade_distance
fade_power

3 media levels exist around:

      spacing 0.05
      media 200
      max_trace_level 10

      spacing 0.075
      media 150
      max_trace_level 7

      spacing 0.1
      media 75
      max_trace_level 5


AA with 2nd level.
There was time to spare, could have done a higher res last night.


Post a reply to this message


Attachments:
Download 'lasereflect_001.png' (260 KB)

Preview of image 'lasereflect_001.png'
lasereflect_001.png


 

From: alphaQuad
Subject: Re: blue's code
Date: 25 Jul 2008 02:20:00
Message: <web.488970552dc5bc4e358e2dfa0@news.povray.org>
some more glass, with 2d curves.

also lens focal length.


#declare maglass2 =
intersection {
cylinder {  <8,0,0>, <8,4,0> 10 }
cylinder {  <-8,0,0>, <-8,4,0> 10 }
  material { m_glass } photons { target reflection on refraction on }
}
object { maglass2 translate <-6,0,10> }

#declare concav_glass2 =
difference { box { <-2,0,-5>,<2,4,5> }
cylinder {  <-5.5,-0.1,0>, <-5.5,4.1,0> 5 }
cylinder {  <5.5,-0.1,0>, <5.5,4.1,0> 5 }
  material { m_glass } photons { target reflection on refraction on }
}
object { concav_glass2 translate <0,0,10> }


#declare lens_focal_len = function(r1,r2,_ior,d) {
  // Thin lens equation
  // 1 / ((_ior-1) * ((1 / r1)-(1 / r2)))
  1 / ((_ior-1) * (((1 / r1)-(1 / r2)) + (((_ior-1) * d) / (_ior * r1 * r2))  ))
}
// The signs of the lens' radii of curvature indicate whether the
// corresponding surfaces are convex or concave. If R1 is positive
// the first surface is convex, and if R1 is negative the surface
// is concave. The signs are reversed for the back surface of the lens:
// if R2 is positive the surface is concave, and if R2 is negative the surface
is convex.

// lens_focal_len(-1.75,1.75,1.5,0.2) = -1.717289
// lens_focal_len(-5,5,1.5,1) = -4.83871
// concave

// lens_focal_len(4,-4,1.5,1.6) = 4.28572
// lens_focal_len(10,-10,1.5,4) = 10.71429
// convex


this image:
 2 lenses at a distance of 6 (arbitrary)
lens_focal_len(10,-10,1.5,4) = 10.71429
lens_focal_len(-5,5,1.5,1) = -4.83871


Post a reply to this message


Attachments:
Download 'laserfocus_0.png' (126 KB)

Preview of image 'laserfocus_0.png'
laserfocus_0.png


 

From: alphaQuad
Subject: Re: blue's code
Date: 25 Jul 2008 18:15:00
Message: <web.488a4fc62dc5bc4e568f2ce70@news.povray.org>
larger lens was helpful

#declare concav_glass_ = // f = -3.99984
difference { cylinder { <-.5,0,0>,<.5,0,0> 3 }
  sphere { <-4.0005,0,0>, 4 } sphere { <4.0005,0,0>, 4 }
  material { m_glass } photons { target reflection on refraction on }
}
object { concav_glass_ translate <-8 + 4.35,-10> } //4.137943

#declare maglass_ = // f =  8.275885
intersection {
sphere {  <7.2,0,0>, 8 }
sphere {  <-7.2,0,0>, 8 }
  material { m_glass } photons { target reflection on refraction on }
}
object { maglass_ translate <-8,2,-10> }

just a guess here from what looks best,
Distance to lens2 = radius reduction times focal-length(lens1) + lens2_impact


haven't found any real explanation of this yet.


Post a reply to this message


Attachments:
Download 'laserfo_00_.png' (44 KB)

Preview of image 'laserfo_00_.png'
laserfo_00_.png


 

From: Jim Holsenback
Subject: Re: blue's code
Date: 26 Jul 2008 05:42:15
Message: <488af177@news.povray.org>
"alphaQuad" <alp### [at] earthlinknet> wrote in message 
news:web.488a4fc62dc5bc4e568f2ce70@news.povray.org...
> larger lens was helpful

thicker? .... i would have imagined a thinner lens would have been better

>
> #declare concav_glass_ = // f = -3.99984
> difference { cylinder { <-.5,0,0>,<.5,0,0> 3 }
>  sphere { <-4.0005,0,0>, 4 } sphere { <4.0005,0,0>, 4 }
>  material { m_glass } photons { target reflection on refraction on }
> }
> object { concav_glass_ translate <-8 + 4.35,-10> } //4.137943
>
> #declare maglass_ = // f =  8.275885
> intersection {
> sphere {  <7.2,0,0>, 8 }
> sphere {  <-7.2,0,0>, 8 }
>  material { m_glass } photons { target reflection on refraction on }
> }
> object { maglass_ translate <-8,2,-10> }
>
> just a guess here from what looks best,
> Distance to lens2 = radius reduction times focal-length(lens1) + 
> lens2_impact
>
>
> haven't found any real explanation of this yet.

i better get hot on the part i spoke up for. i'll have to review this thread 
to pick up your changes since you posted the zip file. i think i can get 
this done today. yesterday i dug 115 post holes and planted the posts ..... 
so i'm entitled to a easy day. slow down a bit so i can catch up ;-)

Jim


Post a reply to this message

From: alphaQuad
Subject: Re: blue's code
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

From: alphaQuad
Subject: Re: blue's code
Date: 26 Jul 2008 10:45:00
Message: <web.488b382f2dc5bc4ef2eba14c0@news.povray.org>
"Jim Holsenback" <jho### [at] hotmailcom> wrote:

> thicker? .... i would have imagined a thinner lens would have been better

no I meant larger radius since converging light radius was very close to lens2
radius (at half the focal_len).
(more "relaxed" focusing)



and the magnification with lots of more notes
http://en.wikipedia.org/wiki/Lens_(optics)

#declare lens_magnification = function(f,s1) {
 f / (f-s1)
}
not tested


Post a reply to this message

From: alphaQuad
Subject: Re: blue's code
Date: 26 Jul 2008 12:10:01
Message: <web.488b4b2f2dc5bc4ef2eba14c0@news.povray.org>
one thing I have done ... is travelling along and the project melts into, "I
cant get back to that image or remember what I did"

in avoidance of that issue,
last 2 image files for quick render reference point.


Post a reply to this message


Attachments:
Download 'laser.zip' (175 KB)

From: alphaQuad
Subject: Re: blue's code
Date: 26 Jul 2008 12:35:00
Message: <web.488b50fb2dc5bc4ef2eba14c0@news.povray.org>
and of course one of those files was using echo.inc

it all so confusing!!!

:)


Post a reply to this message


Attachments:
Download 'laser.zip' (175 KB)

From: alphaQuad
Subject: Re: blue's code
Date: 26 Jul 2008 15:05:00
Message: <web.488b74642dc5bc4ef2eba14c0@news.povray.org>
Another thing I been wanting to see in pov code,
prism refraction that looks like:
http://en.wikipedia.org/wiki/Prism_%28optics%29

And something about polarization
http://en.wikipedia.org/wiki/Polarization

can wipe entire brain clusters with that page


Post a reply to this message

From: alphaQuad
Subject: Re: blue's code
Date: 26 Jul 2008 16:45:00
Message: <web.488b8bf02dc5bc4ef2eba14c0@news.povray.org>
"alphaQuad" <alp### [at] earthlinknet> wrote:
> 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

more like

#declare concav_glass_ = // f = -3.99984
#declare maglass_ = // f =  8.275885

Add focal lengths
4.35 was close, v. almost 4.3

should put it in focus position, just had to stare at it long enough


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>

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