From: brett@nsx.Berkeley.EDU (Brett Bourbin)
Subject: Re: Position judgement at distance
Date: Mon, 1 Jul 91 22:11:59 GMT
Organization: Visix Software Inc., Reston, VA



In article <1991Jun27.010103.10247@milton.u.washington.edu>, mike@x.co.uk 
(Mike Moore) writes:

|> My armchair virtual world program has a problem....
|> 
|> I've picked up an object (a pyramid) and now I want to put it down so that
|> it rests on top of another object (a cube).  I don't want point-of-view of
|> the user to change as the operation is done.  The visual 3d feedback given
|> by the system can confuse the user as they have no idea of scale (i.e.
|> unless the user has actually walked up to each object and examined it,
|> s/he has no idea if the cube is large and far away or small and close by*).
|> 
|> I was thinking of using a shadow which appeared underneath the pyramid and
|> deformation of the shadow as it travelled over the cube would inform the
|> user of the pyramids position relative to the cube.  This implies that the
|> light source generating the shadow must always be at a defined point,
|> preferably immediately above each object#.

What I have done in the past is a shadow/shading model, where I assume that
objects are brighter the closer thay are to the viewpoint (i.e. brightest are
at the HITHER plane, and darkest at the YON plane). I also add shadowing to
the object related to the distance from the viewpoint. Note that the viewpoint
is the source of the light (which is alright for my uses, in a interactive
game).

|> Another point of interest in relation to perspective:
|> 
|>  o If an object has an actual width of 10 units then the apparent widths
|>    a and b at distances c and d depend on the angle e.  What is angle e?
|>    Note: This is a genuine question, not an exercise.
|> 
|>  o Do the same rules apply for the height of an object?

Well, I don't know what you were refering to with your angle e, but to figure
out a perspective view, or "apparent" size of an object with respect to its
location in your 3D world, use the conversion ratio. I could give you a simple
3D-to-2D conversion routine that will do this (2 lines of C code) or you could
look at the comp.graphics Frequently Asked Questions article and look at
the references listed there.

-- 
                                __
  Brett Bourbin          \  / /(_  /\/   11440 Commerce Park Drive
    ..!uunet!visix!brett  \/ / __)/ /\   Reston, Virginia 22091
    brett@visix.com       Software Inc   (703) 758-2733

