header

 

More links

Adobe Connect | Adobe Conect Custom Pods | AutoHotkey | Android | Arduino | Blog | COMM140Fractals | Grammar Checkers | Knots | a Million Dots |  Processing | RedBubble | Tutorials | Weather | World Time Meeting Planner |

Home > Tutorials > Processing > Processing Examples > Spiral 2

Spiral 2

Spiral 2 Spiral 2 Code

 

 

code formatter

processing code

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Spiral v2 
// Author Rupert Russell
// October 2, 2010 

void setup() {
  size(600, 600);
  noFill();
  smooth();
}

// Global Variables
float x = 0;
float y = 0;
float deg = 1;
float st = 1;
int count = 0;

void draw() {
  strokeWeight(st);
  translate(width/2, height/2);  // translate to center of screen
  rotate(deg);
 
  point(x, y);
  x = x + 0.1;
  y = y + 0.1;
  deg = deg + 1;
  st = st + 0.007;
  count ++;
 
  if (count > 2000) {noLoop();}
}
code formatter

APA citation:
Russell, R. (2016, July 05, 07:26 am). Scintillating grid.
     Retrieved October 19, 2017, from http://www.rupert.id.au/tutorials/processing/examples/scintillating.php

Last refreshed: October 19 2017. 07:12.11 am

rupert dot russell at acu dot edu dot au Support Wikipedia

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.


1076 visits since October 02, 2010