From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID,PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,a0ad312f61fa680d X-Google-Attributes: gid103376,public From: Wilhelm Spickermann Subject: RE: vectors, spacetime Date: 1999/11/19 Message-ID: #1/1 X-Deja-AN: 550416411 Content-Transfer-Encoding: 8bit Sender: wilhelm@pc1.spick.nowhdus References: <3834BEAB.13F5B232@interact.net.au> X-Sender: 0211750756-0001@t-dialin.net X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@t-online.de X-Trace: news06.btx.dtag.de 942988992 14887 0211750756-0001 991119 05:23:12 Organization: T-Online Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-11-19T00:00:00+00:00 List-Id: 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