POV-Ray : Newsgroups : povray.general : Overlaying object over an image : Re: Overlaying object over an image Server Time
18 Apr 2024 14:27:19 EDT (-0400)
  Re: Overlaying object over an image  
From: 6digit
Date: 30 Jul 2022 18:00:00
Message: <web.62e5a8d88506b86234c05824fb08dd02@news.povray.org>
"m@b" <sai### [at] googlemailcom> wrote:
> It has been pointed out that "image_width" and "image_height" are
> built-in POV-Ray variables.
>
> Here is a corrected version of my answer:
>
> >
> > here is mt previous answer rotated into the x, z, plane:
> >
> > /////////////////////////////////////////////////////////////////////////
>
>
> #declare Image_W = 2592;
> #declare Image_H = 1944;
>
>
> // perspective (default, not required) camera
> camera {
>    orthographic
>    location  <Image_W/2, 10000, Image_H/2,>
>    look_at   <Image_W/2, 0, Image_H/2>
>    right     x*Image_W/1944   // aspect
>    //direction<3129.6857,3102.3533,0>
>    focal_point < 563.2927, 0, 1366.9001>
>    aperture 3.6171875
>    // direction z                        // direction and zoom
>    angle 16                           // field (overides direction zoom)
> }
>
>
> box{<0,0,0>,<1,1,0.001>
>      pigment {image_map {"D:/Files/Photos/Historic boats/027.JPG" once
> map_type 0 interpolate 2 } }
>      finish {ambient 1 diffuse 0}
>      scale <Image_W, Image_H, 1>
>      rotate<90,0,0> // Rotate into the x,z plane
> }
>
> box{<0,0,0>,<900,2,-80>        // Size
>      pigment{rgb<1,0,1>}           // Colour
>      finish {ambient 1 diffuse 0}  // Make it visible
>      translate<88,1,88>          // Move it about (the y*1 puts it above
> the image box)
> }
>
>
>
> > ////////////////////////////////////////////////////////////////////////

Good evening im hoping any one can see this message i notice something when
scrolling through this code.
location  <Image_W/2, 10000, Image_H/2,>
>    look_at   <Image_W/2, 0, Image_H/2>

i notice the predefined width and height were divided by 2. why ? and what does
it do exactly. thank you


Post a reply to this message

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