There is a certain geometrical figure in three-dimensional space, given as a matrix. You need to project and render it. As I understand it, this is called a projective transformation? For example, a 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 trying to multiply every point (vector) in this matrix, but apparently it's not correct.

{1, 0, 0, 0},

{0, 1, 0, 0},

{0, 0, 1, r},

{0, 0, 1, 0}};

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 trying to multiply every point (vector) in this matrix, but apparently it's not correct.

{1, 0, 0, 0},

{0, 1, 0, 0},

{0, 0, 1, r},

{0, 0, 1, 0}};

asked July 4th 19 at 23:29

1 answer

answered on July 4th 19 at 23:31

Habr knows :) however, there is only 2D )

Read but did not understand what to do with it. If properly understood, the matrix (ABCDEFabc) is what you need. But how to obtain these same ABCD? - nikita.Stracke commented on July 4th 19 at 23:34

Find more questions by tags Java