POV-Ray : Newsgroups : povray.general : Omni-directional Stereo Content : Re: Omni-directional Stereo Content Server Time
18 Apr 2024 21:46:36 EDT (-0400)
  Re: Omni-directional Stereo Content  
From: Clodo
Date: 9 Mar 2016 17:35:00
Message: <web.56e0a45e976329954e8811590@news.povray.org>
My current ODS user_defined camera (side-by-side only):

#declare odsIPD = 0.065;
#declare odsLocationX = 0;
#declare odsLocationY = 0;
#declare odsLocationZ = 0;
#declare odsDirectionX = 0;
#declare odsDirectionY = 0;
#declare odsDirectionZ = 1;
camera {
      user_defined
      location {
        function { odsLocationX + cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
pi)*odsIPD/2*select(x,-1,1) }
        function { odsLocationY }
        function { odsLocationZ + sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
pi)*odsIPD/2*select(x,-1,1) }
      }
      direction {
        function { sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) * cos(pi / 2 -
(1-(y+0.5))*pi) }
        function { sin(pi / 2 - (1-(y+0.5))*pi) }
        function { cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) * cos(pi / 2 -
(1-(y+0.5))*pi) }
      }
    }


I want to complete it and clean/optimize it, maybe useful in docs as example if
it deserves.
- In original Google docs formula about ODS, there isn't any reference about the
starting location and direction of the camera.
  The above code render always in forced direction <0,0,1>.
  Anyone can help me about where to place the odsDirectionX,Y,Z unused
variables? I don't know almost nothing about 3d maths...
- There is a function that return a float component from a given Vector?
  I aim to write
  #declare odsDirection = <0,1,1>
  and in function
  odsLocation.X
  ...
  because i'm forced to have six function that return float for location and
direction,
  or i can write two function that return a Vector?


Post a reply to this message

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