Advertisement

Vector class for homogeneous coordinates

Started by November 25, 2002 01:13 PM
18 comments, last by leroy 22 years, 2 months ago
cedricl:
From what i know (/think to know ) about vectors, w only equals 0 when they are pointing to infinity (so, when only the direction counts). Vectors generally do have orientation/length. So points and vectors aren''t that different.

johnb:
I had implemented the + operator a bit different:

Writing down the addition I got:
v3.x = (v1.x / v1.w) + (v2.x / v2.w)
= ((v1.x * v2.w) + (v2.x / v1.w)) / (v1.w * v2.w)
etc. for .y and .z
which let me to believe the addition looked like this:

v3.x = v1.x * v2.w + v2.x * v1.w
v3.y = v1.y * v2.w + v2.y * v1.w
v3.z = v1.z * v2.w + v2.z * v1.w
v3.w = v1.w * v2.w

This somehow looked a bit more like was going on...maybe because v3.w is now also a dependent variable. However, maybe it''s just bull this way...I just like to fiddle with formula''s

alvaro:
Wow, I was obviously looking just at the tip of the iceberg I looked up that Grothendieck fellow, but I couldn''t easily find a simple explanation for his theories.

But isn''t this a little like complex numbers: an extra dimension and a new (complex) product are introduced. Complex numbers then behave like vectors in R2. But they behave the same as real numbers on the real axis (C extends R, it doesn''t restrict it).

Shouldn''t this be the case here also: for w = 1 the homogeneous vectors behave like the 3D ones? And that there should be a (generalized form of) the dot product (and other operations on R3)?

Maybe these last lines would follow out of projective space theory, but I am kinda new at this
quote:
Original post by alvaro
A vector space with an internal product (like the dot product) is an euclidean space, which shall be studied together with metric-preserving linear mappings (movements).



Stricty speaking a vector space with an inner product is a metric space. The inner product defines a quadratic form on vectors given by v.v. If this is positive definite, i.e. it is positive for all non-zero vectors, then the vector space is Euclidian, but not all vector spaces are Euclidian.

A lot of the rules we associate with vector spaces, such as the triangle inequality, depend on the assumption that the space is Euclidian, and it''s important to be aware of this when dealing with non-Euclidan spaces.

E.g. the 4D Minowski space of special relativity has a quadratic form which is not always positive:

(ct)^2 - (x^2 + y^2 + z^2)

or

t^2 - (x^2 + y^2 + z^2)

if units are chosen so the speed of light c is 1. This has a lot of interesting consequences, e.g. by going by a third point/event it''s possible to find a shorter/quicker route to a point than the direct straight line, leading to the so called "twins paradox" of relativity.

Another non-Euclidian space is 5D conformal space which has some advantqages over 4D homogeneous coordinates for modelling 3D rotations and translations. E.g. unlike in 4D homogeneous coordinates the 3D distance is simple to calculate directly in 5D coordnates.

This is related to projective geometry as the usual way of associating such a 4D or 5D space with our 3D space is projectively.
John BlackburneProgrammer, The Pitbull Syndicate
Advertisement
quote:
Original post by johnb
Stricty speaking a vector space with an inner product is a metric space. The inner product defines a quadratic form on vectors given by v.v. If this is positive definite, i.e. it is positive for all non-zero vectors, then the vector space is Euclidian, but not all vector spaces are Euclidian.



You are right. It''s been a long time since I studied those definitions. Anyway, I think the point of my post is still valid.

There are several post in this thread in which it is made clear that people understand one of the coordinates to be special. I have to disagree. On of the main points of projective geometry is that there is nothing special about points in infinity. As my teacher used to say, "Projective Geometry brings infinity home".

quote:
Original post by alvaro
There are several post in this thread in which it is made clear that people understand one of the coordinates to be special. I have to disagree. On of the main points of projective geometry is that there is nothing special about points in infinity. As my teacher used to say, "Projective Geometry brings infinity home".



Yes. And understanding this gives you one way of understanding special relativity: consider all space-time events as taking place in a 4D space then your choice of time axis is like selecting the ''w'' component in projective geometry. Different choices generate different frames of reference which can be related projectively through the 4D space.

You have to throw out a lot of stuff as the 4D space is non-Euclidian, but what you replace it with is even more useful as many of the properties of relativity (e.g. the speed of light being an upper limit, time dilation) arise directly from the geometry of the space.

All a bit off topic but it at least gives a use and a partial justification from physics for projective geometry.
John BlackburneProgrammer, The Pitbull Syndicate
quote:
Original post by leroy
From what i know (/think to know ) about vectors, w only equals 0 when they are pointing to infinity (so, when only the direction counts). Vectors generally do have orientation/length. So points and vectors aren''t that different.

I''m not too comfortable with these concepts either, but I think that vectors with w = 0 do have a length. For example, consider the substraction of two points. The resultant object has w = w1 - w2 = 1 - 1 = 0. Yet, it has a length corresponding to the distance between both points.

Cédric
5D conformal space ?
I''ve never heard of that before, even in passing reference.
What is it ?
And why would calcutating R3 distances in R5 be easier than in R4 ?

And why would the rotations, etc, be easier ?


Bugle4d
~V'lionBugle4d
Advertisement
> 5D conformal space ? What is it ?

It works much like 4D homogeneous coordinates: you add two moder dimensions to allow you to do calculations you cannot do with just three.

> And why would calcutating R3 distances in R5 be easier
> than in R4 ?

To caculate the distance between two points in 4D is relatively expensive, a lot more than just doing an extra multiply-add, as you expect when going from 3D to 4D. In 5D the distance can be calculated more easily than in 4D.

> And why would the rotations, etc, be easier ?

I don''t think rotations alone are easier. In both 4D and 5D you can create linear transformations which can do both rotations and translations. As matrices as they can be combined, inverted, etc. to greatly simplify calculations. In 3D there''s no equivalent way to include rotations and translations in the same operation.

The main problem with 5D is while modern processors can handle 3D and 4D vectors cheaply 5D ones are generally at least twice as expensive. This together with the theory being new and still mostly confined to academic papers mean it''s difficult to see it being used in games in the near future.
John BlackburneProgrammer, The Pitbull Syndicate
Any sites I could look at to find a paper or anything ?
I ran through mathworld really quick and didn`t see anything.

Bugle4d
~V'lionBugle4d
There are two papers by David Hestenes, Homogeneous Rigid Body Mechanics with Elastic Coupling and Old Wine in New Bottles: A new algebraic framework for computational geometry, which cover the fundamentals and provide a number of references. Be warned that neither paper is easy and both assume a knowledge of much advanced mathematics.
John BlackburneProgrammer, The Pitbull Syndicate
Thanks much!

Bugle4d
~V'lionBugle4d

This topic is closed to new replies.

Advertisement