POV-Ray : Newsgroups : povray.binaries.images : The Orthographic Decapitation Server Time
30 Jul 2024 10:19:07 EDT (-0400)
  The Orthographic Decapitation (Message 21 to 26 of 26)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Le Forgeron
Subject: Re: The Orthographic Decapitation
Date: 18 Dec 2012 10:57:08
Message: <50d09254$1@news.povray.org>
Le 18/12/2012 08:38, MichaelJF a écrit :
> "Cousin Ricky" <rickysttATyahooDOTcom> wrote:
>> Sam's illustration conveys the camera much better than the existing diagram in
>> the docs, although Sam's illustration doesn't have a place for the angle.
> 
> Yes, indeed. But for a documentation or tutorial it needs more explanation (e.g.
> meaning of up and right). The problem with writing a doc or tut is, that one has
> to know which parameters are used by a special type of camera and which are not.
> Angle seems to make no sense, but is it ignored completelly when specified in
> the orthographic camera?

No, it is not ignored. Thanks to "upward compatibility", when angle is
specified, it change the specification of the orthographic camera to
have a view similar to the one with the perspective camera (it ignore
then the length of the right & up vector to define the area of the image
plane, and recompute them based on angle & direction & the ratio between
up and right... because angle only apply to the width of the picture).

And yet, when angle is not present, the actual lengths of right & up are
very significant, whereas the length of direction is not!


Post a reply to this message

From: gregjohn
Subject: Re: The Orthographic Decapitation
Date: 18 Dec 2012 13:00:01
Message: <web.50d0af07b526f52247b8a80e0@news.povray.org>
I think the whole problem is that up and right are best thought of as scalars,
the length in x and y of the image.

Anyway, here's my proposal for a doc/ wiki to explain the orthographic camera.
I'd be delighted if anyone took this and explained it better, made it prettier,
or even explained the regular camera.

In Linux circles, they spoke of a "girlfriend test," whether someone's
non-Linux-enthusiast SO could but up the OS and use it right away. My version of
this for povray is that someone with basic smarts in computers (say a FORTRAN or
BASIC- educated person) could pick up the docs, and on first sitting, make an
image with spheres perfectly in all four corners of the screen.  That I believe
would be a "Holy Grail" goal for the docs.

Four views:  Orthographic up too close, Orthographic sufficiently far away,
"Diagram" of Ortho up too close, "Diagram of Ortho far away.   White plane is
the camera's viewing plane.

#include"transforms.inc"

///-------------------------------------
//  1 means take image with orthographic camera
//  0 means look at scene as a very early draft for diagram
#declare your_orthographicness=1;
///-------------------------------------
///-------------------------------------
//  1 means a view where the camera plane cuts off figures
//  0 means a view where camera plane a healthy distance away
#declare your_too_closedness=0;
///-------------------------------------

#if(your_too_closedness)
        #declare your_location = 3.5*< 0,pow(2,0.5),-pow(2,0.5)> ;
#else
        #declare your_location = 15*<0,pow(2,0.5),-pow(2,0.5)> ;
#end




#declare your_up = 10;
#declare your_right = 10;
#declare your_look_at = 0;
#declare your_look_dirn = your_look_at-your_location;



#if(your_orthographicness)
        camera {orthographic
                location your_location
                look_at your_look_at         up your_up     right your_right
                }


#else
        camera{location <80,80,-25> look_at 0    angle 45}

        box{<-your_right,-your_up,-0.01>,<your_right,your_up,0>
                pigment{rgbt <.9,.9,1,0.5>}
                Reorient_Trans(<0,0,1>,your_look_dirn)
                translate your_location
                }
        sphere   {your_location, 0.5 pigment {rgb 0.1}}
        cylinder {your_location,0.25*(your_look_at-your_location)+your_location,
0.5 pigment {rgb 0.1}}

cone{0.25*(your_look_at-your_location)+your_location,1.5,0.35*(your_look_at-your_location)+your_location,
0  pigment {rgb 0.1}}

#end


