# Change of speed but no change of size after OpenGL Perspective Projection

I am new to OpenGL and I am trying to code un optic flow with dots appearing from the background and moving towards the viewer. As a consequence of a perspective projection, the dots are faster and bigger when they move towards the viewer, but they are smaller and slower when they are farther away from the viewer.

As a result of OpenGL perspective projection, I got the dots moving faster when approaching the viewer, but their size does not change with the distance. Isn't the change of size a consequence of the projection -- just as the change of speed? If not, shall I compute it separately?

• What method are you using to draw the dots? Are they point sprites, points, triangle meshes, or something else? – Dan Hulme Sep 16 '19 at 13:14
• They are points, I used GL.GL_POINTS – Kathia Sep 16 '19 at 13:27

When you draw a point with GL_POINTS, it's not a 3D object with a size in world-space: its size is a fixed number of pixels. Because of that, the size of the point is independent of the distance from the camera.
• Well, the position is perspective-projected, regardless of what primitive (lines, points, triangles) you use. Since the speed is just the change in position over time, you should expect that to work correctly. It's like you've written code to turn on a single pixel. You use a perspective projection to determine the $(x,y)$ co-ordinates of the pixel to turn on, but you're still always turning on a single pixel. – Dan Hulme Sep 16 '19 at 14:42