We are looking for input for our Project 2 BAHAX demo

1 view
Skip to first unread message

Hong Quach

unread,
May 19, 2013, 9:43:56 AM5/19/13
to psu...@googlegroups.com, Andrew Vo, Hong Quach
Hello class,

Our Course Project 2 is to introduce a new XML vocabulary called BAHAX (Bitmap Animation by Hong and Andrew XML).  As part of the presentation, we will demo how we can use BAHAX to describe a bitmap animation to be rendered on a 4x4x4 LED Cube that we build and controlled by an Arduino.  We would like to give you an opportunity to create your own animation to show during our demo of the LED cube.  Send us some binary string of length 64 such as:

"1111000000000000000011110000000000000000111100000000000000001111"
"0000000011110000000000000000111100000000000000001111000000000000"
"0000000000000000011110000000000000000111100000000000000001111000"

Don't know what LED Cube is about?  Here is a 20 seconds clips of our 4x4x4 LED Cube

----------------------------------------------------------------

Or if you are curious and want to be creative, checkout the BAHAX vocabulary below on how to provide us your animation in XML format that we can load it directly to our parser.  All you have to do is provide a set of bitmaps as shown by the example below:

Basic Elements:

  <name>Flips XY plane at constant YZ line</name>
    The name of the animation, we will put your name here (mostly use for commenting code)

  <repeat>3</repeat>
    The number of time to repeat this animation

  <frame></frame>
    Each frame contains one bitmap element and one holdCycle element.

  <bitmap>1111000000000000000011110000000000000000111100000000000000001111</bitmap>
    Each bit corresponded to a LED in the Cube.  So a 4x4x4 LED cube has 64 LEDs, which means each frame is consist of 64 bits where '1' means ON and '0' mean OFF.
    The bitmap string consists of 4 groups of 16 bits where each corresponds to a give layer (bottom up), with each bit mapped into the following order.
Inline image 3

Example: of a diagonal plane <bitmap>1111000000000000000011110000000000000000111100000000000000001111</bitmap>
Inline image 4

  <holdCycle>100</holdCycle>
    Number of cycle to display the frame.  This is equivalent to millisecond, so <holdCycle>1000</holdCycle> should display the frame for one second before moving on to the next frame in the sequence.


Complete Example:

    <animation>
        <name>Flips XY plane at constant YZ line</name>
        <repeat>3</repeat>
        <frame>
            <bitmap>1111000000000000000011110000000000000000111100000000000000001111</bitmap>
            <holdCycle>100</holdCycle>
        </frame>
        <frame>
            <bitmap>0000111100000000000011110000000000000000111100000000000011110000</bitmap>
            <holdCycle>100</holdCycle>
        </frame>
        <frame>
            <bitmap>0000000011110000000000001111000000001111000000000000111100000000</bitmap>
            <holdCycle>100</holdCycle>
        </frame>
        <frame>
            <bitmap>0000000000001111000000001111000000001111000000001111000000000000</bitmap>
            <holdCycle>100</holdCycle>
        </frame>
        <frame>
            <bitmap>0000000000000000000000001111111111111111000000000000000000000000</bitmap>
            <holdCycle>100</holdCycle>
        </frame>
        <frame>
            <bitmap>0000000000000000111111110000000000000000111111110000000000000000</bitmap>
            <holdCycle>100</holdCycle>
        </frame>
    </animation>

    <animation>
        <name>Blink All</name>
        <repeat>3</repeat>
        <frame>
            <bitmap>1</bitmap>
            <holdCycle>800</holdCycle>
        </frame>
        <frame>
            <bitmap>0</bitmap>
            <holdCycle>300</holdCycle>
        </frame>
    </animation>

Thank you,
Hong Quach and Andrew Vo
image.png
image.png
Reply all
Reply to author
Forward
0 new messages