/*
* Copyright (c) 2010 Karsten Schmidt
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* http://creativecommons.org/licenses/LGPL/2.1/
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
var Vec2D = toxi.geom.Vec2D;
int NUM_CUTOUTS=18;
int NUM_ARCSEG=8;
int RADIUS=200;
float INSET=RADIUS-15;
float MATERIAL_THICKNESS=5;
float TOLERANCE=0.05;
float SIZE=MATERIAL_THICKNESS+TOLERANCE;
int BLEED=80;
void setup() {
size(2*RADIUS+BLEED,2*RADIUS+BLEED);
background(255);
translate(width/2,height/2);
noFill();
beginShape();
for(int i=0; i<NUM_CUTOUTS; i++) {
float alpha=i*TWO_PI/NUM_CUTOUTS;
float beta=(i+1)*TWO_PI/NUM_CUTOUTS;