Home > Tutorials > Processing > Processing Examples > Radiation

#### processing code

```// Warning RadiationcSign
// I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
// In some countries this may not be legally possible; if so:
// I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
// by Rupert Russell
// http://www.rupert.id.au/tutorials/processing/examples.php
// Draws a Radiation warning sign based on the template at:
// https://www.osha.gov/OshStd_gif/10ZFZ_10.gif
// A local copy of this template is held on my website at: http://www.rupert.id.au/tutorials/processing/examples/radiation/images/10ZFZ_10.gif
// May 30 2014 v001

// The dimentions of this drawing are all based on the radius of the inner circle "A"

int A = 80;  // radius of inner circle defines the size of the sign and canvas

int screenWidth = 6 * A;
int screenHeight = 6 * A;

color bgColor = color(255,255,255);
PFont font;

void setup() {
size(screenWidth,screenHeight);
ellipseMode(CENTER);
fill(255,0,255);  // Fill with Magenta
smooth();
noLoop();
}

void draw() {
background(255,255,0);

// Define Variables for arcs
fill(255,0,255);  // Fill with Magenta
float a = screenWidth /2; // Center arc in canvas
float b = screenWidth /2; // Center arc in canvas
float c = 5 * A;
float d = 5 * A;
float start;
float stop;

// Draw arc 1
arc(a, b, c, d, start, stop, PIE );

// Draw arc 2
arc(a, b, c, d, start, stop, PIE );

// Draw arc 3
arc(a, b, c, d, start, stop, PIE );

// Draw outer cirlce
fill(255,255,0);  // Fill with yellow
noStroke();
ellipseMode(CENTER);  // Set ellipseMode to RADIUS
ellipse(screenWidth /2, screenHeight /2, A + A/2, A + A/2);

// Draw inner cirlce
stroke(0);
fill(255,0,255);  // Fill with Magenta
ellipseMode(CENTER);  // Set ellipseMode to RADIUS
ellipse(screenWidth /2, screenHeight /2, A, A);

// Draw the inner outline of the 3 arcs
noFill();
stroke(0);
c = A + A/2;
d = A + A/2;

// Draw arc 1
arc(a, b, c, d, start, stop);

// Draw arc 2
arc(a, b, c, d, start, stop );

// Draw arc 3
arc(a, b, c, d, start, stop);

}```

http://www.onformative.com/codeformatter/

APA citation:
Russell, R. (2016, July 05, 07:26 am). Radiation.
Retrieved September 24, 2018, from http://www.rupert.id.au/tutorials/processing/examples/radiation/index.php

Last refreshed: September 24 2018. 05:01.28 am