POV-Ray : Newsgroups : povray.general : Reverse operation of camera code : Re: Reverse operation of camera code Server Time
24 Apr 2024 08:02:09 EDT (-0400)
  Re: Reverse operation of camera code  
From: Bald Eagle
Date: 27 Jun 2019 06:30:00
Message: <web.5d1499f52334b4c74eec112d0@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:

> I am overhauling "screen.inc". The macro has many modes, but it is only
> meant to be called once per scene/render. You would need to run the
> macro multiple times in order to create a variable and retrieve its
> value later on.

One would presume that normal usage would start with a user declaring a camera
location and look_at.  That gives you both direction and magnitude.

#declare Temp_Direction = whatever;  right at the beginning of the macro.

Just use that stored value to fix your normalized vector before exiting the
macro.
Problem solved.




There are also loops, and #ifndef().

#while (Q) some flag to say that you're done, is undefined, loop back.
you can use #switch / #case / #break to select first pass or second pass code,
if you even needed to do more than a single macro run, which I don't think you'd
need to.

Just saying it's possible, not that it's necessary.


Post a reply to this message

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