S
S
Suzerain2016-09-18 18:47:43
Java
Suzerain, 2016-09-18 18:47:43

What matrix to use for projective transformation?

There is a certain geometric figure in three-dimensional space, given by a matrix. You need to project it and draw it. As I understand it, this is called a projective transformation? For example, cube:
double[][] src =new double[][]{
{100,100,100,1},
{100,100,300,1},
{100,300,300,1},
{100,300,100,1},
{300,100,100,1},
{300,100,300 ,1},
{300,300,300,1},
{300,300,100,1}
};
While I tried to multiply each point (vector) by just such a matrix, but apparently this is not correct.
{1, 0, 0, 0},
{0, 1, 0, 0},
{0, 0, 1, r},
{0, 0, 1, 0}};

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aol-nnov, 2016-09-18
@aol-nnov

habr knows :) though, there is only 2d)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question