Finish Optics, Gamepad API




CS185c

Chris Pollett

Mar 18, 2019

Outline

Introduction

The Eye as an Optical Device

A relaxed eyeball with parallel light rays hitting it A relaxed eyeball with light coming from a closer object Eye during accommodation

Vision Abnormalities

Eye with lens in front

VR Headset Model

A Simplified Model of a VR Headset

Cameras

Camera Obscura View From a Window In Nice CMOS Sensors

Shutters and Aperture

Rolling Shutter Aperture

Quiz

Which of the following statements is true?

  1. Red light is higher frequency than blue light.
  2. The number of diopters of a lens is `1/f` where `f` is its focal length.
  3. Fish-eye lenses used in VR headsets usually cause pin-cushion distortions.

Gamepad API

Handling Connecting/Disconnecting Gamepads.

Monitoring Properties of the Gamepads.

Some Remarks on the Code

Drawing a Gamepad and Checking for Intersections

A More Advanced Gamepad Test

A more sophisticated gamepad test