POV-Ray : Newsgroups : povray.binaries.images : user defined "slit camera" : Re: user defined "slit camera" Server Time
26 Apr 2024 19:55:22 EDT (-0400)
  Re: user defined "slit camera"  
From: ingo
Date: 17 Jan 2019 08:25:32
Message: <XnsA9DA92BF5A020seed7@news.povray.org>
in news:XnsA9DA8E84160EEseed7@news.povray.org ingo wrote:

> I expected the 
> thing to become thinner.

Added a vertical angle, now it gets 'thinner'

ingo

---%<------%<------%<---
#version 3.8;
global_settings {assumed_gamma 1}
light_source {<0.2,0,0> rgb 1}
light_source {<100,1000,-1000> rgb 1}

#macro SlitCam(Radius, LookAt, Angle)
  #local F_Xrad=function(u){(u)*tau}; //360 angle
  #local F_X=function(u,X,R){X+R*cos(F_Xrad(u))};
  #local F_Z=function(u,Z,R){Z+R*sin(F_Xrad(u))};
  #local F_Vangle=function(v,Y,R,VA){Y+R*sin(v*radians(VA))};
  #local VA = Angle;
  #local R = Radius;  
  #local X = LookAt.x;
  #local Y = LookAt.y;
  #local Z = LookAt.z;
  camera{
    user_defined
    location {
      function {F_X(u,X,R)}
      function {F_Vangle(v,Y,R,VA)}
      function {F_Z(u,Z,R)}
    }
    direction {
      function{X-F_X(u,X,R)}
      function{v} 
      function{Z-F_Z(u,Z,R)}
    }
  }
#end

SlitCam(2, <0,1,0>, 15)

sphere{<.1,1,0>,0.3 pigment{rgb x}}
sphere{<0,1,.1>,0.3 pigment{rgb y}}
sphere{<0,1,-.1>,0.3 pigment{rgb z}}
sphere{<-.1,1,0>,0.3 pigment{rgb x+z}}


Post a reply to this message

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