comp.lang.ada
 help / color / mirror / Atom feed
From: Wilhelm Spickermann <wilhelm.spickermann@t-online.de>
Subject: RE: vectors, spacetime
Date: 1999/11/19
Date: 1999-11-19T00:00:00+00:00	[thread overview]
Message-ID: <XFMail.991119062223.wilhelm.spickermann@t-online.de> (raw)
In-Reply-To: 3834BEAB.13F5B232@interact.net.au

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 2224 bytes --]


On 19-Nov-99 G M Wallace wrote:

..
> little arrows pointing with wind flow direction) - would it be right
> to
> define a vector as a record with several properties (speed,
> direction,
> accelleration, etc.) and then construct a multidimensional array of
> such
> records ?  Or is a vector only applicable to single qualities - like
> speed, direction, etc. There is probably some much simpler solution.
..

Mathematical vectors are a very general thing, they are just pairs,
triples, tuples of something. In physics they are used that way,
but in many cases vectors are homogeneous in physics. It�s very handy,
to have a vector of speed components -- then mathematics can be used to
get a vector of acceleration components from that. So it depends on what
problem you are dealing with. In Ada, this is implemented as an array
or as a record.

..
>   If someone was to attempt to computationally represent a spacetime
> system in terms of three dimensions of space and one dimension of
> time,
> because time is a 'negative' quality in relativistic equations, does
> that create insurmountable probelsm of definition and reference ? 
..

No, it doesn�t. What You need here is a programming language which
allows You to hide the implementation and to define operators. Ada
is a very good choice for that problem.

..
> The
> square root of -1 is a complex number and i am aware that there ARE
> ada
> packages to deal with such things.  However - in spacetime it is
..

Well, surely we can view spacetime a subspace of a C^4 (four complex
components), but thats much too general as we dont need four of eight
components involved here. There is a mathematical model for what we
we need here, which is sometimes called R^{3,1} (as far as I remember -
thats long ago for me). It has four real components, but a different
metric etc. (the fourth component behaves a little imaginary).

Taking this as a model for programming, I would _not_ view the
components as having different types as You did in Your example. I would
only view the vectors as having different operations. That would be a
private array of four real components, with the appropriate operations
like "abs" (sqrt(x^2+y^2+z^2-t^2)) defined. 

Wilhelm






  reply	other threads:[~1999-11-19  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-19  0:00 vectors, spacetime G M Wallace
1999-11-19  0:00 ` Wilhelm Spickermann [this message]
1999-11-19  0:00   ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox