POV-Ray : Newsgroups : povray.binaries.images : New Macro Test : Re: New Macro Test Server Time
31 Jul 2024 00:29:18 EDT (-0400)
  Re: New Macro Test  
From: Anthony D  Baye
Date: 26 Sep 2010 17:35:01
Message: <web.4c9fb9e7d7d13dfd507e8a090@news.povray.org>
You might also try the golden section.

http://jakegarn.com/the-rule-of-thirds/

Reading the article raises interesting thoughts, such as placing the object of
interest at the convergence of a fib-spiral with the trailing end in one of the
front corners.

I prefer the intuitive approach, however.

just a thought.

A.D.B.

John VanSickle <evi### [at] hotmailcom> wrote:
> There is in film something called the rule of thirds, which says that
> for many shots, the main item of interest should be positioned one-third
> of the way across the screen, either from the right or from the left.
>
> I decided to write a macro to make it easier to point the camera so that
> an item of interest falls along one of these two lines.  For a test I
> simply re-used the scene from my last post (titled "Old School") with a
> couple of light sources taken away (one was positioned at the camera
> location, and the other was far off in the +x direction).
>
> Here are the macros.  There is one for positioning to the left, and
> another for positioning to the right.
>
> #macro PlaceLeftThird(pCamLoc,pCamEye,vCamSky,sCamZoom)
>    #local vD=vnormalize(pCamEye-pCamLoc);
>    #local vR=vnormalize(vcross(vCamSky,vD));
>    #local sD=vlength(pCamEye-pCamLoc)/sCamZoom * image_width/image_height/6;
>    (pCamEye+vR*sD)
> #end
>
> #macro PlaceRightThird(pCamLoc,pCamEye,vCamSky,sCamZoom)
>    #local vD=vnormalize(pCamEye-pCamLoc);
>    #local vR=vnormalize(vcross(vCamSky,vD));
>    #local sD=vlength(pCamEye-pCamLoc)/sCamZoom * image_width/image_height/6;
>    (pCamEye-vR*sD)
> #end
>
> In these macros, pCamLoc is the location of the camera, pCamEye is the
> location of the item that is to appear towards the left or towards the
> right, vCamSky is the direction of the sky vector used in the scene (y
> for the scenes I do), and sCamZoom is the length of the direction vector
> used in the camera.
>
> The macro returns a value which should be used as the look_at value in
> the camera definition.
>
> An example of macro use:
>
> camera {
>    location <100,20,-300>
>    direction z*2.5
>    look_at PlaceLeftThird(<100,20,-300>,<100,15,-100>,y,2.5)
> }
>
> If you use this in a right-handed scene (+x is right, +y is forward, +z
> is up) and this causes problems, let me know.
>
> A sample pic is attached.
>
> Regards,
> John


Post a reply to this message

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