Questions tagged [projection-matrix]
234 questions
0
votes
1 answer
Compensate screen rotation by modifying GL_PROJECTION in OpenGL
Is it possible to set up GL_PROJECTION in OpenGL to compensate screen rotations?
I think there is a lot of applications to that, in augmented reality or stereoscopic views, for instance.
Particularly, I would like to make a "fake" change of…

rraallvv
- 2,875
- 6
- 30
- 67
0
votes
0 answers
gluOrtho2D in webGL
UPDATE: this code actually works. My bug was a stray call to glViewport; that seems to be browser-window anchored and not canvas-relative in webGL and it was pushing everything off-screen. So the code in this question shows how to create a correct…

Will
- 73,905
- 40
- 169
- 246
0
votes
1 answer
Backprojection from projection matrix using MATLAB
I've a 256x256 projection matrix. each row is a projection taken with equal angles. i need to generate the original image with backprojection using matlab and I am not really familiar with matlab. Can you suggest me any code samples or alghorithms?…

dum
- 228
- 2
- 4
- 17
-1
votes
1 answer
confusion about gluProject and OpenGL clipping
Consider the fixed transformation pipeline of OpenGL, with the following…

diegor
- 542
- 2
- 15
-1
votes
1 answer
projecting nodes on circumference divided into 36 parts
I am working on a task in which I have to project nodes (X and Y coordinates) of a point cloud to the circumference located exactly on the centre of gravity of the mesh (Geometry). My question is how can I create a circumference on the geometry and…

Urvish
- 1
- 1
-1
votes
3 answers
Why use a Matrix for 3D Projection?
After searching up the calculations for a Projection Matrix (atleast in OpenGL),
Why bother using a Matrix when we have so many empty values? I count 9 entries marked as 0, and only 7 containing useful data. Why not just use a similar 1D array, and…
user5549921
-1
votes
1 answer
Why code is not giving proper results Matlab?
I know this type of questions may have been answered before but i am a beginner in matlab so please bear my kiddy questions.
I wan to generate a 11*12 matrix from a set of values. i have five different vectors named X,Y Z,u,v.
my code…

Rafay Zia Mir
- 2,116
- 6
- 23
- 49
-2
votes
1 answer
glOrtho() not working as I thought it would
I am trying to have one of the viewports in my window display an orthographic projection of a teapot.
mat4 view = translate (identity_mat4 (), vec3 (0.0, 0.0, -40.0));
mat4 persp_proj = perspective(50.0, (float)width/(float)height, 0.1,…

mcdowesj
- 48
- 6
-3
votes
1 answer
2D Screen to 3D Space Projection, how to extend (x, y) to (x, y, z, w) to multiple inverse of viewprojection matrix?
I want to project a 2D screen point CGPoint(x, y) to 3D point(x, y, z), where z is not fixed. I learn from this website http://webglfactory.blogspot.com/2011/05/how-to-convert-world-to-screen.html, but the viewProjection matrix is 3*4. In arkit, the…

Hui Ye
- 1