[MUD-Dev] Re: Nested coorindate space model
J C Lawrence
claw at under.engr.sgi.com
Wed Jun 3 11:47:07 CEST 1998
On Sat, 30 May 1998 12:07:44 -0400
Michael Hohensee<michael at sparta.mainstream.net> wrote:
> Ling wrote:
>> I think so too, scaling would be horrid. A builder wanting to
>> mimick Alice in Wonderland's scaling feats could stick in code for
>> that kinda thing... Then again, given that there is an interface
>> between domains that converts objects, it oughta be pretty
>> transparent to the players. Bubba lobbing a stick into the TARDIS
>> should still see a stick entering the TARDIS, not a tree.
>> Conversely, Boffo inside the TARDIS shouldn't see a twig coming in
>> turning into a stick.
>>
> This wouldn't actually happen, if the stick's dimensions are left
> alone. All we need to define a domain like the TARDIS is to give it
> a "scale" value of less than 1.
> It isn't the stick's responsibility to worry about whether it is
> inside a TARDIS or not, that's the TARDIS's job. So we leave the
> dimensions of the stick unchanged. Say the TARDIS is 5 units long
> on the outside, and 20 units long on the inside. It would have a
> scale value of .25. Now take a stick, and place it within the
> TARDIS. Now, if you look at the stick from the outside of the
> TARDIS, it will still look like it is the same length as it is on
> the outside. (see the attached image to see what I mean).
This is dependant on another assumption: the mapping of the
translation layers between domains, and breaks at the translation
layer when the a' and b' lengths are zero. You need to take account
of the translation layers between coordinate systems.
Consider a domain X which contains a nested domain Y. Y has external
dimensions of 1x1x1 in X's coordinate system, but has internal
dimensions of 100x100x100 in Y's internal coordinate system. All 6
external faces of the cube formed by Y translate to surfaces in X.
Now take your stick of length 1. It starts in X's coordinate system
and moves in Y's. In Y's coordinate system it too has a length of 1,
however, as it crosses the border into Y, it instantly apparently
shrinks to a viewer in X due to the fact that its length now subtends
a tiny fraction of the visual angle that it did immediately prior to
crossing the border.
+--------------------------------------------+
| \ |
| \ |
| X domain Y domain |
| / |
| / |
| ...........+-----------------+ |
| ^ | ^ | |
| | | | | |
| | | | | |
| | 1 unit | | 100 units | |
| | | | | |
| | | | | |
| | | | | |
| V | V | |
| ...........+-----------------+ |
| |
| |
+--------------------------------------------+
The other approach is to define constant sized translation
interfaces, the base concept being that a translation interface must
occupy the same dimensional units in both coordinate systems. This
seems much closer to the TARDIS model, and also explains and allows
many of the cute multi-blob domain mappings.
+--------------------------------------------+
| \ External |
| \ interfaces of |
| X domain Y domain |
| / |
| / |
| ...........+-----------------+ |
| ^ | \ | |
| | | A interface | |
| | | | |
| | 1 unit |-B interface | |
| | | | |
| | | D interface-| |
| | | | |
| | | C interface | |
| V | / | |
| ...........+-----------------+ |
| . . |
| . . |
| . 1 unit . |
| .<--------------->. |
| |
+--------------------------------------------+
+-----------------------------===------------+
| \ . . |
| \ . . |
| Y domain . . |
| . . |
| \ |
#..... A interface |
# -B interface of length |
#..... of length 1 1 in Y |
| in Y domain domain |
| |
#..... |
# -D interface of length 1 in Y domain |
#..... |
| C interface |
| / of length 1 unit in Y domain |
| . . |
| . . |
| . . |
+--------===---------------------------------+
Further this allows the TARDIS-like mechanics of being in X, moving
south thru the B interface into Y, turning around 180 degrees and
exiting Y thru the D interface to find yourself facing in the same
dirction as when you started, and having traveled to the opposite side
of Y.
> If we're doing this in an object oriented language, like C++, (as I
> am), it isn't hard to get the location of one end of the object, and
> that of the other. From there, we can do a simple calculation of
> the distance between each end and the observer location. We simply
> get the distance in absolute coordinates, and divide it by the scale
> of the domain the objects are contained in. If the lines cross into
> other domains, we first find the distance from the edge of that
> domain to the observer, and then ask the intervening domain to tell
> us how far it is to the object. If still another domain intervenes,
> it repeats this and asks that domain to find the distance to the
> object. Eventually, everything returns and sums up the real
> distance (i.e. how far the observer would have to walk to get to the
> object) is discovered. Then all we have to find is the angle
> between the two lines, but that isn't particularly hard, either.
> Now we plug it all into the equation, and bang, we see how big the
> object appears to be. No sudden shrinking or anything.
Except for the case when an object lies just other side of a
translation layer.
--
J C Lawrence Internet: claw at null.net
(Contractor) Internet: coder at ibm.net
---------(*) Internet: claw at under.engr.sgi.com
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...
More information about the mud-dev-archive
mailing list