/********************************************************************************** Persistence of Vision Ray Tracer Scene Description File File name : DJ_FieldCamTest.pov Version : 3.6.1c / MegaPOV 1.21 Description : A macro to simulate lens movements in architectural scenes Helps prevent the "falling verticals syndrome" Date : September 2005 Author : Doctor John E-mail : see more details in Externals\Doctor John\ Copyright (C) 2009. All rights reserved. Use and/or modification of this scene is free, except for commercial purposes. Commercial distribution is not allowed without written permission from the author. **********************************************************************************/ // Render settings (right-click on a line below): // +w640 +h640 +a0.3 +am2 #default {pigment {rgb <1,0,0>}} #default {finish {ambient 0}} // Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.5 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ? // #version 3.5; #include "colors.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- /*********************************************************************** Don't forget to switch off Vista Buffers by using -uv on the command line or Vista_Buffer=0 in your .ini file before attempting to render your image ***********************************************************************/ #macro FieldCam (CP, CL) #local CD=CL-CP; #if (CD.x!=0 | CD.z!=0) // Note: That's a Boolean OR not an uppercase i // or a lowercase L! #local HypoXZ=sqrt(pow(CD.x, 2)+pow(CD.z, 2)); #local VCorr=pow(vlength(CD), 2)/pow(HypoXZ, 2); #local CosThetaX=CD.x/HypoXZ; #local CosThetaZ=CD.z/HypoXZ; #if (CD.x=0) #local ShearX=0; #else #local ShearX=(CD.y/CD.x)*pow(CosThetaX, 2); #end #if (CD.z=0) #local ShearZ=0; #else #local ShearZ=(CD.y/CD.z)*pow(CosThetaZ, 2); #end #declare NoFall=transform { matrix <1, 0, 0, ShearX, VCorr, ShearZ, 0, 0, 1, 0, 0, 0> } #else #warning "Viewing vector is perpendicular to XZ-plane.\n" #warning "Camera changed to default type.\n" #declare NoFall=transform { matrix <1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0> } #end #end #declare CamPos=<0.0, 0.5, -4.0>; #declare CamLook=<0.0, 1.0, 0.0>; camera { FieldCam (CamPos, CamLook) perspective location CamPos angle 50 // Not essential but can be used right x*image_width/image_height // Also not essential but can be used transform {NoFall} look_at CamLook } sky_sphere { pigment { gradient y color_map { [0.0 rgb <0.6,0.7,1.0>] [0.7 rgb <0.0,0.1,0.8>] } } } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-30, 30, -30> } // ---------------------------------------- plane { y, -1 pigment { color rgb <0.7,0.5,0.3> } } sphere { 0.0, 1 texture { pigment { radial frequency 8 color_map { [0.00 color rgb <1.0,0.4,0.2> ] [0.33 color rgb <0.2,0.4,1.0> ] [0.66 color rgb <0.4,1.0,0.2> ] [1.00 color rgb <1.0,0.4,0.2> ] } } finish{ specular 0.6 } } translate <1, 0, 1> } box { <-1, -1, -1>, <1, 3, 1> rotate 45*y translate <-1.5, 0, 5> texture { pigment { radial frequency 8 color_map { [0.00 color rgb <1.0,0.4,0.2> ] [0.33 color rgb <0.2,0.4,1.0> ] [0.66 color rgb <0.4,1.0,0.2> ] [1.00 color rgb <1.0,0.4,0.2> ] } } finish{ specular 0.6 } } }