POV-Ray : Newsgroups : povray.binaries.images : Invisibility Shield : Re: Invisibility Shield Server Time
20 Apr 2024 01:16:28 EDT (-0400)
  Re: Invisibility Shield  
From: Dave Blandston
Date: 25 Nov 2020 15:30:07
Message: <web.5fbebe9b3ff595d979416a1f0@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> So the effect even works in POV-ray; fascinating.
>
> For your shield, are the 'lenticular lens' shapes made with real geometry, or by
> using normals on a smooth curved surface?



I used a CSG difference so there wouldn't be any internal or coincident
surfaces. I don't know if that would have made a difference or not.



#local ShieldRadius = 1;
#local Thickness = .03;
#local Angle = 60;

#local LensRadius = .002;

#local ShieldCutout = object {
   #local R0 = ShieldRadius - LensRadius;
   #local DeltaTheta = degrees (asin ((LensRadius / 2) / R0)) * 4;
   difference {
      cylinder {<0, -.1, 0>, <0, 1.1, 0>, ShieldRadius + .2}
      cylinder {<0, -.2, 0>, <0, 1.2, 0>, R0}
      #for (Theta, 180 + Angle, 360 - Angle, DeltaTheta)
         cylinder {<R0, -.2, 0>, <R0, 1.2, 0>, LensRadius rotate -Theta * y}
      #end //#for
   } //difference
} //object

#local Shield = object {
   intersection {
      difference {
         cylinder {<0, 0, 0>, <0, 1, 0>, ShieldRadius + .1}
         cylinder {<0, -.1, 0>, <0, 1.1, 0>, ShieldRadius - Thickness}
         object {ShieldCutout}
      } //difference
      plane {z, 0 rotate Angle * y}
      plane {z, 0 rotate -Angle * y}
   } //intersection
   material {Glass}
   photons {target reflection on refraction on collect off}
} //object


Post a reply to this message

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