POV-Ray : Newsgroups : povray.animations : Splines and Cameras Server Time
24 Apr 2024 19:52:29 EDT (-0400)
  Splines and Cameras (Message 1 to 7 of 7)  
From: jkennedy12
Subject: Splines and Cameras
Date: 16 Apr 2011 23:00:01
Message: <web.4daa56c4cb84c9873c82a5bf0@news.povray.org>
camera {
        location Spline_Trans(Spline_1,0.0,y,0.03,0.95)
        look_at Spline_Trans(Spline_1,0.2,y,0.03,0.95)
}
That should sum up what I want to start with. This gives me an error and sends
me to the transform.inc file. Does anyone have a solution to this?


Post a reply to this message

From: Alain
Subject: Re: Splines and Cameras
Date: 17 Apr 2011 12:29:16
Message: <4dab155c@news.povray.org>

> camera {
>          location Spline_Trans(Spline_1,0.0,y,0.03,0.95)
>          look_at Spline_Trans(Spline_1,0.2,y,0.03,0.95)
> }
> That should sum up what I want to start with. This gives me an error and sends
> me to the transform.inc file. Does anyone have a solution to this?
>
>

The Spline_Trans() macro is undefined by default. You need to include 
transform.inc to have access to the definition of that macro.

Add this line before you attempt to use SplineTrans:

#include "transform.inc"



Alain


Post a reply to this message

From: jkennedy12
Subject: Re: Splines and Cameras
Date: 17 Apr 2011 16:15:01
Message: <web.4dab49a184bc41c93c82a5bf0@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:

> > camera {
> >          location Spline_Trans(Spline_1,0.0,y,0.03,0.95)
> >          look_at Spline_Trans(Spline_1,0.2,y,0.03,0.95)
> > }
> > That should sum up what I want to start with. This gives me an error and sends
> > me to the transform.inc file. Does anyone have a solution to this?
> >
> >
>
> The Spline_Trans() macro is undefined by default. You need to include
> transform.inc to have access to the definition of that macro.
>
> Add this line before you attempt to use SplineTrans:
>
> #include "transform.inc"
>
>
>
> Alain

I know that. It is already included in the file before this segment of code
takes place. This is at the very bottom.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Splines and Cameras
Date: 17 Apr 2011 16:45:01
Message: <web.4dab511c84bc41c9c734aecd0@news.povray.org>
"jkennedy12" <jke### [at] cornellcollegeedu> wrote:
> camera {
>         location Spline_Trans(Spline_1,0.0,y,0.03,0.95)
>         look_at Spline_Trans(Spline_1,0.2,y,0.03,0.95)
> }
> That should sum up what I want to start with. This gives me an error and sends
> me to the transform.inc file. Does anyone have a solution to this?

A 3D-vector is expected both after location and look_at.
The Spline_Trans() macro returns a transformation, not a 3D-vector.

If you want to apply a transformation to a 3D-vector, you can do it like this:

#declare SplineTransform = Spline_Trans(Spline_1, 0.0, y, 0.03, 0.95)
#declare p0 = <0, 0, 0>;
#declare p0_Transformed = vtransform(p0, SplineTransform);

--
Tor Olav
http://subcube.com


Post a reply to this message

From: jkennedy12
Subject: Re: Splines and Cameras
Date: 17 Apr 2011 20:45:00
Message: <web.4dab895884bc41c93c82a5bf0@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "jkennedy12" <jke### [at] cornellcollegeedu> wrote:
> > camera {
> >         location Spline_Trans(Spline_1,0.0,y,0.03,0.95)
> >         look_at Spline_Trans(Spline_1,0.2,y,0.03,0.95)
> > }
> > That should sum up what I want to start with. This gives me an error and sends
> > me to the transform.inc file. Does anyone have a solution to this?
>
> A 3D-vector is expected both after location and look_at.
> The Spline_Trans() macro returns a transformation, not a 3D-vector.
>
> If you want to apply a transformation to a 3D-vector, you can do it like this:
>
> #declare SplineTransform = Spline_Trans(Spline_1, 0.0, y, 0.03, 0.95)
> #declare p0 = <0, 0, 0>;
> #declare p0_Transformed = vtransform(p0, SplineTransform);
>
> --
> Tor Olav
> http://subcube.com
So if I wanted to place the camera 1 unit above the track, p0 would equal
<0,1,0>, yes?


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Splines and Cameras
Date: 18 Apr 2011 13:30:00
Message: <web.4dac743a84bc41c9c734aecd0@news.povray.org>
"jkennedy12" <jke### [at] cornellcollegeedu> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > "jkennedy12" <jke### [at] cornellcollegeedu> wrote:
> > > camera {
> > >         location Spline_Trans(Spline_1,0.0,y,0.03,0.95)
> > >         look_at Spline_Trans(Spline_1,0.2,y,0.03,0.95)
> > > }
> > > That should sum up what I want to start with. This gives me an error and sends
> > > me to the transform.inc file. Does anyone have a solution to this?
> >
> > A 3D-vector is expected both after location and look_at.
> > The Spline_Trans() macro returns a transformation, not a 3D-vector.
> >
> > If you want to apply a transformation to a 3D-vector, you can do it like this:
> >
> > #declare SplineTransform = Spline_Trans(Spline_1, 0.0, y, 0.03, 0.95)
> > #declare p0 = <0, 0, 0>;
> > #declare p0_Transformed = vtransform(p0, SplineTransform);
> >
> So if I wanted to place the camera 1 unit above the track, p0 would equal
> <0,1,0>, yes?


I would guess so (but I've never used that macro).

--
Tor Olav
http://subcube.com


Post a reply to this message

From: jkennedy12
Subject: Re: Splines and Cameras
Date: 18 Apr 2011 17:05:00
Message: <web.4dac9e8084bc41c93c82a5bf0@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "jkennedy12" <jke### [at] cornellcollegeedu> wrote:
> > "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > > "jkennedy12" <jke### [at] cornellcollegeedu> wrote:
> > > > camera {
> > > >         location Spline_Trans(Spline_1,0.0,y,0.03,0.95)
> > > >         look_at Spline_Trans(Spline_1,0.2,y,0.03,0.95)
> > > > }
> > > > That should sum up what I want to start with. This gives me an error and sends
> > > > me to the transform.inc file. Does anyone have a solution to this?
> > >
> > > A 3D-vector is expected both after location and look_at.
> > > The Spline_Trans() macro returns a transformation, not a 3D-vector.
> > >
> > > If you want to apply a transformation to a 3D-vector, you can do it like this:
> > >
> > > #declare SplineTransform = Spline_Trans(Spline_1, 0.0, y, 0.03, 0.95)
> > > #declare p0 = <0, 0, 0>;
> > > #declare p0_Transformed = vtransform(p0, SplineTransform);
> > >
> > So if I wanted to place the camera 1 unit above the track, p0 would equal
> > <0,1,0>, yes?
>
>
> I would guess so (but I've never used that macro).
>
> --
> Tor Olav
> http://subcube.com
Yes. It works like that. Thank you very much for the help. I added in another
spline macro for animation and pipe-like rails. I'll post what I made up here
sometime soon.


Post a reply to this message

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