Inside the Light Pen Gun - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Inside the Light Pen Gun

Description:

A CRT monitor works by scanning across the screen one line at a time. ... The photo diode inside the gun is far away from the CRT. Lenses are used to focus light. ... – PowerPoint PPT presentation

Number of Views:1675
Avg rating:3.0/5.0
Slides: 11
Provided by: vrKai
Category:
Tags: gun | inside | light | pen

less

Transcript and Presenter's Notes

Title: Inside the Light Pen Gun


1
Inside the Light Pen / Gun
  • cs480
  • 20053259 ???

2
CRT monitor /1
  • A CRT monitor works by scanning across the screen
    one line at a time.
  • It scans each line until it gets to the bottom of
    the screen.
  • These are called raster lines.

3
CRT monitor /2
  • When the electron beam hits the phosphor the
    pixel lights up and fades.
  • Our eyes cannot detect this since our visual
    response time is too slow.

4
Light Pen /1
  • A light pen is a photodiode.
  • It will detect the passing of the electron beam
    (brightening of pixel).
  • The video card knows exactly where it is
    drawing at any instant.

5
Simple Algorithm
  • Button is pressed.
  • Wait until next redraw of screen.
  • Start timing (t0)
  • Stop timing (tT) when light pen detects light.
  • Calculate position using T, VREFRESH, HREFRESH
  • The vid card measures the y-position by counting
    the number of HSYNC pulses between last VSYNC
    pulse and the pulse from light pen. For
    x-position, we use the time from last HSYNC pulse
    to light pen pulse.

6
Light Gun
  • Light guns work on the same principle.
  • There is a photodiode inside the gun.
  • The photo diode inside the gun is far away from
    the CRT.
  • Lenses are used to focus light.
  • Resolution of the light gun used to be low so old
    computer games used different ways to detect
    where the gun is aimed.

7
Method 1
  • 1. Pull trigger
  • 2. Screen is blacked out.
  • 3. Photo diode activated
  • 4. Brighten each target sequentially.
  • 5. If gun detects light we know what target.
  • On poorly designed games you can point the gun at
    any light and always hit first target.
  • Whole process too fast for human eye.

8
Method 2
  • 1. Pull trigger (activate diode)
  • 2. Wait for refresh
  • 3. Time diode activation
  • 4. Calculate position using T, Vrefresh,
    Hrefresh.
  • The same principle as light pen.
  • Most modern arcade games use this method instead
    of first.

9
Notes
  • Many guns ignore red light since red light has
    much slower decay rate than green/blue.
  • Light guns/pens can only be used with CRT
    monitors.
  • Pens used on LCD use different principle.

10
References
  • http//www.answers.com/topic/light-gun
  • http//en.wikipedia.org/wiki/Light_pen
  • http//www.epanorama.net/documents/joystick/lightg
    un.html
  • Target acquisition of stationary and moving
    targets using light pen and joystick with
    position and velocity control, Richard Lynn
    Harner, 1980
Write a Comment
User Comments (0)
About PowerShow.com