[Haskell-cafe] How to model outer space for a MUD
winterkoninkje at gmail.com
Mon Aug 17 03:04:06 UTC 2015
On Fri, Aug 14, 2015 at 4:34 PM, Michael Litchard <michael at schmong.org> wrote:
> Star Wars MUD has a 3-D coordinate system such that (0,0,0) is some planet.
> I'm curious as to how one might model this system that could simulate a
> ship's movement through a 3-D grid. Matrix, 3-D array, graph. None of these?
The octtree suggestions are good for if you need to keep track of
If you're going to be keeping track of orientation as well as
position, note that that means you have six dimensions (three for
location; and three for orientation). Moreover, for the orientation
I'd suggest using quaternions instead of Euler angles (aka: roll,
pitch, yaw). Euler angles have a number of problems including
non-uniqueness of representation and loosing degrees of freedom due to
gimbal lock— whereas quaternions avoid those problems.
More information about the Haskell-Cafe