220b-winter-2008/hw2: Difference between revisions
Appearance
No edit summary |
|||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= Homework #2: Cells | = Homework #2: Cells, Automata, Music = | ||
<div style="text-align: left;">[[Image: | <div style="text-align: left;">[[Image:Calories-3.png]]</div> | ||
Due date: 2008.2.22 11:59:59pm (or thereabout), Friday. | Due date: 2008.2.22 11:59:59pm (or thereabout), Friday. | ||
=== Reading (part 0 of 3): | == Collaboration == | ||
* in this and the next 220b assignment, you have the option of officially working in a duo | |||
* you can still go "maverick" (i.e., solo) | |||
* if you work as duo, each person has to turn in her/his version of this homework (or alternatively credit two sets of deliverables to the same group) | |||
* have fun! | |||
== Reading (part 0 of 3): == | |||
* recall the article on [http://en.wikipedia.org/wiki/Cellular_automaton cellular automaton] | * recall the article on [http://en.wikipedia.org/wiki/Cellular_automaton cellular automaton] | ||
* check out [http://www.ling.su.se/staff/hartmut/kemplne.htm Von Kempelen's Speaking Machine] and [http://en.wikipedia.org/wiki/The_Turk The Turk] | * check out [http://www.ling.su.se/staff/hartmut/kemplne.htm Von Kempelen's Speaking Machine] and [http://en.wikipedia.org/wiki/The_Turk The Turk] | ||
Line 12: | Line 18: | ||
** craft a short essay/haiku/image/program about the relationship of '''The Turk''' to the concept of a [http://en.wikipedia.org/wiki/Turing_test Turing test]. | ** craft a short essay/haiku/image/program about the relationship of '''The Turk''' to the concept of a [http://en.wikipedia.org/wiki/Turing_test Turing test]. | ||
== Specification (part 1 of 3): == | |||
=== Downloadin' and Compilin' === | |||
* download the calories software [http://ccrma.stanford.edu/~ge/software/calories/ here] : version 1.0.4 (updates will be announced to class mailing list) | |||
* unpack it (somewhere): | |||
tar xvzf calories-x.x.x.tgz | |||
* go into the calories-x.x.x folder | |||
* inside the extracted 'calories' folder, you should see 3 sub-folders: | |||
** ''ctrl'': folder containing example chuck code to control visualization | |||
** ''gfx'': c++ code for the visualizer | |||
*** '''ca.h''': header file for CA's (implement new CA classes here) | |||
*** '''ca.cpp''': implementation for things defined in ca.h (implement rules for new CA classes here) | |||
*** '''calories.cpp''': monolithic disaster source file that contains visualization + instantiation of CA to be used | |||
** ''sound'': code that receives OSC messages from calories to generate sound (can also use control) | |||
* go into the gfx folder: | |||
cd gfx | |||
* compile it | |||
** for example on linux: | |||
make linux | |||
** on OS X: | |||
make osx | |||
** windows is currently not supported | |||
* if all goes well, you should end up with no errors, and a new 'calories' executable in the folder | |||
=== Runnin' === | |||
* invoke calories with the '--help' flag to see the command line options: | |||
./calories --help | |||
usage: calories --[options] | |||
[options] xyz:<N>|xy:<N>|x:<N>|y:<N>|z:<N> | |||
for example, to create a 16x16x16 cellular automaton, invoke: | |||
calores -xyz:16 | |||
calories version: 1.0.0 | |||
* for example, if you want a 2D, 16x16 cellular automaton: | |||
./calories -xy:16 | |||
* for example, if you want a 3D, 32x32x32 cellular automaton: | |||
./calories -xyz:32 | |||
* if you look at the terminal after you run calories, or if you press 'h' while calories is in focus, you can see the real-time key commands: | |||
---------------------------------------------------- | |||
'h' - print this help message | |||
'0' - clear the cellular automaton | |||
[1-9] - randomize the automaton with various density | |||
'n' - compute next generation | |||
'N' - compute next generation + send all cells (use with care!) | |||
'M' - send all cells only (use with care!) | |||
'a' - toggle automatic evolution | |||
'[' and ']' - rotate automaton | |||
'-' and '+' - zoom away/closer to center of automaton | |||
'f' - toggle fog rendering (recommended) | |||
'<' and '>' - adjust fog density | |||
's' - toggle fullscreen | |||
'r' - toggle wireframe rendering | |||
'q' - quit | |||
---------------------------------------------------- | |||
=== Specification (part 2 of 3) === | === Specification (part 2 of 3) === | ||
* get chuck talking to calories, in terms of control and sound | |||
* add a new cellular automaton with your own rules, by adding a new class in ca.h and ca.cpp, and then instantiating it calories.cpp | |||
=== Specification (part 3 of 3): === | === Specification (part 3 of 3): === | ||
* create a piece, either automated or human-controlled, with your cellular automaton | |||
* can use the rules from the Game of Life, or employ your own rules | |||
* can be in 2D or 3D, of any dimension, or a combination | |||
* can be networked between hosts (though this is defintely *not* required) | |||
* suggestion: start small (e.g., with 8x8 or 4x4x4 CA's), work together! | |||
* create a recording OR a video of a live performance | |||
=== Deliverables === | === Deliverables === | ||
Line 26: | Line 90: | ||
your Library/Web/220b/hw2.html''' | your Library/Web/220b/hw2.html''' | ||
* 1) | * 0) your response from part 0 of 3 | ||
* 2) a short README text ('''readme.txt''') file that: | * 1) all source code, including c++ files with your custom CA | ||
* conveys your ideas/comments in constructing each program | * 2) a recording of the musical statement OR video of a live performance/demo of your CA-based music system | ||
* 3) a short README text ('''readme.txt''') file that: | |||
* states with whom you worked, if anyone | |||
* conveys your ideas/comments in constructing each program | |||
** contains instructions on running your programs | ** contains instructions on running your programs | ||
** explains your custom CA | |||
** outlines how your piece was made | |||
** describes any difficulties you encountered in the process | ** describes any difficulties you encountered in the process | ||
* | * 4) your hw2.html should link to these files (optionally, you can include your README in your hw2html) |
Latest revision as of 18:05, 19 February 2008
Homework #2: Cells, Automata, Music
Due date: 2008.2.22 11:59:59pm (or thereabout), Friday.
Collaboration
- in this and the next 220b assignment, you have the option of officially working in a duo
- you can still go "maverick" (i.e., solo)
- if you work as duo, each person has to turn in her/his version of this homework (or alternatively credit two sets of deliverables to the same group)
- have fun!
Reading (part 0 of 3):
- recall the article on cellular automaton
- check out Von Kempelen's Speaking Machine and The Turk
- ruminate about these devices
- craft a short essay/haiku/image/program about the relationship of The Turk to the concept of a Turing test.
Specification (part 1 of 3):
Downloadin' and Compilin'
- download the calories software here : version 1.0.4 (updates will be announced to class mailing list)
- unpack it (somewhere):
tar xvzf calories-x.x.x.tgz
- go into the calories-x.x.x folder
- inside the extracted 'calories' folder, you should see 3 sub-folders:
- ctrl: folder containing example chuck code to control visualization
- gfx: c++ code for the visualizer
- ca.h: header file for CA's (implement new CA classes here)
- ca.cpp: implementation for things defined in ca.h (implement rules for new CA classes here)
- calories.cpp: monolithic disaster source file that contains visualization + instantiation of CA to be used
- sound: code that receives OSC messages from calories to generate sound (can also use control)
- go into the gfx folder:
cd gfx
- compile it
- for example on linux:
make linux
- on OS X:
make osx
- windows is currently not supported
- if all goes well, you should end up with no errors, and a new 'calories' executable in the folder
Runnin'
- invoke calories with the '--help' flag to see the command line options:
./calories --help usage: calories --[options] [options] xyz:<N>|xy:<N>|x:<N>|y:<N>|z:<N> for example, to create a 16x16x16 cellular automaton, invoke: calores -xyz:16 calories version: 1.0.0
- for example, if you want a 2D, 16x16 cellular automaton:
./calories -xy:16
- for example, if you want a 3D, 32x32x32 cellular automaton:
./calories -xyz:32
- if you look at the terminal after you run calories, or if you press 'h' while calories is in focus, you can see the real-time key commands:
---------------------------------------------------- 'h' - print this help message '0' - clear the cellular automaton [1-9] - randomize the automaton with various density 'n' - compute next generation 'N' - compute next generation + send all cells (use with care!) 'M' - send all cells only (use with care!) 'a' - toggle automatic evolution '[' and ']' - rotate automaton '-' and '+' - zoom away/closer to center of automaton 'f' - toggle fog rendering (recommended) '<' and '>' - adjust fog density 's' - toggle fullscreen 'r' - toggle wireframe rendering 'q' - quit ----------------------------------------------------
Specification (part 2 of 3)
- get chuck talking to calories, in terms of control and sound
- add a new cellular automaton with your own rules, by adding a new class in ca.h and ca.cpp, and then instantiating it calories.cpp
Specification (part 3 of 3):
- create a piece, either automated or human-controlled, with your cellular automaton
- can use the rules from the Game of Life, or employ your own rules
- can be in 2D or 3D, of any dimension, or a combination
- can be networked between hosts (though this is defintely *not* required)
- suggestion: start small (e.g., with 8x8 or 4x4x4 CA's), work together!
- create a recording OR a video of a live performance
Deliverables
turn in all files by putting them in your Library/Web/220b/hw2/ directory, and then linking to them from your Library/Web/220b/hw2.html
- 0) your response from part 0 of 3
- 1) all source code, including c++ files with your custom CA
- 2) a recording of the musical statement OR video of a live performance/demo of your CA-based music system
- 3) a short README text (readme.txt) file that:
- states with whom you worked, if anyone
- conveys your ideas/comments in constructing each program
- contains instructions on running your programs
- explains your custom CA
- outlines how your piece was made
- describes any difficulties you encountered in the process
- 4) your hw2.html should link to these files (optionally, you can include your README in your hw2html)