import processing.core.*; import java.applet.*; import java.awt.*; import java.awt.image.*; import java.awt.event.*; import java.io.*; import java.net.*; import java.text.*; import java.util.*; import java.util.zip.*; import java.util.regex.*; public class SimpleCurves extends PApplet { /** * Simple Curves. * * Simple curves are drawn with simple equations. * By using numbers with values between 0 and 1 in * the equations, a series of elegant curves * are created. The numbers are then scaled to fill the screen. */ public void setup() { size(200, 200); colorMode(RGB, 100); background(0); noFill(); noLoop(); } public void draw() { stroke(40); beginShape(); for(int i=0; i 1) { sa = 1; } return 1-sa; } public float squared(float sa) { sa = sa*sa; return sa; } static public void main(String args[]) { PApplet.main(new String[] { "SimpleCurves" }); } }