psychopy.visual.windowwarp- warping to spherical, cylindrical, or other projections¶
Copyright (C) 2014 Allen Institute for Brain Science
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation on 29 June 2007. This program is distributed WITHOUT WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER WARRANTY, EXPRESSED OR IMPLIED. See the GNU General Public License Version 3 for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/
Warper(win, warp=None, warpfile=None, warpGridsize=300, eyepoint=(0.5, 0.5), flipHorizontal=False, flipVertical=False)¶
Class to perform warps.
Supports spherical, cylindrical, warpfile, or None (disabled) warps
Warping is a final operation which can be optionally performed on each frame just before transmission to the display. It is useful for perspective correction when the eye to monitor distance is small (say, under 50 cm), or when projecting to domes or other non-planar surfaces.
These attributes define the projection and can be altered dynamically using the changeProjection() method.
win : Handle to the window.
Example usage to create a spherical projection:
from psychopy.visual.windowwarp import Warper win = Window(monitor='testMonitor', screen=1, fullscr=True, useFBO = True) warper = Warper(win, warp='spherical', warpfile = "", warpGridsize = 128, eyepoint = [0.5, 0.5], flipHorizontal = False, flipVertical = False)
changeProjection(warp, warpfile=None, eyepoint=(0.5, 0.5), flipHorizontal=False, flipVertical=False)¶
Allows changing the warp method on the fly. Uses the same parameter definitions as constructor.