shirley@m.cs.uiuc.edu (03/15/89)
I use the following to specify a view in my programs: lookfrom (x, y, z) lookat (x, y, z) view-up-vector (x, y, z) field-of-view (angle) This is umambiguous for a square viewport, but when the width and height are different, field-of-view could be left/right or up/down. Is one correct, or if not, is one to be prefered? Thanks, Peter Shirley shirley@cs.uiuc.edu
jbm@eos.UUCP (Jeffrey Mulligan) (03/16/89)
From article <4400032@m.cs.uiuc.edu>, by shirley@m.cs.uiuc.edu: < I use the following to specify a view in my programs: < lookfrom (x, y, z) < lookat (x, y, z) < view-up-vector (x, y, z) < field-of-view (angle) < This is umambiguous for a square viewport, but when the width and height < are different, field-of-view could be left/right or up/down. Is one < correct, or if not, is one to be prefered? Why not have the angle refer to the angle subtended by the diagonal of the viewport? This is unambiguous, although inconsistent with your current interpretation for square viewports. It is also consistent with how tv screen sizes are specified. -- Jeff Mulligan (jbm@aurora.arc.nasa.gov) NASA/Ames Research Ctr., Mail Stop 239-3, Moffet Field CA, 94035 (415) 694-6290
greg@bilbo (Greg Wageman) (03/21/89)
In article <4400032@m.cs.uiuc.edu> shirley@m.cs.uiuc.edu writes: > >I use the following to specify a view in my programs: > >lookfrom (x, y, z) >lookat (x, y, z) >view-up-vector (x, y, z) >field-of-view (angle) > >This is umambiguous for a square viewport, but when the width and height >are different, field-of-view could be left/right or up/down. Is one >correct, or if not, is one to be prefered? I think the most intuitive way to implement this is to have the field of view referenced to the narrower axis (which is typically the vertical axis for both motion picture and video media). The additional viewing area on the wider axis is then "bonus" (compared to the square viewport with the dimensions of the smaller axis. This approach has several advantages: 1) The distortion introduced by forcing both (unequal-size) axes to the same field-of-view is avoided. 2) It is more natural for the user to specify field-of-view for the smaller axis, and get "extra" material in the larger, than to specify for the larger axis and try to determine how much will be lost along the smaller. 3) When porting code to displays with different aspect ratios, the resulting image will be the same for the square of the dimensions of the smaller axis, at the center of the image. This would allow for the use of "cinemascope"-like effects by deliberate selection of the aspect ratio of the image. Alternatively, you could allow specification of field-of-view for each axis, allowing for additional effects, such as an anamorphic compression of one axis. Longish .signature follows. Skip now, or don't complain! Greg Wageman ARPA: greg@sj.ate.slb.com Schlumberger Technologies BIX: gwage 1601 Technology Drive CIS: 74016,352 San Jose, CA 95110-1397 UUCP: ...!uunet!sjsca4!greg (408) 437-5198 ------------------ There's nothing I hate more than a Usenet posting which took three seconds to compose and three minutes to type, glibly dismissing three years (or three decades) of an author's work in three lines. ------------------ Opinions expressed herein are solely the responsibility of the author. (And the author wouldn't have it any other way.)