W3C home > Mailing lists > Public > www-svg@w3.org > September 2008

Re: Pseudo3D by distorting the bounding box

From: David Woolley <forums@david-woolley.me.uk>
Date: Tue, 02 Sep 2008 08:26:41 +0100
Message-ID: <48BCEAB1.7030405@david-woolley.me.uk>
To: www-svg@w3.org

Manuel Strehl wrote:
> P(x,y) -> P(x',y'), with
> x' = x + (deviation_left*(1 - x_rel/width) - deviation_right*(x_rel/width)),
> y' = y + (deviation_top*(1 - y_rel/height) -
> deviation_bottom*(y_rel/height)),

It looks to me that the problem with this, compared to a true 
perspective transform, is that it assumes that a constant delta y in the 
map corresponds to a constant delta y in the image to be transformed. 
In a real perspective transform, you will get a smaller transformed 
delta y in the "distance".

The standard 3D homogenous transform matrix can produce a true 
perspective effect, with z zero on input.  For the satellite navigation 
use case, you would want this, latter, behaviour.  Whilst it may not be 
as easy to use if you are a pure WYSIWYG person, it wouldn't be that 
difficult for the authoring tool to let you manipulate the image in 3D 
terms then output the necessary parameters.

Applying the transform matrix on the client side only involves 
multiplications and additions.
David Woolley
Emails are not formal business letters, whatever businesses may want.
RFC1855 says there should be an address here, but, in a world of spam,
that is no longer good advice, as archive address hiding may not work.
Received on Tuesday, 2 September 2008 07:27:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:15 UTC