header

 

More links

AutoHotkey | Android | Arduino | COMM140Fractals | Grammar Checkers | Knots | A Million Dots Activity |  Processing | Processing for Scratch Users | Redbubble | Tutorials | Weather | World Time Meeting Planner | Favicon Generator.

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 November 22, 2024, from http://www.rupert.id.au/tutorials/processing/examples/scintillating.php

Last refreshed: November 22 2024. 10:21.38 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.


713 visits since October 02, 2010