I don't understand!

This topic is 4848 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I don't understand the articles about texture mapping. And why one uses homogeneous coordinates. In a matrix vertex: [ Px ] [ Py ] [ Pz ] [ 1 ] <-- is this a homogeneous coordinate x = x * matrix[row 0][col 0] + y * matrix[row 0][col 1] + z * matrix[row 0][col 3] + matrix[row 0][col 4]; <-- this add on? A * x + B * y + C * z + D = 0 is D the homogeneous coordinate? I don't quite understand the equation can someone explain how it works? I might need an illustration maybe.

is D negative?

Share on other sites
Quote:
 Original post by programeringA * x + B * y + C * z + D = 0

This is the equation of a plane. A, B, C and D are the parameters of the plane. Any point P = (x, y, z) that makes this equation true is in the plane. If D == 0, then the point (0, 0, 0) will also be in your plane, your plane is goin through the origin.

Homogeneous coordinates:
If you have a point P1 = (x, y, z, w) in homogeneous coordinate space, then you can transform it into a 'normal' 3D coordinate space point P2 = (x/w, y/w, z/w).

You can see that many points in homogeneous space represent the same point in 3D space. If w is zero, you actually specify a direction.

Homogeneous coordinates are useful when doing transformations in 3D space. With a 3x3 matrix you can calculate rotations and you may scale objects, but you cannot translate them to another position. But if you use 4D homogeneous coordinates and set w to one, this allows to specify the translation as part of your transformation matrix (4th column).

Share on other sites
can you give an example, an illustration?

Share on other sites
I haven't done the math c course in shool.
what are A, B, C and D? are they vectors?

Share on other sites
the values of A, B, C and D.
demonstrate a concrete example.

I may be stupid who don't understand.

Share on other sites
Try www.mathworld.com Any math related question I've ever had, the pages there have answered.

Share on other sites
First off, don't multiple post pointlessness.
If someone feels like answering, they will.
All the spamming does is piss people off.

We use homogeneous coordinates so that we can do matrix multiplications for translations. We like matrix muls because they neatly represent rotations and scalings as well.
So we simply work with a system that lets us do everything by matrix muls.
Look up the difference between affine and linear transforms, and then work through rotation and translation with 3x3 and 4x4 matrices and see which ones are affine and which ones are linear.

Share on other sites
Sorry for the spamming.
But I want to understand this logical on how it works.
And I can't really find anything that helped me understand this with google.com
And you've rote me down for wanting help, witch makes me a bit sad.
next you'll maybe rate me to zero, close my/this thread and ban me.
you experience me as irritating, but what shall I do when I what to understand this so badly.
How the equation A * x + B * y + C * z + D can be equal to zero.

[Edited by - programering on August 25, 2004 8:02:43 AM]

Share on other sites
A concrete example, then I'll shut up.

Share on other sites
As EvilSwan said, try MathWorld.

http://mathworld.wolfram.com/HomogeneousCoordinates.html

If you don't understand that, I don't see what good a 'concrete example' will do you, but here you go anyway:

x = 0
y = 0
z = 0
d = 0

Share on other sites
I don't know if I've understand this either, but I'll try to explain what I think/know...

A*x + B*y + C*z - D = 0 ( IMHO: Clearer to use -D than + D )

( vectors describes a direction and length, and remember a plane has infinite size and is infinite thin )
ABC are the x, y, z component of the plane's (unit)normal vector.
D = distance from the origin to the closest point on the plane.
xyz = any point in the plane.

if not xyz lays in plane the equation wont equal zero.

Imagine a plane with center p0 laying horizontally 3 units above the ground.
p0 = [0, 3, 0]
Normal = [ 0, 1, 0 ] (Pointing straight up, A=0, B=1, C=0)
D = A*p0.x + B*p0.y + C*p0.z = 0*0 + 1*3 + 0*0 = 3

p1 = [ 5, 3, 10 ] ( a coordinate in the plane )
p2 = [ 5, 2, 10 ] ( a coordinate below the plane )

A*p1.x + B*p1.y + C*p1.z - D = 0*5 + 1*3 + 0*10 - 3 = 0 (in plane)
A*p2.x + B*p2.y + C*p2.z - D = 0*5 + 1*2 + 0*10 - 3 = -1 (out of plane)

