From instruction: Draw a straight line and follow it
Code: Something about drawing a straight line. by uebergeek
#1 of 2. Software always seems to imply that we, as well as it, have our s**t together. But I never could draw straight - or follow instructions very well.
For those who don't have max or max runtime but want to play with the application it's available as an OSX app at http://thebot.org/instructionapps/lcdlinebasic.app.zip
max v2; #N vpatcher 163 63 1257 886; #P window setfont "Sans Serif" 9.; #P window linecount 1; #P hidden newex 252 604 73 196617 pipe 0 0 3000; #P hidden newex 656 664 40 196617 s tolcd; #P hidden message 656 638 33 196617 clear; #P hidden newex 656 596 46 196617 select 0; #P hidden newex 104 65 40 196617 r tolcd; #P hidden newex 74 487 40 196617 s tolcd; #P hidden message 207 456 65 196617 lineto \$1 \$2; #P hidden message 92 425 56 196617 line \$1 \$2; #P hidden newex 100 374 48 196617 pack 0 0; #P hidden newex 98 340 76 196617 pipe 0 0 3000; #P hidden number 152 306 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P hidden number 103 306 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P hidden newex 120 258 58 196617 unpack 0 0; #P user lcd 321 54 512 512 1 1 0 0 1; #P window linecount 7; #P comment 100 127 100 196617 I KNOW YOU SAID SOMETHING ABOUT STRAIGHT LINES AND FOLLOWING BUT I WASN'T PAYING VERY CLOSE ATTENTION \, SORRY; #P window linecount 10; #P comment 898 167 114 196617 NO \, THIS BOX ISN'T MY SOLUTION \, BUT IT COULD BE \, COULDN'T IT? WHY DON'T YOU TRY TO DRAW IN IT. GO AHEAD \; I'M NOT GOING TO DO ALL THE WORK MYSELF... I HOPE YOU CAN DRAW STRAIGHT.; #P window linecount 1; #P comment 875 202 100 196617 <=; #P window linecount 6; #P hidden comment 96 559 100 196617 THIS HERE IS THE MAGIC CODE. IT's SORT OF A FEEDBACK LOOP WITH A COUPLE OF DELAYS.; #P window linecount 5; #P comment 44 737 100 196617 THIS HERE LA MONTE YOUNG AIN'T NO LA MONTE YOUNG $1 by Amy Alexander 4/08; #P hidden connect 11 0 13 0; #P hidden connect 12 0 13 0; #P hidden connect 10 0 11 0; #P hidden connect 7 0 9 0; #P hidden connect 9 0 10 0; #P hidden connect 6 0 7 0; #P hidden connect 5 0 6 0; #P hidden connect 8 0 9 1; #P hidden connect 9 1 10 1; #P hidden connect 6 1 8 0; #P hidden connect 18 0 12 0; #P hidden connect 5 0 18 0; #P hidden connect 14 0 5 0; #P hidden connect 5 2 15 0; #P hidden connect 15 0 16 0; #P hidden connect 16 0 17 0; #P pop;
[download]
Written in Max/MSP/Jitter. Released under the MIT License license