/* Flower4 based on Flower 2 Draws a flower with double petals, form of each circle set is to be specified. rotOffset defines the offset for the second set of petals. One can draw second set in between first petals - apply e.g. rotOffset = PI/nofPetals[0] after first round is drawn. Form of petal may be ellipse or stroke or special from given in specialPetal(). Each petal is drawn by drawPetal(i) where i=0 or 1 indicates petal of which set is to be drawn The form is given by form[i] parameter being -1 = nothing (to allow single circle) 0=stroke, 1=ellipse, 2 and 3=stroke with color transition 4 and 5=ellipse with color transition, 6 = special1 symmetrical, 7=special1 assymetrical; 8=special2 symmetrical, 9=special2 assymetrical; 10 and 11 = special 6 and 7 with color transition center-out 12 and 13 = special 8 and 9 with color transition center-out Experiment with colors, gradients and sizes, nofPetals. Save the output to fileName file - this file needs to be re-named each time, otherwise gets overwritten. Save file cannot be done from applet - thus this action is to be commented out when exporting to applet. Zs. Ruttkay 2.2.2009 using Processing 1.0.1 */ int[] form = { // 1, 0} ; // form of petals // 1, 1}; 13, -1}; String fileName = "Flower4_13_-1_c5_c2.jpg"; int[] nofPetals = { 5, 12}; // 10, 60}; // nof petals of the flower in 2 circles // 60, 60}; // 36,6}; // 13, 80}; float[] rotangle = { 2*PI/nofPetals[0], 2*PI/nofPetals[1]}; // rotation angle for each set float rotOffset = PI/nofPetals[0]; // float rotOffset = 0; // if you want to draw the two kinds of petals starting at the same rotation int[] rx = { 30, 14}; // radius ellipse x dir for each set // 20, 50}; int[] ry = { // 20, 1}; // radius ellipse yx dir for each set 32, 12}; // 20, 0}; // 5, 1}; int[] rf = { // 30, 20}; // distance of petal center, should not be bigger than 1.5 rx, You may experiment with rf