POV-Ray : Newsgroups : povray.newusers : possible to cast single rays? : Re: possible to cast single rays? Server Time
30 Jul 2024 22:16:58 EDT (-0400)
  Re: possible to cast single rays?  
From: Mike Williams
Date: 23 Jun 2003 13:41:34
Message: <ZVUabDAalz9+Ew60@econym.demon.co.uk>
Wasn't it simon shannon who wrote:
>
>Dear All,
>
>    I have a height field with an image draped over it (image_map).
>Instead of generating an image of the whole scene, I would just like
>to know the value of, say 1000 specified pixels taken from a 512x384
>view and write them out to a file. Is that possible?

You can use trace() and eval_pigment() to achieve something like the
equivalent of casting an individual ray. Trace() will tell you the point
where your ray intersects the object. Eval_pigment() will tell you the
colour of the pigment at that point. 

You'll also need to use #fopen and #write() to write the data to a file.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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