Processing for Designers page >R< odd page {95} >Code Sample< ReadListFile(); Start_Second = Current_Second; } if(Active_Color>0) { int index = (int) random(0, Active_Color); int cindex = Mood_Trigger[index]; int r = (int)red(Color_Index[cindex]); int g = (int)green(Color_Index[cindex]); int b = (int)blue(Color_Index[cindex]); stroke(r,g,b, Alpha); }else { stroke(255,255,255, Alpha); } // Change the position and circumference of the ellipse, followed by the numeric color value for a black stroke ellipse(lastpos.x/1.5,lastpos.y/1.5,6, 6); } } void ReadListFile() { String lines[] = loadStrings(“list.txt”); String off=”Off”; String on=”On”; Active_Color = 0; for (int i=0; i < lines.length; i++) { if(lines[i].equals(on)==true) { Mood_Trigger[Active_Color]=i; Active_Color++; }else { //Mood_Trigger[i]=0; } } }
Change the visual properties of the letter design (between the two previous examples on page 92) by altering the position and circumference values in the red highlighted code.
www.caligraft.com
The authors would like to acknowledge Ricard Marxer Piñón for his free software (open source) application Caligraft written for the Processing Geomerative library. Code samples 1, 2, and 3 liberally uses this resource to create many of the dynamic typefaces in this publication. Each sample was recreated and written by Yeohyun Ahn to combine Processing code structures with the visual properties and language of graphic design and typography. For further information on Caligraft, please contact Ricard Marxer Piñón at www.ricardmarxer.com.