From -6100606290607151077
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,94e9c2bbb0060b48
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-08-23 03:25:18 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!news-out.visi.com!hermes.visi.com!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: ros0230@iperbole.bologna.it (Natale Fietta)
Newsgroups: comp.std.c++
Subject: Re: Proposals for small vectors?
Date: 23 Aug 2002 10:25:18 GMT
Organization: NETTuno
Lines: 90
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <3d65e786.1110092@news.iperbole.bologna.it>
References: <87wurryywb.fsf@grue.ucsd.edu> <3D38FB4F.1020909@animats.com> <877kjnpg3p.fsf@grue.ucsd.edu> <3d4f850b.146537@news.iperbole.bologna.it> <TIg89.3537$J74.158026040@newssvr13.news.prodigy.com>
Reply-To: ros0230@iperbole.bologna.it
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ncar.ucar.edu
X-Trace: panco.nettuno.it 1030088765 25601 193.207.4.115 (23 Aug 2002 07:46:05 GMT)
X-Complaints-To: news@nettuno.it
NNTP-Posting-Date: 23 Aug 2002 07:46:05 GMT
X-Newsreader: Forte Free Agent 1.21/32.243
Xref: archiver1.google.com comp.std.c++:13355

On Tue, 20 Aug 2002 18:47:50 GMT, "Noah Stein" <noah@a-c-m.org> wrote:

>I'm in the same field as you: video games, but I've noticed that my needs,
>as well as those of others I know, varies from yours.

The world is beautiful because it is so varied :-)

Anyhow i was only pointing out my most unusual needs, it is not
necessary to bother the C++ communitiy with all little details of my
application domain...

>I've also used a number of 2x2 and 3x2 matrices.  There are a number of
>computations that occur in the plane, and I much prefer not to "just ignore
>z".  A 3x3 matrix now has two roles: a homogeneous 2d transform as well as a
>3d transform.

I've never used 3x2 matrixes, interesting to know that someone find
these useful. i was unsing 2x2 and 3x3 homo 2D in the past, i dont use
them anymore, when i do make computations on a plane the plane can be
inclinated so i dont want to ignore any coordinate.

>however, in a general
>n-dimensional setting, writing a version that works with VC6 will definitely
>be a chore.

Sorry, my english dictionary do not list the word "chore" what is the
meaning of the term ? 

> And I do have use for dense matrices beyond 4x4, so it seems
>quite a shame to give up n-dimensionality for just 2d, 3d, and 4d.

I dont want to gave up n-dimensionality, i do want a different and
more optimized version for some widely used little dimensions.
If the optimized version can be made compatible with the more general
version this is an added bonus, but i can live without it.

>> It is also worth noting that for us 4x4 matrixes represent homogeneous
>> coordinates transformations, so they always have the last row (or
>> column) as 0,0,0,1;

>I know a few people, in the same industry as you, who have found this
>assumption to have thrown a giant monkey wrench in their plans.  There are a
>number of developers who use the perspective row (column).  I think as a
>general rule, this assumption would be a huge mistake to include.

Yes, i was over-simplifiying for the sake of the general discussion,
obviously i do also use the perspective row, so i use different
multiplication implementation for perspective and non-perspective
transformations.
This has never caused bugs to me, i do use different matrix classes
for perspective and non-perspective transformation, so i do have for
example: PerspMatrix operator*(AnimMatrix, PerspMatrix);
and the compiler will trigger an error if i erroneously assign the
result to an AnimMatrix (i dont have implicit conversions from
PerspMatrix to AnimMatrix).

>> Also we often use 3-vector to represent normalized 4-vector in
>> homogeneous coordinates, so we can multiply a 3-vector by a 4x4 matrix
>> and obtain another 3-vector as result. (i suppose this sound very odd
>> to mathematicians).
>
>This is another dangerous idea IMHO.  Whether a vector represents a vector
>or a point makes a big difference in its handling with a homogeneous matrix.
>I would like to avoid jumping through hoops to deal with the issues of "is
>this vector actually a point?".  That would be a giant source of bugs.

Yes, i do know, i use different "vector" classes for points and
normals and versors. as for the previous issue i dont have mentioned
it because to me it seem not significative in the general discussion.

>> Probably my (ours ?) needs are too specific to be adressed by the
>> standard C++ library...
>
>I don't think your (our) needs are too specific.  I think, though, that to
>have those needs met requires a significant amount of thoughtful design, not
>an insurmountable amount.

What do you think of tensorial formalism ?
I am learning it, and i am only half-convinced that it can be useful
to implement the library i dream of.

Regards,
Natale Fietta

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



