Jocelyn Lin
- Problem Set #2
| ||
Part 1 |
![]() |
paper 73 |
Choose a single shade of a paper and render that shade.
| ||
Part 2 |
p2.dbn |
//a hop, skip, & a jump set h 5 set s (h+5) set j (h*3) paper 100 //hop repeat a h 1 { paper ((a*10)+(100-(h*10))) } repeat b 1 h { paper ((b*10)+(100-(h*10))) } //skip repeat a s 1 { paper ((a*10)+(100-(s*10))) } repeat b 1 s { paper ((b*10)+(100-(s*10))) } //jump repeat a j 1 { paper ((a*10)+(100-(j*10))) } repeat b 1 j { paper ((b*10)+(100-(j*10))) } |
Create a sequence of shaded papers using the Repeat command as a short
animation of brightness. For example Repeat a 0 100 { Paper a } | ||
Part 3 |
p3.dbn |
//waltz set oom 70 set pa 50 set tempo 4 set air (20/tempo) forever { paper air //oom repeat w ((oom/tempo) - ((pa/tempo)-air)) (oom/tempo) { paper (w * tempo) } //pa repeat w air (pa/tempo) { paper (w * tempo) } //pa repeat w air (pa/tempo) { paper (w * tempo) } } |
Create an animation of a sequence of shaded papers that evokes a sense of rhythm.
| ||
Part 4 |
p4.dbn |
//nodding off set sa 20 set sb 40 set sc 65 set sd 100 set nod 5 //start getting sleepy repeat s 0 (sa*3) { paper (s/3) } paper (sa-nod) //sleepier repeat s ((sa-nod)*2) (sb*2) { paper (s/2) } paper (sb-nod) //fell asleep repeat s (sb-nod) sc { paper s } paper (sc-nod) //stay asleep repeat s (sc-nod) sd { paper s } |
Create an animation of a sequence of shaded papers that evokes a tranquil, sleepy image.
| ||
Part 5 |
p5.dbn |
//warmup scale set step 8 set interval (100/8) repeat note step 2 { //three consec "notes" (papers) paper (note*interval) repeat gliss (note*interval) ((note-2)*interval) { paper ((gliss/interval)*interval) } } paper interval |
Create an animation of a sequence of shaded papers that evokes a gradually increasing/heightening feeling.
| ||
Part 6 |
p6.dbn |
set l 50 pen 0 repeat a 0 100 { paper 20 line 20 a a 80 } |
Add a single line to the sequence, and let it fly in time. For instance
Repeat a 0 100 { Paper 0 Line a 0 a 100 } | ||
Part 7 |
p7.dbn |
repeat a 0 100 { paper 20 pen 0 line 20 a a 80 pen 43 line (a*4) 25 ((a*4)+20) 25 } |
Add another line and let two lines fly in contrasting styles.
| ||
Part 8 |
p8.dbn |
repeat a 0 100 { paper 20 pen 43 line 20 a a (a+20) pen 0 line 20 a a 80 } |
Let two lines fly in cooperative styles.
| ||
Part 9 |
p9.dbn |
//chris: your line is pretty symmetrical, //even though it's tilted off of its axis... //maybe you could try keeping the same //angle while offsetting it a bit // //orig: //paper 80 //pen 18 //line 85 25 15 55 paper 80 pen 18 line 36 40 15 46 |
Using Part 1 of Problem Set 1, you are asked to comment and improve on a colleague's work. The person you will choose is determined by your order in the pulldown menu of the main page. For example, Ben should comment on Bruce, Bruce on Nick, and all the way down to Hoeteck commenting on Ben (wrapped around). We don't have a form mechanism setup, so for now just put it inside your DBN buffer as a comment, and include a modified version of your colleague's program that reflects your suggestions.
| ||
Part 10 |
p10.dbn |
//chris: //the flat bottom on the object suggests //2 dimensions even though the shading //says otherwise. not quite sure whether //it's supposed to be rectangular...maybe //you could render the right side with 2 //triangles instead of one so that the //perspective looks more realistic. //orig: //paper 90 //repeat x 20 50 //{ // pen x // line x 5 x 50 //} //repeat x 50 80 //{ // pen x // line x 5 50 x //} //repeat a 20 50 //{ // pen a // line 50 80 a 50 //} //jocelyn's mod code: //rectangle repeat x 20 50 { pen x line x 5 x 50 } //top triangle repeat a 20 50 { pen a line 50 80 a 50 } //side triangle repeat x 50 79 { pen (x+5) line x (x-45) x (130-x) } |
Do the same as above for Part 10 of Problem Set 1.
|