POV-Ray : Newsgroups : povray.general : Oblique projection : Re: Oblique projection Server Time
31 Jul 2024 08:20:57 EDT (-0400)
  Re: Oblique projection  
From: Trevor G Quayle
Date: 3 Jan 2008 10:25:01
Message: <web.477cfdef443d65d7c150d4c10@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> 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

This is a top side oblique, which seems fairly easy to achieve, you need to
basically adjust the aspect ratio of the camera to the correct proportions
which you have done.  I haven't been able to get this to work properly with
front or side projected oblique.  For the top-side as you've shown, the image
and camera merely need to be stretched, whereas with front/side, it also needs
to be sheared.

>
> 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

You shouldn't need to have to stretch the actual object using this method.  The
problem is you are only rotating up 30deg so when you stretch the aspect ratio
to make the top square, the projection length becomes too long which is why you
are having to shorten it.  In order to get the 1:1 legth without having to
stretch the object, you need to rotate up 45 degrees before stretching. Try
this:
//START
camera{
 orthographic
 location -z*(CameraDistance)
 direction z
 up y*5/2   *sind(45)  //stretch to square top for 45deg rotation
 right x*5/2           //no need to stretch in this direction
 rotate <45,0,0>       //rotate up 45 degrees
}

light_source{
 -100*z
 rgb 1
 rotate <60,30,0>
 parallel
 shadowless
}

box{
 -0.5,0.5
 rotate y*45
 pigment {rgb 1}
}
//END



> achieve this. The projection used for the oblique image is called cavalier
> perspective, I believe.

Yes, cavalier projection, where the projected length is shown the same as the
true length, as opposed to cabinet projection where it is shortend to half
scale.


-tgq


Post a reply to this message

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