POV-Ray : Newsgroups : povray.general : Oblique projection : Re: Oblique projection Server Time
31 Jul 2024 08:19:46 EDT (-0400)
  Re: Oblique projection  
From: SharkD
Date: 5 Jan 2008 09:55:00
Message: <web.477f996c443d65d7e14fbc8d0@news.povray.org>
"Rune" <aut### [at] runevisioncom> wrote:
> "SharkD" wrote:
> > Here's my version (a little more exact).
>
> Looks fine, but I'm curious how it is more exact exactly. I mean, sure,
> instead of a CameraArea of 3.03 you effectively use one of
>
> 5/2*(tand(45)/sind(45))/(tand(30)/sind(30)) which evaluates to 3.0618621785
>
> But that's just the "zoom" of the image (or the orthographic equivalent of
> zoom) and has nothing to do with the skewing. Your variable name SkewAdjust
> seem confusing that way, since it sounds like it adjusts the skewing, while
> it just adjusts the size of the visible area. The projection itself is
> exactly the same as the one I posted and which several others suggested all
> along.
>
> Rune
> --
> http://runevision.com

More exact because it's less arbitrary?

Here, I created a diagram to show you the derivation of the formula:

http://img263.imageshack.us/img263/8406/cubescomparepe2.png

On the left you see an isometric rendering of a cube. On the right you see the
same rendering, except that the projection plane is skewed so that it becomes
oblique instead of isometric. Now, one result of skewing the projection plane
is that the unit scale in the resulting image is different than in the
original. To fix this, one must simply scale the oblique image by an amount
equal to the ratio of the lengths of some vector that exists in both images,
but is scaled in one.

In this case I wanted to scale the image on the right so that segment c in the
right image is equal in length to segment a in the left image. The formula I
provided does just that.

Here's another way of obtaining the same result, except using a different
formula (one based on the pythagorean theorem):

sqrt(1^2 + tan(45)^2) / sqrt(1^2 + tan(30)^2)

You then multiply this by 5/2 to get the correct projection plane dimensions.


Post a reply to this message

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