POV-Ray : Newsgroups : povray.tools.general : Returning camera position. : Re: Returning camera position. Server Time
26 Apr 2024 21:55:20 EDT (-0400)
  Re: Returning camera position.  
From: Stephen
Date: 25 Nov 2012 17:10:06
Message: <50b2973e$1@news.povray.org>
On 25/11/2012 9:33 PM, StephenS wrote:

That is clever, it is past my bedtime as I have to get up at 5:30. So I 
will study it later.
Thanks.

Stephen

> .....
> Camera
> Box
> force declare, force export; with raw script
> inspect generated script
>
>
> //------- C Raw Script Begin -------
> #declare AA="
> //------- C Raw Script End ---------
>
> #declare C =
> camera {
>   perspective
>   location <-4.000,6.000,-12.000>
>   up y
>   right 1.333*x
>   angle 33.000
>   sky <0.136,0.904,0.407>
>   look_at < 0.000, -0.000, 0.000 >
> }
>
>
> //------- B Raw Script Begin -------
> ";
> //------- B Raw Script End ---------
>
> #declare B =
> box {
>   < -0.5000000, -0.5000000, -0.5000000 >, < 0.5000000, 0.5000000, 0.5000000 >
> }
>
> Bishop3d will update the camera statement for each file in the animation.
>
> #local Mycount = 0;
> //Find the first use of 'scale'
> #while (strcmp(substr(Mystring,Mycount,5) , "scale")!=0 & Mycount !=
> strlen(Mystring)-5)
>    #local Mycount = Mycount+1;
> #end
>
> ** example of parseing, this is for scale**
>
> Recreate the camera statement
>
> #declare C = camera{
> perspective
> location Mystring
> .....
> }
> // C is the name of the camera in
> // this example that Bishop3d exports at the end of the scene file
>
> #if (Mycount != strlen(Mystring)-5) // if scale is found in the string, then
> scale the function
>    #local Scale_x = val (substr(Mystring,Mycount+11,Mycomma-Mycount+11));
>
> You now also have a variable to give to other macros.
>
> This is not working code, and is taken from different scene files. It is only to
> show, that if you can wrap the exported camera statement in quotation marks, you
> can re-parse the code back into Bishop3d.
>
> A better example can be made with time ;-)
>
> Stephen S
>
>


-- 
Regards
     Stephen


Post a reply to this message

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