For the bored, a sort of hand-wavy geometric proof

of this would go like this:

For a rectangle, R, with edges {e1,e2,e3,e4}, and

normal n. Edge e1 being fixed, rotate R about e1

such that n and the view vector v lie on the same

line, call this normal n_m. Call e3 the edge

opposite to e1. Let the screen-space area of R

be a function of its normal, A(n). We

want to show that n_m maximises A(n). Let V

be the plane constructed from the viewpoint and

e3.

Construct a cylinder C with its axis parallel to

e1 and such that e1 and its opposite edge, call

it e3, lie on the surface of the cylinder. Then

the surface of the cylinder represents the

constraint of e3, when we rotate R about e1. Also

V is a tangent plane of the cylinder. We now note

that in order for A(n) to not be a maximum at n_m,

the cylinder would have to intersect V somewhere

else than e3(n_m), but it doesn't because it is

a tangent plane to C.

Hmmm, very hand-wavy, but by its geometric construction

intuitively understandable.

---

Willem H. de Boer

Homepage: http://www.whdeboer.com

> -----Original Message-----

> From: gdalgorithms-list-***@lists.sourceforge.net

> [mailto:gdalgorithms-list-***@lists.sourceforge.net] On

> Behalf Of Megan Fox

> Sent: Thursday, July 21, 2005 9:32 PM

> To: gdalgorithms-***@lists.sourceforge.net

> Subject: Re: [Algorithms] rotating in world space to have

> result in screen space

>

> Forgive me if this is off, it's one of those "shouldn't this work?"

> sorts of intuition suggestions:

>

> The point at which a quad is most visible is always going to

> be when the normal of that quad is pointed directly at the

> viewer's position (or directly away from, but then it gets

> discarded, so ignore that).

> So, isn't the real question the closest you can rotate the

> normal to "camera lookat"?

>

>

> Here's where it gets even more dicey... shouldn't

> transforming the normalized quad-to-camera vector into the

> plane you're describing be able to give you the data

> necessary to generate the optimal transform?

>

>

> Sorry, I have no math to prove this, it just seems as if this "should"

> work? ... if I have time later, I'll try and work out an

> equation for all of this.

>

> -Megan Fox

>

> On 7/21/05, Andras Balogh <***@gmx.net> wrote:

> > Ok, so here's the original problem:

> >

> > I have a rectangle in world space, two of its neighbouring vertices

> > are locked at a fixed position (so you can rotate the

> rectangle around

> > the locked edge). Now, given an arbitrary viewing transform, rotate

> > the rectangle, so that its screen space size is maximized!

> >

> > I was thinking that I'll have the maximum area, if the

> normal vector

> > of the rotated rectangle is parallel in screen space to the

> projected

> > locked edge. So, having the screen space normal, I could

> compute the

> > angle between that and the screen space up vector. If I could

> > transform this angle back to world space, then I could just

> rotate the

> > rectangle by this amout..

> >

> > Ehh, I hope it makes some sense, there more I think about

> it, the more

> > confused I become :)

> >

> >

> > Andras

> >

> >

> > Ralph Egas wrote:

> > > Hi Andras,

> > >

> > > Are you looking for a solution for an arbitrary 'r' and

> 'p'? What if 'r'

> > > gets perpendicular to the right or up vector in screenspace?

> > > Obviously then there's not going to be any solution for

> any world space angle..

> > >

> > > If you could just elaborate your idea and what you need this

> > > solution for, maybe that could help.

> > >

> > > Cheers,

> > >

> > > Ralph

> > >

> > > ----- Original Message ----- From: "Andras Balogh"

> > > <***@gmx.net>

> > > To: <gdalgorithms-***@lists.sourceforge.net>

> > > Sent: Thursday, July 21, 2005 8:02 PM

> > > Subject: [Algorithms] rotating in world space to have result in

> > > screen space

> > >

> > >

> > >> I have a point 'v0' in world space, that I can only

> rotate around a

> > >> fixed point 'p' and axis 'r'. So movement is constrained

> on a circle.

> > >> Now, I'm looking for the point 'v1' on this circle, so that the

> > >> three points (v0, p, v1), when projected to the screen,

> enclose a given angle.

> > >>

> > >> Any ideas how to compute the world space 'v1', given the screen

> > >> space angle?

> > >>

> > >> I was thinking of working backwards, rotating first in screen

> > >> space, using the given angle, and then trying to figure out the

> > >> world space position of v1, but I'm a bit afraid, that this

> > >> wouldn't be a very robust solution..

> > >>

> > >> thanks,

> > >>

> > >>

> > >> Andras

> >

> >

> > -------------------------------------------------------

> > SF.Net email is sponsored by: Discover Easy Linux Migration

> Strategies

> > from IBM. Find simple to follow Roadmaps, straightforward articles,

> > informative Webcasts and more! Get everything you need to get up to

> > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

> > _______________________________________________

> > GDAlgorithms-list mailing list

> > GDAlgorithms-***@lists.sourceforge.net

> > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list

> > Archives:

> > http://sourceforge.net/mailarchive/forum.php?forum_id=6188

> >

>

>

> -------------------------------------------------------

> SF.Net email is sponsored by: Discover Easy Linux Migration

> Strategies from IBM. Find simple to follow Roadmaps,

> straightforward articles, informative Webcasts and more! Get

> everything you need to get up to speed, fast.

> http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick

> _______________________________________________

> GDAlgorithms-list mailing list

> GDAlgorithms-***@lists.sourceforge.net

> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list

> Archives:

> http://sourceforge.net/mailarchive/forum.php?forum_ida88

>