POV-Ray : Newsgroups : povray.binaries.images : user defined "slit camera" Server Time
25 Dec 2024 12:42:37 EST (-0500)
  user defined "slit camera" (Message 1 to 2 of 2)  
From: ingo
Subject: user defined "slit camera"
Date: 17 Jan 2019 08:00:35
Message: <XnsA9DA8E84160EEseed7@news.povray.org>
Not the most exiting image, but my first attempt at a user define camera.

The camera revolves around the y-axis through the look_at point. The 
radius specifies how far it is from that point.

Changing the radius dos not change the scale of things, I expected the 
thing to become thinner. For now it just prevents intersection with the 
objects within the radius.

Also I'm not sure what to do with the Y-function in the direction, just 
leave it at v or should Y be incorporated somehow?


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)
  #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 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 {v+Y}
      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>)

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


Attachments:
Download 'slit_cam.png' (7 KB)

Preview of image 'slit_cam.png'
slit_cam.png


 

From: ingo
Subject: Re: user defined "slit camera"
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.