POV-Ray : Newsgroups : povray.general : Oblique projection : Re: Oblique projection Server Time
31 Jul 2024 08:28:35 EDT (-0400)
  Re: Oblique projection  
From: SharkD
Date: 3 Jan 2008 09:20:01
Message: <web.477cede6443d65d7849476bf0@news.povray.org>
OK, I think I accomplished what I set out to do.

Compare the isometric image of a cube:
http://img134.imageshack.us/img134/6726/cubeisometricot0.png
with the oblique image of the same cube:
http://img141.imageshack.us/img141/639/cubeobliquedl4.png

Here is the scene for the isometric image:

camera
{
 orthographic
 location -z*(CameraDistance)
 direction z*(CameraDistance)
 up y*5/2
 right x*5/2
 rotate <asind(tand(30)),45,0>
}

light_source
{
 <0, 0, -100>            // light's position (translated below)
 color rgb <1, 1, 1>  // light's color
 rotate <60,30,0>
 parallel
 shadowless
}

box
{
 -0.5,0.5
 texture
 {
  pigment {rgb 1}
  finish {Phong_Glossy}
 }
}

Here is the scene for the oblique image:

camera
{
 orthographic
 location -z*(CameraDistance)
 direction z*(CameraDistance)
 up y*tand(30)*5/2 * (tand(45)/sind(45))/(tand(30)/sind(30))
 right x*5/2 * (tand(45)/sind(45))/(tand(30)/sind(30))
 rotate <asind(tand(30)),45,0>
}

light_source
{
 <0, 0, -100>            // light's position (translated below)
 color rgb <1, 1, 1>  // light's color
 rotate <60,30,0>
 parallel
 shadowless
}

box
{
 -0.5,0.5
 texture
 {
  pigment {rgb 1}
  finish {Phong_Glossy}
 }
 scale y *  tand(30) * (tand(45)/sind(45))/(tand(30)/sind(30))
}

The oblique image is scaled so that that the length of the axes is the same in
both images. Note that I had to also scale the height of the object in order to
achieve this. The projection used for the oblique image is called cavalier
perspective, I believe.


Post a reply to this message

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