Computers as an Expressive Medium - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Computers as an Expressive Medium

Description:

Sensor to Wheel. What do we do with this number? ... speed that one of our wheels is turning. We can hook our sensors up to the wheels on the same side, or ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 19
Provided by: mayhewse
Category:

less

Transcript and Presenter's Notes

Title: Computers as an Expressive Medium


1
Computers as an Expressive Medium
  • Lab 9 Braitenburg Vehicles
  • Mayhew Seavey

2
Glad you woke up for this?
  • Braitenburg vehicles
  • Sources to BImage to Sensors to Wheel
  • Code Questions

3
Sources to BImage
  • Our main two objects are Vehicle and Source. The
    Vehicle travels around and its movement depends
    on the readings it gets from the source.
  • However, what happens when were within the radii
    (or radiusses) of multiple sources?

4
Sources to BImage
  • Some blending can occur if the sources reach
    eachother.
  • The example code uses a BImage called the ground
    to represent how much light is touching that
    point.

5
Sources to BImage
  • Instead of calculating how close the vehicles
    sensor is to each source and figuring out how
    much light it sees, we calculate the brightness
    at each point on the screen at the beginning, and
    whenever we move a light.

6
Bimage to Sensor
  • Then we just look at the pixel information at the
    sensor every time the vehicle needs to move. Both
    sensors are at slightly different locations, so
    they will see different pixels.

7
Bimage to Sensor
8
Bimage to Sensor
9
BImage to Sensor
  • What information is our sensor getting?
  • It will just give us a number between 0 and 1
    telling us how much light it is seeing. We can
    use this information however wed like.
  • The more types of sources we make, the more
    sensory information well need to provide. For
    instance, a pixel could ALSO contain a number
    between 0 and 1 representing how much sound we
    hear. Well discuss more how to do this at the
    end.

10
Sensor to Wheel
  • What do we do with this number?
  • We can use this information to guide our vehicle.
    We do this by changing the speed that one of our
    wheels is turning.
  • We can hook our sensors up to the wheels on the
    same side, or those on opposite sides.
  • Lets look at an opposite side example.

11
Sensor to Wheel
12
Sensor to Wheel
Lets make the sensor slow down the wheel its
attached to.
13
Sensor to Wheel
Lets make the sensor slow down the wheel its
attached to.
14
Sensor to Wheel
Lets make the sensor slow down the wheel its
attached to.
15
Sensor to Wheel
  • You can model a number of reactive behaviors
    using this simple method. The key thing to
    remember is that by changing the wheel speed on
    different sides of the vehicle, you cause it to
    change speed AND direction.

16
Multiple Senses
  • Using multiple senses requires some expansion of
    the code.
  • First, in order to blend the sensory data of like
    types, but not other types, it will be necessary
    to store a BImage for each type. (one for light,
    one for sound, etc.)
  • Well also need to have different types of
    sources. We can either use a field in the class
    designating the source type, or use inheritance.

17
Multiple Senses
  • If we want to see the Images laid out on top of
    eachother, however, well need to do some work
    with alpha channels.

18
Group Coding!!
  • Lets try together!
Write a Comment
User Comments (0)
About PowerShow.com