Help with more stupid math

K.I.L.E.R

Retarded moron
Veteran
Guys I have another question.

I'm constructing a graph to measure some values.

I'm loading this matrix:
1000, 0, 0, 1000,
0, 60, 0, 0,
0, 0, 0, 0,
0, 0, 0, 15,

The measurements of Y-AXIS are in minutes (hence 60).
I'm plotting a distance in X-AXIS (km, in metres measurement(1000m per km)) vs time graph.

From my understanding is that the last column contains only w values which are used to normalise model coordinates into clip coordinates.

I understand that this:
"1000, 0, 0, 1000,"
is a vector and so:
"x, y, z, w,"

The last row in the matrix:
" 0, 0, 0, 15,"
Is effectively the origin of where my basis vectors come out of.

OpenGL has to normalise the coordinates and so the "W" value will have to be something valid.

My stupid graph is drawing everythin all wrong.

Here are the points I'm attempting to plot on the graph.
pts.add(new Scalar(1, 1, 0));
pts.add(new Scalar(1, 2, 0));
pts.add(new Scalar(2, 1, 0));
pts.add(new Scalar(5, 1, 0));

(1, 1) = 1000, 60
(1, 2) = 1000, 120
(2, 1) = 2000, 60
(5, 1) = 5000, 60

In the world coordinates.
Look at the image, the coordinates are disgustingly stuck on the end of the screen.
WTH?

My origin point of my basis vectors start at 0, so why do all my coordinates end up being at the end of the screen?

The points are drawn like this:
Code:
private void drawPoints(GL gl, Scalar p)
	{
		gl.glBegin(GL.GL_POINTS);
		{
			gl.glVertex3d(p.x, p.y, p.z);
		}
		gl.glEnd();
	}

Please don't tell me that I have to apply a scale onto the end of my modelview matrix.
I shouldn't need to apply a scale at the end of it because it would just be a hack.
 

Attachments

  • graph.JPG
    graph.JPG
    3.1 KB · Views: 2
Back
Top