Type + Code: Processing For Designers

Page 104

Type + Code page >L< even {80} page Yeohyun Ahn. Viviana Cordova.

noFill(); stroke(0, 0, 0, 50); f = new RFont(this, FONT, 372, RFont.CENTER); initialize(); } void draw(){ pushMatrix(); translate(width/2,height/2); // Draw very low alpha and long tangents on random points of each letters for(int i=0;i<grp.countElements();i++){ s = (RShape)(grp.elements[i]); for(int j=0;j<s.countSubshapes();j++){ for(int k=0;k<VELOCITY;k++){ pos = random(0, 1); RPoint tg = s.subshapes[j].getCurveTangent(pos); RPoint p = s.subshapes[j].getCurvePoint(pos); p.x = p.x + random(-POINTERROR,POINTERROR); p.y = p.y + random(-POINTERROR,POINTERROR); len = random(-LENGTHTANGENT, LENGTHTANGENT); angle = atan2(tg.y, tg.x) + random(-ANGLEERROR, ANGLEERROR); bezier(p.x, p.y, 10, 10, 90, 90, 15, 80); } } } popMatrix(); } void initialize(){ grp = f.toGroup(STRNG); grp.centerIn(g,MARGIN,1,1); background(

www.caligraft.com


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.