July 04, 2004
Stephen Waits wrote:

> Sorry, I wasn't suggesting that these operations be built into the language; only that the language allow enough flexibility so that we may code such optimizations without sacrificing so much performance.

OK, sorry. If that is so, we are completely on line there.

> I shall research the geometric algebra you mention.
> 
> We generally just use quaternions for character animation, and possibly camera animation.

Well, quaternions are a convenient way to express rotations in 3D-space, just like complex numbers are very convenient for 2D rotations. Both are more efficient and simpler than the usual matrix-algebra.

Geometric algebra just takes this to a more general level working for spaces of arbitrary dimension (also relativistic spacetime, which makes it very interesting for physics) For computer graphics, the 4dim "projective space" is very important. Here, rotations and translations fall together into one, more general group of operations. Instead of handling orientation and position separately and doing shifts and rotations in two separate steps, they can then be expressed very conveniently as one thing, in many cases even giving some performance gain.

If you are interested, a good starting point is
        http://www.mrao.cam.ac.uk/~clifford/
but don't give up too quickly. At first it all seems rather strange, but
after a short while, when you begin to understand, many things suddenly get
a lot easier then they ever were in linear algebra.

July 06, 2004
Norbert Nemec wrote:
> Stephen Waits wrote:
> 
>>I shall research the geometric algebra you mention.
>>
>>We generally just use quaternions for character animation, and possibly
>>camera animation.
> 
> Geometric algebra just takes this to a more general level working for spaces
> of arbitrary dimension (also relativistic spacetime, which makes it very
> interesting for physics) For computer graphics, the 4dim "projective space"
> is very important. Here, rotations and translations fall together into one,
> more general group of operations. Instead of handling orientation and
> position separately and doing shifts and rotations in two separate steps,
> they can then be expressed very conveniently as one thing, in many cases
> even giving some performance gain.

I want to thank you for pointing me to this.  We may be able to solve a problem we've run into with quaternions recently under this different algebra, using the reflection "tool".

> If you are interested, a good starting point is
>         http://www.mrao.cam.ac.uk/~clifford/

I started with Jaap Suter's excellent tutorial located on his/her home page: http://jaapsuter.com/

There's quite a vocabulary with this new (to me) algebra; and I'll have to play with it quite a bit before I can claim any comfort - or even evaluate its usefulness in real-time 3D applications.

There's a nice visualization program (GL based) which should help in my learning.

Anyway, apologies to the group for going so OT.  But, keep in mind, this is exactly the type of thing that we might want to do under D - cleanly and efficiently.

Thanks again Norbert - you rock!

--Steve
July 06, 2004
Walter wrote:
> Why can't we make the current array operations serve this purpose?
> 

We could do it - just not very optimally.

For example, we CAN do this in C++; however, we have to jump through all kinds of hoops to get any efficiency at all - and even then there's a good chance you won't get all you need out of it.

As it stands, D is no better than C++ in this regard; however, I believe it can be made considerably better without sacrifice.

--Steve
July 06, 2004
I think, you misunderstood the question by Walter: It is about the already
specified "array operations" like:
        a[] = b[] + c[];
vs. the more general vector operations that I'm thinking about:
        a[] = [i=0..10,j=0..10](b[i,j] + c[i,j]); // syntax not decided yet!!

The former already do offer more than C++ has: vectorizable code. The compiler can optimize very freely, since the order of execution is not specified.

The latter do not offer much more, but they offer the same thing much more flexible. Especially, they offer the extension of vector expressions by using functions.

Walter was just asking why the former kind of expressions does not suffice. I answered in a previous message.

This situation is hardly comparable to C++, where you don't have any vectorizable expressions at all. Everything has to be done in the library via expression templates. Compared to that, D already is way ahead. It is just flexibility and extensibility that is lacking in the current solution.




Stephen Waits wrote:

> Walter wrote:
>> Why can't we make the current array operations serve this purpose?
>> 
> 
> We could do it - just not very optimally.
> 
> For example, we CAN do this in C++; however, we have to jump through all kinds of hoops to get any efficiency at all - and even then there's a good chance you won't get all you need out of it.
> 
> As it stands, D is no better than C++ in this regard; however, I believe it can be made considerably better without sacrifice.


July 06, 2004
Stephen Waits wrote:

> Norbert Nemec wrote:
>> Geometric algebra...
> 
> I want to thank you for pointing me to this.  We may be able to solve a problem we've run into with quaternions recently under this different algebra, using the reflection "tool".
> 
>> If you are interested, a good starting point is
>>         http://www.mrao.cam.ac.uk/~clifford/
> 
> I started with Jaap Suter's excellent tutorial located on his/her home page: http://jaapsuter.com/
> 
> There's quite a vocabulary with this new (to me) algebra; and I'll have to play with it quite a bit before I can claim any comfort - or even evaluate its usefulness in real-time 3D applications.

Please keep me informed on the outcome! I would really love to hear about real-world experience in that area.

1 2 3 4
Next ›   Last »