Vizard 8 » Reference » Viewpoints & Windows » Orthographic lenses
8.0

Orthographic lenses

An orthographic lens has no perspective. Instead, parallel rays remain parallel to the image and don't converge. An orthographic lens is useful for when you want the 2.5D look or when you're rendering 2D objects that shouldn't have perspective anyway. To use an orthographic lens, you need to set the left, right, top, bottom, near and far boundaries. Your near boundary can actually extend behind the viewer. Not that moving around a world while using a orthographic lens can be disorienting since objects will not get smaller as a factor of distance.

Procedure for adding an orthographic lens

  1. Include myWindow.ortho(left, right, bottom, top, near, far) in your script.
  2. Replace myWindow with a window that you've previously added.
  3. Replace left, right, bottom, top, near, and far with values for the left, right, bottom, top, near and far boundaries you want to capture.
viz.add('carousel.wrl')
window = viz.addWindow()
window.ortho(-1,1,-1,1,-1,1)

See also

In this section:

Viewpoint and window basics

Perspective rendering

Viewpoint basics

Window basics

Viewpoints & windows command tables

Other sections:

Action Basics

Animation path basics

Application window basics