Thank you so much! Now I understand. Actually 'theta' and 'phi' are angles of projection with the x and y axes respectively.
Type: Posts; User: Lee_Jennifer_82
Thank you so much! Now I understand. Actually 'theta' and 'phi' are angles of projection with the x and y axes respectively.
Suppose, I have defined a model view matrix as follows:
where theta and alpha are some angles less that 90 degree.
What transformation actually this matrix does? Is it about some...
Thank you! But sometimes models (objects) go through local transformation like rotation, scaling etc, before camera or view transformation, but in this case lights only need to go through camera/...
Suppose, I've defined models/ objects and light position in my program. Models will undergo modelview transformation and light position will undergo view transformation. Is it right?
Sometimes I...
But when red is at top, shouldn't be the red component more prominent? The resulting color (0.5, 0.75, 0.25) shows green is prominent here.
I was just taking a look at the following tutorial:
http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-10-transparency/
But a bit confused at the end. It tries to draw a red...
Ok, clipping is performed in homogeneous coordinate to avoid division by zero. But can't this also happen during perspective division? I'm a bit confused.
Hello GClements, thank you so much for the clarification. Now much clearer:at clipping stage perspective transformation doesn't have meaning.It only have meaning after perspective division. Now if...
Hello, I need some clarification about clipping. It is said clipping is done before the perspective division and the view volume is within the following boundary
1)Does it mean clipping is...
Please ignore my poor knowledge. Is it that viewplane is the near plane in perspective projection?
Thanks for the explanation. I have another simple question:suppose I'd like to see the same object using orthographic as well as perspective projection. My eye is at the same distance suppose (0, 0,...
Hello, GClements, thank you so much for the explanation.
Does it always hold for perspective projection that near and far planes both should be in front of the eye? Or there is some...
I was just looking at Angel's book about derivation from Frustum to Perspective
it is written
Now ,top derived as follows:
Should not be top defined as follows:
I have two vertex array objects. I defined as follows:
My question is, is it okay to define two vertex array objects like these for drawing two objects?
Because when I use the...
But why it should have the same effect.Isn't the near plane at the back of camera in this case? What did you mean by overdraw, drawing two objects one behind another? Will then this change be...
I figured it out. there was something wrong in the shader. I used some scale factor which was producing wrong result. But I swapped near and far plane and that didnot have effect on the output. Could...
Ok, thanks. Now I am again asking the following question.
I've drawn a cube at the origin. Now I've called the ortho function from glm library as follows:
glm::mat4 projection_matrix =...
I've the following few questions:
Does the default image always form at the eye position?
In some books, eye position and view reference point mentioned as the same? Is it true only for default...
Hello, I'd like to draw the bounding box after applying the following projection matrix:
glm::ortho(-10.0f, 10.0f, -10.0f, 10.0f, 1.0f, 10.0f);
How can I find the coordinates of the bounding...
It works Alfonso, my code was wrong, aspect should be Width/ Height.
Thank you!
Thank you both Dark Photon and GClements for trying to help me out. I understand but still a bit confused. I understand znear is smaller near the eye and perspective division produces the result at...
Hello GClements, I'm still unclear. It would be very kind of you to explain with respect to the example mentioned below:
Camera at origin, object at origin and ortho function looks like follows:
...
I used the following for orthographic projection, but it didn't work. What's wrong?
my reshape function is as follows:
I understand that, but shouldn't be znear = +1 and zfar = -1 ?
But then how should I choose near and far for glOrtho when my object is drawn at the center so that I know the object should be displayed. What is the ideal way? It is said near and far are bounding...