psychopy/psychopy — pull request #644 by jaybo (2014-08-07 20:00:43+00:00)
Title: NF: Add warping and frame packing 

**New feature 1**
Add spherical, cylindrical, warpfile output warping These features can be used for dome projections and also for perspective correction when the eye is close to a flat panel screen.

**No Warp**
![warpnone](https://cloud.githubusercontent.com/assets/1607323/3847769/f41093a0-1e68-11e4-9aec-fb82b17a28d8.png)

**Spherical warp for flat panel display perspective correction** eye at 10cm
![warpspherical](https://cloud.githubusercontent.com/assets/1607323/3847779/0ce40f42-1e69-11e4-8cad-fef9ca2c7946.png)

**Cylindrical warp for flat panel display perspective correction** eye at 10cm
![warpcylindrical](https://cloud.githubusercontent.com/assets/1607323/3847783/10f60388-1e69-11e4-8a98-6cdb9e8facd0.png)

**Warpfile for dome projection and quarter reflecting mirror** with opacity fadeout along upper edge
![warpwarpfile](https://cloud.githubusercontent.com/assets/1607323/3848012/6ef993b2-1e6b-11e4-87ad-5b6820bcdc1a.png)

**New feature 2**
Add frame packing to achieve 180Hz stimuli when using projectors in structured light mode.

**Usage examples**
Using both warper and frame packer simultaneously:

warper = Warper (warp='spherical')
framePacker = ProjectorFramePacker()

win = Window(monitor='LightCrafter4500', warper = warper, framePacker = framePacker, useFBO = True)

All warper features:

warper = Warper (warp='spherical', warpfile = "", warpGridsize = 128, eyepoint = [0.5, 0.5], flipHorizontal = False, flipVertical = False)

If using neither warper or frame packer, window creation is still just:

win = Window()

I realize the approach I've taken to burden the window class with even more parameters isn't the preferred method of adding additional functionality, but I'm throwing this out as a strawman for further discussion.

The unanswered question is: What is the best way to add hooks or plug-ins to the inner flip() loop which must modify subsequent logic flow within flip() itself?

Search window.py for **flipThisFrame** to see points where program flow must be altered.