|
![](/i/fill.gif) |
"SharkD" <nomail@nomail> wrote:
> "Rune" <aut### [at] runevision com> 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.
I see what you are trying to do, but actually to be equivilant, segment d should
equal segment b. You are assuming that a is shown as the correct length, but in
the iso projection, a is shortened from what it should be (ie, not 1:1), whereas
segment b is already the correct length as it has no distortion from the
projection. This means that the same horizontal camera sizeworks for both
-tgq
Post a reply to this message
|
![](/i/fill.gif) |