1

I want to draw following using POV-Ray.

enter image description here

#include "colors.inc" 
#include "glass.inc"
#include "textures.inc"   

global_settings { ambient_light color White}

camera { 
    location <0, 0, -10>
    right x*image_width/image_height 
    look_at<0, 0, 0>
}

background { White }   

#declare BEAKER_HEIGHT = 1;                  
#declare cyclinder_xpos = 0;

difference
{
   cylinder
   {       
      <cyclinder_xpos, -3, 0>, <cyclinder_xpos, BEAKER_HEIGHT, 0>, 1
   }
   cylinder
   {       
      <cyclinder_xpos, -2.95, 0>, <cyclinder_xpos, BEAKER_HEIGHT-2, 0>, 0.89 
      texture { Water}
   } 
   pigment
   {      
      rgbt .8
   }
   finish
   {
      Glass_Finish
   }     
}

If cyclinder_xpos = 0, its result is

enter image description here

If cyclinder_xpos = 5, its result is

enter image description here

If the position is changed, the cylinder is changed. How can I move cylinder without distortion?

Pradip Kharbuja
  • 3,442
  • 6
  • 29
  • 50

1 Answers1

1

To avoid distortions, consider using an orthographic camera, as the default one is perspective:

camera {
    orthographic
    location <0, 0, -10>
    up <0, 10, 0> // these two options...
    right <10, 0, 0> // will define the viewport's size
    look_at<0, 0, 0>
}
Vadim Landa
  • 2,784
  • 5
  • 23
  • 33