background preloader

DataGraphics

Facebook Twitter

Developer Center : Flex data visualization. Processing (Proce55ing) Tutorial for Macromedia Minds. Let us break this code down, line for line. size(200,100); Calling the size function lets the size of the canvas to 200 pixels high, 100 pixels wide. If you do not call this at the beginning, the default will be 100x100. background(0,0,0); Calling the background function lets you change the color of the entire canvas. Stroke(255,0,0); Calling the stroke function lets you change the current drawing color so that every drawing command called after it will draw using that color. 255,0,0 means red. Point(50,50); Calling the point function will set the pixel at 50,50 to the current stroke color. This code makes a green dot in the center. stroke(0,0,255); point(150,50); This code makes the blue dot on the right. As you can see, this is similar to draw( ) Image Lingo, or those drawing methods in ActionScript.

Now, here are some pre-fab shapes. triangle will draw a three-pointed polygon. Triangle(x1, y1, x2, y2, x3, y3); quad will draw a four-pointed polygon. Quad(x1, y1, x2, y2, x3, y3, x4, y4); Style.org (experimental data graphics) Dabble DB: Dabble's Features.