geomerative
index
 
Name createStar ( )
Examples
import processing.opengl.*;
import rgeom.*;
RPolygon p;
int i=2;

void setup(){
  size(300,300,OPENGL);
  smooth();
  stroke(255,0,0);
  fill(0);
  framerate(24);
  p = new RPolygon();
}

void draw(){
  background(255);
  translate(width/2,height/2);
  i++;
  rotateY(i*PI/30);
  //rotateX(i*PI/40);
  p = p.createStar(100f, 15f, i);
  p.draw(g);
}

Description Use this method to create a new starform polygon.
Syntax
createStar(x, y, radiusBig, radiusSmall, spikes);
createStar(radiusBig, radiusSmall, spikes);
Parameters
radiusBig   float, the outter radius of the star polygon
radiusSmall   float, the inner radius of the star polygon
spikes   int, the amount of spikes on the star polygon
Returns RPolygon, the starform polygon newly created
Usage Web & Application
Related