Export to GitHub

sunflow4p5 - GettingStarted1.wiki


After you have downloaded the library and imported in to Processing, you may be wondering how you could use it.

size() method

You have to specify what renderer you want to use in sour sketch. Basically you use P2D, P3D, JAVA2D or OPENGL. When you want to use Sunflow, you need to specify an other value: size(400, 400, "hu.spidron.sunflow.NextSunflowGraphics");

Source: http://processing.org/reference/size_.html

Example code

``` void setup() { size(400, 400, "hu.spidron.sunflow.NextSunflowGraphics"); }

void draw() { background(255); translate(width/2, height/2);

colorMode(HSB, TWO_PI);

rotateX(-1); rotateZ(-1); for(float f=0; f

```

The code above should result the following image.

http://sunflow4p5.googlecode.com/files/wiki-gettingStarted1b.png