Prev: Re: [OT] - Hmmm... an idea has sprouted!!! Next: Re: [FT] [OT?] Has anyone considered...

Re: [FT][computer] Has anyone considered...

From: Tony Francis <tony.francis@k...>
Date: Mon, 11 Sep 2000 10:18:32 +0100
Subject: Re: [FT][computer] Has anyone considered...

Very interesting thread ... unfortunately I've been away from work
(moving
house) so I've come to this a little late. Hope no-one minds me putting
in my
two-penn'orth ...

[quick note on my background - I'm currently working as lead programmer
on a PC
game called 'Halcyon Sun' which is due for release next month, so I've
tackled
all of the problems mentioned here quite extensively].

"Bell, Brian K" wrote:

> I considered this for a while.
>
> Each ship would have an x,y,z location.
>
> Each ship would have a 360x,360y,360(roll) facing.
>

These are known as the six degrees of freedom. They can be stored as a
4x3
matrix with the top three rows of the matrix representing the
orientation
(rotations) and the bottom row is the (x y z) position vector. If the
matrix is
normalised then it has several useful side effects that can speed up
calculations.

>
> Each ship would have a 360x,360y,Velocity course.

An alternative way of storing this is as an [x y z] velocity vector.
Current
velocity is equal to the length of the vector (eg sqrt (x*x + y*y +
z*z)).
Changes in course are calculated by vector arithmetic - simply add the
new
thrust vector to the existing velocity vector to derive the new overall
velocity
vector.

Tony

Prev: Re: [OT] - Hmmm... an idea has sprouted!!! Next: Re: [FT] [OT?] Has anyone considered...