Just remember the normal must have a length of 1! (normalized)

If you find this confusing think like this (even if it's not entirly correct):
A*x + B*y + C*z - D = 0
so: A*x + B*y + C*z = D
[ A, B, C ] is the unit normal, or direction of the plane, so we are multiplying the x coordinate (how far away the plane is from the x-axis) with normal.x (how much the plane is tilted in direction x). And the same with y and z.

Homogenous coordinates are "projected coordinates", if w = 1,
the 3d coordinates equals the "projected coordinates". Smaller w projects coordinates farther out. If w = 0, the coordinates are projected at infinity. Usually you just want w = 1. It's used so a 4 element vertex can be multiplied with a 4x4 matrix. A 3x3 matrix can only hold scaling and rotation, not translation. Pretend that every time your program draws a vertex x,y,z and multiplies it with your transformation matrix, it just sets w=1. (OpenGL actually does this, ASFAIK)

Share on other sites
btw... sorry for the bad english and messy post... just tried to come with a "concrete" example... And as I said, i don't know this stuff either :-P

Share on other sites
y = mx + c defines a line in 2d, where m and c are known values and x and y are line coordinates. Ax + By + Cz + D = 0 defines a plane in 3d, with A, B, C and D known 'parameters.' D has nothing to do with homogenous coordinates.

Share on other sites
I can't really picture it in my mind.
If I could find a picture witch demonstrates it.
But I don't know what I shall search on with google.

Share on other sites
1st site from searching for "plane equation"

http://mathworld.wolfram.com/Plane.html

You need to learn a lot of linear maths before you will be able to grasp how homogeneous coordinates work. Projective Geometry is a good search word on google, but its complicated and you need to know what a vector space is.

I'm thinking...

Share on other sites
I can't find anything on the net that really get me to understand this.
Can somebody draw a picture of this, with mspaint or something?
and post it. If you got nowhere to host it, you can send it to me: callecutta_k@hotmail.com
Then I'll rate you good.

Share on other sites
Take Linear Algebra in college, then you'll understand this. Until then, just take advantage of how useful this can be. The 4th component of a vector simply allows you to transform a point (represented by the first three components) by any matrix (which is also 4x4). Just know that for normal 3D work, you just make the 4th component 1. That's it. Until you have a strong background in Linear Algebra, you prolly won't understand this.

Share on other sites
is D the length of the normal?
is it?

[Edited by - programering on September 1, 2004 10:46:55 AM]

yes or no?

Share on other sites
You're talking about three different issues here. Homogenous coords have very little to do with the plane equation. I also don't see what texturing has to do with all this. If you want to know about homogenous coordinates read the earlier replies and search the web.

The plane equation A * x + B * y + C * z + D = 0 is true for all points that lie on a plane, parametrized by A, B, C and D. If you don't get it, get a good book on geometry or search the web. D is not the length of any normal, it's the plane's offset from origo.

If you want to go on trolling/get banned/something, keep up the good work :)

Share on other sites
Quote:
 Original post by Anonymous PosterThe plane equation A * x + B * y + C * z + D = 0 is true for all points that lie on a plane, parametrized by A, B, C and D. If you don't get it, get a good book on geometry or search the web. D is not the length of any normal, it's the plane's offset from origin.

Only if the plane normal is actually normalised, its the amount you multiply the normal by to reach the plane from the origin otherwise.
As was clearly explained on the Wolfram site (to the OP). Near the diagram.

Share on other sites
Another useful thing about it is that if w = 0, you have a vector. The same transformation matrices will work with the vector. Rotations and scalings will work while translations have no effect (because a vector has no position).

Share on other sites
I got low experience of this (math).
I probably need pre-knowledge.
I missed some math in school.

I suspect there's knowledge before this I haven't learned yet.

How do I define a vector's direction and length?

[Edited by - programering on September 2, 2004 5:42:32 AM]

Share on other sites

This topic is 4848 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Create an account

Register a new account

• Forum Statistics

• Total Topics
628639
• Total Posts
2983972

• 10
• 18
• 20
• 13
• 9