sphere {your_look_at,1 pigment {rgb 0.1}}


background {rgb 1}

light_source{<-31010,250000.0,-250000> color rgb 1}
light_source{<12220,500,40000> color rgb 2 shadowless}



//cylinder

sphere{<-10,0,-10*pow(2,0.5)>,3.2 pigment {green 1}}
sphere{< 10,0,-10*pow(2,0.5)>,3.2 pigment {green 1}}
sphere{<-10,0, 10*pow(2,0.5)>,3.2 pigment {green 1}}
sphere{< 10,0, 10*pow(2,0.5)>,3.2 pigment {green 1}}

cylinder{<-10,0,-10*pow(2,0.5)>,<-10,0,-10*pow(2,0.5)>+100*<
0.00,10*pow(2,0.5),-10*pow(2,0.5)> ,.2 pigment {green 1}}
cylinder{< 10,0,-10*pow(2,0.5)>,< 10,0,-10*pow(2,0.5)>+100*<
0.00,10*pow(2,0.5),-10*pow(2,0.5)> ,.2 pigment {green 1}}
cylinder{<-10,0, 10*pow(2,0.5)>,<-10,0, 10*pow(2,0.5)>+100*<
0.00,10*pow(2,0.5),-10*pow(2,0.5)> ,.2 pigment {green 1}}
cylinder{< 10,0, 10*pow(2,0.5)>,< 10,0, 10*pow(2,0.5)>+100*<
0.00,10*pow(2,0.5),-10*pow(2,0.5)> ,.2 pigment {green 1}}

cylinder{0,100*< 0.00,10*pow(2,0.5),-10*pow(2,0.5)> ,.2 pigment {green 1}}





#declare nx=0;
#while(nx<16)
        #declare nz=0;
        #while(nz<16)

        sphere{0,1. pigment {red 1} translate <(nx-6.5)*2,0,(nz-6.5)*2> rotate
30*y}

        #declare nz=nz+1;
        #end
#declare nx=nx+1;
#end


Post a reply to this message


Attachments:
Download 'orthgrip031.png' (75 KB)

Preview of image 'orthgrip031.png'
orthgrip031.png


 

From: gregjohn
Subject: Re: The Orthographic Decapitation
Date: 18 Dec 2012 13:05:01
Message: <web.50d0af3eb526f52247b8a80e0@news.povray.org>
2 of 4


Post a reply to this message


Attachments:
Download 'orthgrip03b1.png' (72 KB)

Preview of image 'orthgrip03b1.png'
orthgrip03b1.png


 

From: gregjohn
Subject: Re: The Orthographic Decapitation
Date: 18 Dec 2012 13:05:02
Message: <web.50d0af5eb526f52247b8a80e0@news.povray.org>
3 of 4


Post a reply to this message


Attachments:
Download 'orthgrip03c1.png' (181 KB)

Preview of image 'orthgrip03c1.png'
orthgrip03c1.png


 

From: gregjohn
Subject: Re: The Orthographic Decapitation
Date: 18 Dec 2012 13:05:02
Message: <web.50d0af77b526f52247b8a80e0@news.povray.org>
4 of 4


Post a reply to this message


Attachments:
Download 'orthgrip03d1.png' (168 KB)

Preview of image 'orthgrip03d1.png'
orthgrip03d1.png


 

From: Samuel Benge
Subject: Re: The Orthographic Decapitation
Date: 18 Dec 2012 13:20:01
Message: <web.50d0b320b526f522111572a80@news.povray.org>
"MichaelJF" <mi-### [at] t-onlinede> wrote:
> "Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> > Sam's illustration conveys the camera much better than the existing diagram in
> > the docs, although Sam's illustration doesn't have a place for the angle.
>
> Yes, indeed. But for a documentation or tutorial it needs more explanation (e.g.
> meaning of up and right).

Oookay.... I thought you guys just wanted a portrayal of the problem, not a
complete camera diagram :P For such, I would've adhered to the documentation's
style. Perhaps sometime later I'll throw something together in Illustrator.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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