POV-Ray : Newsgroups : povray.newusers : Single lens show side view : Re: Single lens show side view Server Time
30 Jun 2024 03:27:41 EDT (-0400)
  Re: Single lens show side view  
From: Le Forgeron
Date: 7 Oct 2011 03:28:40
Message: <4e8eaa28$1@news.povray.org>
Le 07/10/2011 08:19, Arun Kumar a écrit :
> Thanks for the clarification...
> 
> I have some more doubts. I created a checker board with stick and a lens. I need
> to view the stick through the lens. But the lens which i created is in
> horizontal position. I need to rotate it vertically so that the stick can be
> viewed through the lens. I tried changing the attributes of ROTATE and TRANSLATE
> but i couldn't get the exact image which am looking for. Please help me with
> this issue.

I kept the board without rotation, and moved that rotation on the camera.
I removed the union (no purpose)
Adjusted max_trace_level

Beware, the lense currently has 2 layered textures/pigments (and the
interior... the colour of the material might be too clear to view the
lense per itself.

#version 3.7;
#include "colors.inc"
#include "glass.inc"
#declare Photons=on;
#declare Overview=on;

  global_settings { assumed_gamma 1.0

// 20 is for overview=on
// 3 when off
max_trace_level 55
  #if (Photons)
  photons { spacing 0.02 }
  #end
}

#if (Overview)
camera {
  //perspective
  location  <1, 2, -10>
  look_at   <0, 2,  0>
  right     x*1.33
  rotate y*65
  }
#else
camera {
  //perspective
  location  <1, 2, -10>
  look_at   <0, 2,  0>
  right     x*1.33
  }
#end

light_source { <0,15,0> color rgb <1,1,1> }

#declare Glass_material =    // Glass material
material {
  texture {
    pigment {rgbt 1}
    finish {
      ambient 0.0
      diffuse 0.05
      specular 0.6
      roughness 0.005
    }
  }
  interior {
    ior 1.5
    fade_power 1001
    fade_distance 0.9
    fade_color <0.5,0.8,0.6>
  }
}



// floor
box      { <-4,0,-4>,<4,0,4>    pigment { checker color Black, color
White} }
// pole
cylinder { <0,0,0>,<0,3.5,0>, 0.1   pigment { color MediumSpringGreen } }

// lens
intersection
{
   sphere { <0, 5.5, 0>, 6 }
   sphere { <0, -5.5, 0>, 6 }

   rotate 90*x
   translate y*2-3*z

// Beware, layered textures ahead...
   pigment { color rgbt <0.2, 0.41176, 0.43922, 0.8> }
   interior { ior 1.5 }

   material { Glass_material }

   photons { target collect off }
}


Post a reply to this message

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