POV-Ray : Newsgroups : povray.advanced-users : camera math help please : Re: camera math help please Server Time
30 Jul 2024 12:23:50 EDT (-0400)
  Re: camera math help please  
From: PoD
Date: 25 Jul 1999 12:10:36
Message: <379B3706.43F4752D@merlin.net.au>
Arthur Flint wrote:
> 
> I think that it should be more like this:
> camera  {
>         location 0
>         sky SurfaceDirection
>         look_at vaxis_rotate( ?? , SurfaceDirection ,Degrees )
>         angle 40
>         translate Surface*1.002
>         }
> 
> The SurfaceDirection vector determines where on the sphere.
> The Surface vector is the distance at that spot.
> Degrees is how much to rotate around the SurfaceDirection vector.
> 
> Those Three I already have. Its those two question marks in
> vaxis_rotate( ?? , SurfaceDirection ,Degrees ). They represent
> a point on the plane at Surface distance from the center that is
> tangent to the sphere.
> The SurfaceDirection vector is the normal to a plane tangent to
> the sphere. I need to find a point on that plane so I can point
> look_at in the proper direction.
> 
> Does that help? Maybe I should try a different approach, maybe not.
> 
> Mr. Art
> ingo wrote:
> >
> > Is this what you're looking for?
> >
> > #declare Radius= SphereRadius;
> > #declare Offset= WhatYouWant;
> >
> > camera {
> >     location <0,Radius+Offset,0>
> >     look_at <0,Radius+Offset,Radius+Offset>
> >     rotate <random, random, random>
> > }
> >
> > ingo
> > --
> > Met dank aan de muze met het glazen oog.
> > Arthur Flint heeft geschreven in bericht <379A1910.98B51D61@gci.net>...
> > >I have been working with placing a camera on the surface of a sphere
> > >on a random position. I would like the camera to be aligned so that
> > >the the surface is "down". I guess that "up" would be the vector to
> > >rotate
> > >around to view the surface.
> > >Assuming a vector of SurfaceDirection as "up", what are the prameters
> > >for the camera?
> > >--
> > >Advanced means constantly wondering where reality gets its processing
> > >power.
> 
> --
> Advanced means constantly wondering where reality gets its processing
> power.

You might want to look at John VanSyckle's matrix macros
http://users.erols.com/vansickl/macs.zip
I think the Reorient macro does what you want.

Cheers, PoD.


Post a reply to this message

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