POV-Ray : Newsgroups : povray.general : How to display image? : Re: How to display image? Server Time
31 Jul 2024 06:18:05 EDT (-0400)
  Re: How to display image?  
From: Leroy
Date: 17 Sep 2007 23:23:58
Message: <46EF4523.6010706@joplin.com>
Pahidla wrote:
> Hi,
> 
> What's the easiest way to display a 2D image, like a phtograph hanging on a
> wall. I've tried something like
> 
> box {
>     < 10, 20, 5 >
>     < 10, 22, 7 >
>     pigment {
>       image_map {jpeg "puppy.jpg"}
>       scale 2
>     }
> }
> 
> but the box shows gibberish.
> 
> Thanks in advance!
> 
> Pahidla
> 
> 

  By default, the image is mapped onto the x-y-plane. The image is 
projected onto the object as though there were a slide projector 
somewhere in the -z-direction. The image exactly fills the square area 
from (x,y) coordinates (0,0) to (1,1) regardless of the image's original 
size in pixels.

What is mostly done is something like this:
  box {
      < 0, 0, 0 >
      < 1, 1, 1 >
      pigment {
        image_map {jpeg "puppy.jpg"}
      }
     scale 2
     rotate (if needed)
     translate (if needed)
    }

Have Fun!


Post a reply to this message

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