POV-Ray : Newsgroups : povray.animations : Fixed Look_At point? : Fixed Look_At point? Server Time
25 Apr 2024 17:05:09 EDT (-0400)
  Fixed Look_At point?  
From: George
Date: 20 Nov 2010 17:15:01
Message: <web.4ce846f0d3b91a0351058cc90@news.povray.org>
I'm using a quadratic spline to move my camera, but the camera looks straight
ahead on the path (like someone just looking ahead as they walk).  I want it to
focus on a specific point the entire way (<-5,-20,-400>).  How would I do that?
I've tried a rotate after the Spline_Trans. Right now the angle from around
where clock~=0.25 is the angle I want for the rest of the spline move, but I'm
not sure how to keep that view (I know the angle is changing; I'm having trouble
coming up with the formula I need to change the angle after the spline
transformation to keep the view angle I want).

This is what I have right now
//+W640 +H360 +A0.3
//initial_frame = 1
//final_frame = 125
//default clock
#include "colors.inc"
#include "transforms.inc"
#declare cameraSpline =
    spline{
        quadratic_spline
        00, <-3,-25,-650>   //start
        11, <800,200,1250>  //end
    }

camera{
    location <0,30,-1000>
    look_at <-5,-20,-400>
    Spline_Trans (cameraSpline, mod( (clock+0/6) ,1)*11, y, 0, 0)
    #if(clock <= 0.25)
        rotate <0,(-(clock*300)),0>
    #else
        rotate <0,-(0.25*300),0>
    #end
}

light_source{
    <-30,20,25>*90
    color White*3.5
}

sphere{
    <-5,-20,-400>,5
    texture{
        pigment { color Red }
        finish { ambient 1  }
    }
}

Thanks for any help!


Post a reply to this message

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