POV-Ray : Newsgroups : povray.general : Automatic copyright text - need math help : Re: Automatic copyright text - need math help Server Time
13 Aug 2024 07:23:42 EDT (-0400)
  Re: Automatic copyright text - need math help  
From: Nathan Kopp
Date: 16 Oct 1998 12:21:47
Message: <3627644F.A02E0B5C@ltu.edu>
John:

This is great code!!! I'm just now taking a class in linear algebra, so this
really makes sense to me and I've adopted it into my lens flare include file.
I would make one change, though.  In the line that reads:

  #local CamR = vnormalize(vcross(y,CamD));

I would change "y" to the sky vector (the default happens to by "y").
This way, you can use it with scenes from Moray (which uses "z" as the sky
vector) and also with scenes that roll the camera.

-Nathan

John VanSickle wrote:
> 
> Lewis Sellers wrote:
> >
> > Well, I was trying to do this myself, but my math is so weak it'll take
> > me forever.... :)
> >
> > Ok. I was trying to make it so that the small text "Copyright 1998 by
> > Lewis Sellers" would automatically be placed in the bottom left of any
> > scene I rendered no matter the camera positions. Very handy in
> > animations, etc.
> 
> #local CamE = <0,0,0>; //where the camera's look_at is
> #local CamL = <10,12,1>; //where the camera's location is
> #local CamZ = 2; //the amount of camera zoom you want
> 
> #local CamD = vnormalize(CamE-CamL);
> #local CamR = vnormalize(vcross(y,CamD));
> #local CamU = vnormalize(vcross(CamD,CamR));
> 
> text { ttf "cyrvetic.ttf","(c) 1998 by Lewis Sellers",.01,0
>   texture { YourTexture }
>   scale .1
>   translate <-.65,-.45,CamZ>
>   matrix < CamR.x,CamR.y,CamR.z,
>            CamU.x,CamU.y,CamU.z,
>            CamD.x,CamD.y,CamD.z,
>            CamL.x,CamL.y,CamL.z >
> }
> 
> camera {
>   location CamL
>   up CamU
>   right CamR*4/3
>   direction CamD*CamZ
> }
> 
> Hope this helps,
> John
> 
> --
> "He has the power to rear-project major cities!" -- Mike Nelson


Post a reply to this message

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