MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: Nested coorindate space model
Ling wrote:
>
> On Tue, 26 May 1998, J C Lawrence wrote:
> > Defining a new coordinate system within the domain has proven
> > exceptionally useful, tho the translations to the external world can
> > be awkward. While I haven't needed to make the definition yet, pretty
> > soon I'm going to have decide if:
> >
> > Given a domain with specified external dimensions of X (say 1x1x1),
> > but which defines and internal coordinate system and thus has internal
> > dimensions of Y (say 100x100x100), what happens at the translation
> > points between the domains? Is scaling employed such that objects
> > effectively "shrink" to 1,000,000'th of their actual size when they
> > enter the nested domain, or are matched scale "windows" defined which
> > support the interface translations?
> >
> > The TARDIS would seem to indicate the latter.
>
> 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).
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.
The main idea is that the units of length are not necessarily the same
as the units of the absolute coordinate space. When you move two feet
forward, it is up to the domain/space which contains you to decide where
your new location in absolute coordinates is. If the scale is 1, you
may indeed move from 0,1, to 0,3. But if the scale is .5, you'll only
end up at 0,2. You, personally, don't care in the least, because as far
as you're concerned, you've gone two feet forward relative to everything
else. If there was a two foot stick next to you when you started, you'd
be at the other end of it when you finished (you don't care whether the
stick's length has been warped by multiplying it by 1 or .5, since you
and everything else is warped along with it). There's no need for
special interface objects to guard the entrance to each domain, things
take care of themselves naturally. :)
--
Michael Hohensee michael#mainstream,net
http://www.geocities.com/SiliconValley/Heights/9025/
Finger me for my PGP Public Key, or use:
http://sparta.mainstream.net/michael/pgpkey.txt

[ Other Periods
| Other mailing lists
| Search
]