[sci.virtual-worlds] Virtual Reality Programming La

pete_leaback@compulink.co.uk (Peter Leaback) (09/16/90)

I would like to give my views on the requirements of a VRPL.

The problem of a VRPL can be broken down into object definition, physics,
I/O and triggered procedures.

Object definition
-----------------
All this talk of "space" gives a clue to object definition. Lets say that
a certain VR is required to have thee dimetional space (x,y,z) , mass,
and light that can be absorbed, reflected, floresced and emitted. Given
these requirements, *ALL* objects to be defined should have the above
attributes set. (I will expand on this below)

Physics
-------
This is the real-time procedure of letting the attributes of objects go
to work. Objects are attracted to each other (because of mass), Light is
emitted by some objects and absorbes, reflected, and floresced by others.

I/O
---
This includes the rendering, force feedback and all that goes with input
and output. The viewer is also an object so has to be given a position,
mass, and light properties.

Triggered Procedures
--------------------
A complete VR can be created by just Object definition, Physics and I/O.
But with a VR of any complexity, it becomes very hard to use just these
three elements. 

An example, say that we would like to have a computer *within* a VR, a
simple computer with a keyboard,monitor,memory and microprocressor. It is
possible to recreate a computer with just object definition and physics,
but one would have to create an ENORMOUS number of objects and new
attributes  (eg electron object, and give attribites to all other objects
of how conductive they are). This is completely impractical so one must
replace a computer with triggered procedures.

Instead of defining the computer down to its minutest detail, one could
replace it with something that is functionally the same as the computer
but is just a "hook" back to the real world computer. When a key of the
virtual keyboard is pressed, this triggers a procedure in the real
computer and sends back to the VR an appropreate result. These triggered
procedures could be attributes in the object definition.

This may not be too clear,so a simpler example is in order. Take a
virtual flower in a virtual flower pot. A triggered procedure could be
"if the flower pot is not filled with water every 2 days then the flower
dies". This is a great deal simpler than simulating the flower down to
each cell ! :-)

How to expand a VR.
-------------------

The first VR's using the above ideas would have a very small set of
object attributes and a great deal of triggered procedures. As the
technology progresses, the number of attributes (and physics to
accommodate them) would incease and the triggered procedures would tend
to 0. At a very early stage we should address the problem of easily
expanding the attributes of a VR and checking that these additions keep
the physics of the VR consistent.

Object definition and physics (cont.)
-------------------------------------

I said above that "as the technology progresses, the number of attributes
(and physics to accommodate them) would incease". This would be a short
lived trend. 

Look at the real life study of physics.As we learn more about physics,
what was two different forces turn out to be two effects of one force.EG
electricity and magnetism was replaced with electromagnetism. Some
scientists think that this trend will come to its logical conclution, a
"Super Force" which encompasses electromagnetism, gravity, strong and
week forces.

In the same respect, any virtual reality that is created with a set of
attributes and forces, one would be able to boil them down to a more
meaningful subset. I will give a *silly* example. 

Say that we create a VR of a ski resort. In some part of the ski run a
avalanche is triggered if one yells too loudly. An attribute is added to
all objects which corresponds to the yell-ness of that object. Physics is
added which says "a yell attenuates in a 1/(x^2) manor".The
snow-teetering-on-the-edge-of-a-cliff object is given the triggered
procedure "if a yell is a certain level then break the link from the snow
and the cliff". The designers of the VR also wish (for some strange
reason) to include supersonic aircraft which pass over the resort. When
the aircraft reaches the speed of sound, a sonic boom should be heard.
The designers see that we have the law of "yell", and rename it to
"sound", modifying this law to include sonic booms. The Physics is added
which says "if the emitter is traveling exactly at the speed of sound
then amplify the emitted sound by 30 times". As more sound effects are
needed, the more accurate the simulation of sound becomes. The designers
would eventually see that "sound" is not a law (in the same way that
"yell" was not a law), but the effect of simpler laws that they have been
using in other areas of the VR.

The above is an example of a VR where its laws of physics are the same as
the real world physics.But this process of scientific investigation can
be extended to many areas of problem solving. A virtual reality of the
world stock exchanges could be created. The ridged laws of insider
trading and the force of "Oil flow from the middle east" would act upon
the world of shares and bonds.

This has many similarities with expert systems and simulations, but i
feel it goes futher that either.In a world stock exchange VR one would be
able to create tools, measuring devices, and conduct experiments which
are EXTREMELY abstract outside the VR and intuitive within.

Humans are designed to problem solve in a physical environment. Virtually
everyone can catch a ball that bounces off a wall, but ask them to 
calcuate the correct position for their hands using math, and few could.



Regards,
        Peter Leaback.