Persistence of Vision Michael Warrick, Ethan McGee
What is it?
• The theory that an "a5er-‐image" remains on the re:na for up to 1/25th of a second before being supplanted by the next impression. • No longer an accepted theory, s:ll in popular use • Phi phenomenon and Beta mo:on
Phi Phenomenon
• the op:cal illusion of perceiving con:nuous mo:on between separate sta:onary objects viewed rapidly in succession. • two adjacent lights flashing
• Interval between object should be faster than 150ms • Does not rely on an "a5er image" effect • Examples:
• Flip books • Cartoons • Movies
12 Frames Per Second
24, 30, vs. 60 Frames Per Second
Embedded Displays & POV
Beta Phenomenon
DefiniIon
A kind of apparent mo:on seen, for example, when lights sta:oned at different posi:ons are flashed on and off alternately at intervals of
between 30 and 60 Hz, which produces a realis:c sensa:on of the light moving from one posi:on to the other.
ImplementaIon
Notes
• Know the constraints of your display. • For our examples, we will use 8x8.
• Pick a size for all le[ers, and in general s:ck with one case. • We’ll use uppercase le[ers in a 6x3 configura:on.
Convert to LED Layouts
*** ** *** * * * * * A = * * B = ** C = * *** ** * * * * * * * * ** ***
Storing the RepresentaIons
• We really don’t want to have to recalculate the binary representa:on each :me • We want to be able to build the columnar representa:on of our string
Triply-‐Nested Array
• le[ers[‘A’-‐’A’] = [[1,1,1], [1,0,1], [1,0,1], [1,1,1], [1,0,1], [1,0,1]] • le[ers[‘B’-‐’A’] = [[1,1,0], [1,0,1], [1,1,0], [1,1,0], [1,0,1], [1,1,0]] • le[ers[‘C’-‐’A’] = [[1,1,1], [1,0,0], [1,0,0], [1,0,0], [1,0,0], [1,1,1]]
Making the Rows
• We’ll s:ck one column between le[ers so to display “ABC” • row1 = [1,1,1,0,1,1,0,0,1,1,1,0] • row2 = [1,0,1,0,1,0,1,0,1,0,0,0] • row3 = [1,0,1,0,1,1,0,0,1,0,0,0] • row4 = [1,1,1,0,1,1,0,0,1,0,0,0] • row5 = [1,0,1,0,1,0,1,0,1,0,0,0] • row6 = [1,0,1,0,1,1,0,0,1,1,1,0]
Simply BitshiW
• for i from 0 to sizeof(rows) • row[ i ] = 0 <= row[ i ] is the register controlling the i-‐th row the LED display
• while(displaying_message) • for j from 0 to sizeof(columms)
• for i from 1 to sizeof(rows) -‐1 • row[i] << columns[ i – 1 ][ j ]
• delay
Couple of Tricks
• How long should delay be? • You need the delay to be low enough that the sideways scrolling appears smooth and not jerky • Most open projects on the internet seem to use between .5ms and 1ms.
• No right answer. Pick a value that works for your project.
Conclusion
• We can use tricks from op:cal illusions / film to help make our displays seem more friendly and animated
QuesIons