Bring Your Own Medium to the Cave III: Cave Animations

CS137 Assignment #3

 

1. Dates

Out

Tues, 9/28

Due

Tues, 10/5

2. Goals

1. Get some introduction to real scientific data.

2. Start thinking about animated motion in your designs.

3. Learn more about the Cave's strengths and weaknesses for working with data and animation.

4. Learn more about CavePainting strengths and weaknesses for working with data and animation.

3. Readings

·         Check the website for updated readings.

4. Assignment

 

In this assignment you will augment your earlier assignments by connecting them to real data and incorporating animation. The idea is for you, as a group, to understand how this process is done both programmatically and interactively using a modified version of CavePainting. You will use the tools available to you in this assignment when working on your final projects as well, so the learning will have future value.

We have connected CavePainting to a dataset that contains information about the fluid flow around a bat during one cycle of its wing beat. Your goal on this assignment is to understand the examples given to you, see how you can fit your own design into the framework the support code is giving you, and implement it. This assignment will be graded based on three criteria: The use of animation in your environment, the use of some programming to connect design and data, and the realization of some pieces (or all) of your design being animated or otherwise modified in some aspect driven by the flow data.

Collaboration is key in this assignment. Designers will come up with ideas that computer scientists will have trouble implementing given the support code. That’s when computer scientists need to communicate to their designers the possibilities and limitations of the programming part.

The support code for this assignment is actually a program that you need to build (for non-programmers, this means translating the instructions we wrote in the code into instructions the computer understands… computers don’t speak much English) before you can run it on the cave.

There are a bunch of examples already in the support code that will help you understand the flow data and the assignment, and you don’t need to know how to code to see them! (... how about those TAs, ah?). There are three main types of examples you can interact with in the assignment:

  • Flow Icons: You can design icons that will be placed in the flow and move, following the flow, as the bat flaps its wings.
  • Flow Probes: You can design icons that will be static in the flow, but they will change and morph based on the flow around them.
  • Wing Icons: You can attach strokes to the wings of the bat and see them change as the wing cycle goes on.

The TAs will try to accommodate and improve the support code as required during this week, but the assignment will require some digging around if you want to implement some completely new idea during this week. Keep in mind this is not your final project but just a ‘getting-your-feet-wet’ mini-project.

5. Resources

5.1 Getting the support code

On your cs137/ directory type:

            cs137handout 3

This will create a subdirectory called asgn3/ under your cs137/ folder, where all the necessary code for this assignment is.

After you’ve got your code in your account, build it by typing:

            make

After about 2 or 3 minutes, the prompt will return and you will be able to type again. Now you can run it in the cave by typing:

            ./runcave

Note, it’s all one word, not like the second assignment. We will have a help session to explain how to see the different examples and how the different parts of the assignment are present in the cave when you run the support code.

5.2 Structure of the code

Here are the main classes you need to know about:

·        TestApp         Initializes the application and connects CavePainting, ParticleVis (this is the library used to create the Bat Flight Demo), and Nektar (this the Computational Fluid Dynamics code that was used to calculate the fluid flow simulation, it’s where the data comes from)

·        DataBrain      That’s exactly what it is. It allows us to connect CavePainting, which doesn’t know about data, with the data application (Nektar and ParticleVis) which don’t know about CavePainting.

·        FunctionalArtworkLayer       When you want to create a layer whose elements respond to data, you need to subclass from FunctionalArtworkLayer

The three types of examples mentioned before (Flow Icons, Flow Probes, and Wing Icons) are specified in the following classes. First The Flow Icon:

·        FlowIconArtworkLayer          Subclass of FunctionalArtworkLayer whose elements get placed in the flow and move with it. Think of it as placing a cork (or many corks) in a stream of water

·        FlowIconDrawObj                  There are different types of FlowIcons (corks…), and the idea is that you only have to draw one and it gets replicated many times in the flow. You need to subclass from this class to create a new type of icon. Current subclasses are:
-
PlainFlowIcon. An element that just gets placed in the flow
-
RotationFlowIcon.
An element that gets placed in the flow and rotates based on some other piece of data.
-
ColorFlowIcon. An element that gets placed in the flow and changes color based on some other piece of data.

Second, the Flow Probe example:

·        VelocityMarksArtworkLayer             Subclass of FunctionalArtworkLayer whose elements are static in the flow but get modified by it. Think of it as a windsock

Finally, the Wing Icon example:

·        BatWingArtworkLayer          Subclass of FunctionalArtworkLayer whose elements get draped onto the batwing and follow it during the wing beat

·        BatWingReferenceLayer                 Class that draws and animates the actual model of the bat. It’s in a layer by itself, so it can be hidden and used only for reference when  you need it.

There are other files in the support code given to you, but these should be the ones you need to look at to understand how the examples work.

IMPORTANT!! ATTEND THE HELP SESSION TO KNOW MORE DETAILS ABOUT THE SUPPORT CODE AND BETTER UNDERSTAND THE EXAMPLES!!

5.3 What you need to do

Again, this assignment will be graded based on three criteria:

·        The effective use of animation in your environment. Going from static designs to having real data interact with your environment presents a difficult design challenge.

·        The use of some programming to connect design and data. Take a look at the examples given to you and create your own to accommodate your design.

·        The implementation of some elements that interact with the flow data and get transformed by it in some meaningful way. That’s to say, it would help a potential scientist understand and visualize the air flow around the wings of the bat during flight.

5.4 Handing your code in

Go to your cs137/asgn3/ directory and type:

            cs137handin3   yourgroupnamehere

Make sure a button shows up in the kiosk with ‘asgn3.yourgroupname’. Run it from the kiosk and make sure it has what you want to handin.

6. Questions (answer briefly)

1.  For each one of the readings due on Tue 10/5, write 2 discussion questions that you think are interesting about the paper or book chapter.

2.  Describe your creations and how you adapted your design to include animation and real data interaction.

3.  What do you wish you could have done, but you couldn’t? Did you need more time or just better support code?

7. Checklist

·         Completed readings

·         Handed-in the code (one per group)

·         E-mailed answers to questions to TA (each person in the group)