Processing

Processing の examples その9 (Basics-Data-DatatypeConversion)

こど /** * Datatype Conversion. * * It is sometimes beneficial to convert a value from one type of * data to another. Each of the conversion functions converts its parameter * to an equivalent representation within its datatype. * The conv…

Processing の examples その8 (Basics-Control-EmbeddedIteration)

こうど /** * Embedding Iteration. * * Embedding "for" structures allows repetition in two dimensions. */ float box_size = 11; float box_space = 12; int margin = 7; size(200, 200); background(0); noStroke(); // Draw gray boxes for (int i = …

Processing の examples その7 (Basics-Control-Conditionals2)

コードじゃ /** * Conditionals 2. * * We extend the language of conditionals by adding the * keyword "else". This allows conditionals to ask * two or more sequential questions, each with a different * action. */ size(200, 200); background(0…

Processing の examples その6 (Basics-Control-Conditionals1)

コード /** * Conditionals 1. * * Conditions are like questions. * They allow a program to decide to take one action if * the answer to a question is true or to do another action * if the answer to the question is false. * The questions ask…

Processing の examples その5 (Basics-Color-Creating)

コードこれ /** * Creating Colors (Homage to Albers). * * Creating variables for colors that may be referred to * in the program by their name, rather than a number. */ size(200, 200); noStroke(); color inside = color(204, 102, 0); color mi…

Processing の examples その4 (Topics-Animation-Sequential)

アニメーションに興味があるのでアニメーション見てみます。 コードこんなの /** * Sequential * by James Patterson. * * Displaying a sequence of images creates the illusion of motion. * Twelve images are loaded and each is displayed individuall…

Processing の examples その3 (Basics-Color-Brightness)

コードこれ /** * Brightness * by Rusty Robison. * * Brightness is the relative lightness or darkness of a color. * Move the cursor vertically over each bar to alter its brightness. */ int barWidth = 5; int[] brightness; void setup() { size…

Processing の examples その0 (3D-Camera-MoveEye)

コードはこんなの /** * Move Eye. * by Simon Greenwold. * * The camera lifts up (controlled by mouseY) while looking at the same point. */ void setup() { size(640, 360, P3D); fill(204); } void draw() { lights(); background(0); // Change hei…

Processing の tutorials をシュシューっとやってみる

エントリ名の通りっす。以下urlの内容を流してみまっす。 http://processing.org/learning/gettingstarted/ インストールについて http://processing.org/download からダウンロードして適当なとこに解凍すればいいぽい。 スケッチする size(400, 400); back…

Processing の examples その2 (Basics-Arrays-Array2D)

コードはこんなの /** * Array 2D. * * Demonstrates the syntax for creating a two-dimensional (2D) array. * Values in a 2D array are accessed through two index values. * 2D arrays are useful for storing images. In this example, each dot * is…

Processing の examples その1 (Basics-Arrays-Array)

他の3DのExamplesがキツく感じたのでBasicsからを攻めることにしました。 コードはこんなの /** * Array. * * An array is a list of data. Each piece of data in an array * is identified by an index number representing its position in * the array. …