From: owner-3dui@hitl.washington.edu on behalf of Chad Wingrave [cwingrav@vt.edu] Sent: Saturday, December 16, 2000 12:49 PM To: 3dui List Subject: Describing Interfaces ... ex. Ray Casting Something I have been thinking about: Since interaction is generally a cause and effect, if we explain things in the sense of triggers and actions, we might be able to explain interaction simply and hopefully with similar expressions. The environment might have a set of selectable objects and a set of those that are selected. In this simple case to follow, I only allow one item to be selected at a time but that could easily be changed. Additionally, there are very few structures that need to be described for interactions in VEs. Something to specify location and orientation (position) and an object (contains a position and probably other things which interaction may not need to know about) are about it. For most interaction techniques, the functions that operate on data are common and after describing one interaction, another could be described hopefully with many of the same parts (what's this? a vocabulary?). For example, Occlusion Selection and Ray Casting have many of the same qualities. GoGo too compares nicely and in my Ray Casting example it is easy to see a case where the function PointingError could be used for Occlusion and GoGo. I do agree that written descriptions are nice but a more formal description would be additionally needed as it allows researchers to converse using the same vocabulary and hopefully describe new interactions in terms of others. Hopefully VEs could even be specified in this language. Also, since interaction is generally an event based system, it should be defined as one with initialization stages, triggers and actions. The following is a example of RayCasting. Comments, criticisms and corrections are welcome. -Chad Wingrave Virginia Tech CS Init: // ---------------------------------------------------------- set of objects highlighted = empty locatordevice hand = tracked int minerror = .02 (or whatever is appropriate) Events: // ---------------------------------------------------------- trigger: button, pinch, etc. action : Select(highlighted) trigger: hand changed location action : Set(highlighted, RaycastSelect(Position(hand),SelectableObjects(),minerror)) Implementation: // ---------------------------------------------------------- // finds error between all selectable objects and if the most // likely selected is above a threshold, select it RaycastSelect(_pointer: position, _objects : set of objects, _raycastminerror: real ) { min = 1.0, retval = NULL foreach obj in _objects temp = RaycastError(Pointer,Obj) if ( temp < min ) min = temp, retval = obj if ( min > _raycastminerror ) retval = NULL; return retval } // Gives an error value for the ray casting. Normalizes between 1 and 0 RaycastError(_pointer: position, _object : object) : real { return PointingError(_pointer,Position(_object)) / 180 } // Should give the amount that the ray is off of the orientation. // NOTE: My math most likely is incorrect but you get the point PointingError(_ray : position, _point : position) : angle { i = Invert(_ray)*_point return 2*Sqr(X(i)) / (2*X(i)*Sqrt(Sqr(X(i))+Sqr(Z(i)))) }