gluPerspective

set up a perspective projection matrix

Signature

gluPerspective( GLdouble ( fovy ) , GLdouble ( aspect ) , GLdouble ( zNear ) , GLdouble ( zFar ) )-> void
gluPerspective( fovy , aspect , zNear , zFar )
gluPerspective( GLdouble(fovy), GLdouble(aspect), GLdouble(zNear), GLdouble(zFar) ) -> None

Parameters

VariablesDescription
fovy
Specifies the field of view angle, in degrees, in the y direction.
aspect
Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
zNear
Specifies the distance from the viewer to the near clipping plane (always positive).
zFar
Specifies the distance from the viewer to the far clipping plane (always positive).

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

gluPerspective
OpenGLContext OpenGLContext/browser/nodes.py Lines: 32
OpenGLContext OpenGLContext/move/viewplatform.py Lines: 140
OpenGL-Demo PyOpenGL-Demo/GLUT/shader_test.py Lines: 34, 75
OpenGL-Demo PyOpenGL-Demo/GLUT/molehill.py Lines: 133
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/checker.py Lines: 63
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 56
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/lorentz.py Lines: 72
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 65
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 143
OpenGL-Demo PyOpenGL-Demo/redbook/movelight.py Lines: 115
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 284, 292, 300, 368
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson4.py Lines: 68, 80
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 211
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson2.py Lines: 58, 70
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 93, 105
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 120, 132
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson5.py Lines: 71, 83
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson3.py Lines: 58, 70
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson1.py Lines: 58, 70
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson13.py Lines: 136
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 117, 136
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 379
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 128, 140
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 73, 85
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson11.py Lines: 53, 65
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson12.py Lines: 49, 61
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 58, 70
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 74, 86
OpenGL-Demo py2exe-example/shader_test.py Lines: 35, 76
Glinter Widget.py Lines: 586
pyBzEdit pyBzEdit.py Lines: 422, 774
{LGPL} PyUI pyui/renderers/openglGlut.py Lines: 232
{LGPL} PyUI tests/testcube.py Lines: 46
{LGPL} PyUI2 renderers/openglGlut.py Lines: 232
{LGPL} PyUI2 system/glutdevice.py Lines: 173
{LGPL} PyMT examples/apps/3Dviewer/3Dviewer.py Lines: 48
{LGPL} PyMT examples/apps/3Ddrawing/3Ddrawing.py Lines: 39
{LGPL} Pyggel pyggel/data.py Lines: 551, 613
{LGPL} Pyggel pyggel/view.py Lines: 302
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/Old/SoC/simplecube.py Lines: 51
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Spheres.py Lines: 22
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 38, 302
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Display3D.py Lines: 147
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/Display3D.py Lines: 152, 459
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 755
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Examples/simplecube/simplecube.py Lines: 23
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube.py Lines: 23
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube_controlled.py Lines: 75
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Display3D.py Lines: 147
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/Display3D.py Lines: 152, 459
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 754
Gloopy gloopy/view/projection.py Lines: 41
Visvis core/cameras.py Lines: 1150, 1765