I work with another script but, yeah this lines works perfectly:) Thank you.
But now I have another issue to ask.
I know amnon5 said that there is possibility to render faster somehow.
Is it possible to change my main script tab to render images faster.
The script is below:
- import toxi.physics.behaviors.*;
import toxi.physics.*;
import toxi.geom.*;
import toxi.math.*;
import java.awt.Frame;
import java.awt.BorderLayout;
//import controlP5.*;
import peasy.*;
import sunflowapiapi.P5SunflowAPIAPI;
VerletPhysics physics;
Cluster cluster;
//private ControlP5 cp5;
//ControlFrame cf;
PeasyCam cam;
int def;
int abc;
P5SunflowAPIAPI sunflow ;
int sceneWidth = 600;
int sceneHeight = 600;
void setup() {
size(sceneWidth, sceneHeight, "sunflowapiapi.P5SunflowAPIAPI");
smooth();
//INITIALIZE CAMERA
cam = new PeasyCam(this, 300, 300, -60, 400);
//INITIALIZE CONTROLP5
// cp5 = new ControlP5(this);
// cf = addControlFrame("extra", 200, 200);
//INITIALIZE PHYSICS
physics=new VerletPhysics();
physics.setDrag(0.05);
physics.setWorldBounds(new AABB(new Vec3D(300, 300, 600), new Vec3D(300, 300, 600)));
//INITIALIZE CLUSTER
cluster = new Cluster(10, 0.01, 30);
sunflow = (P5SunflowAPIAPI) g;
}
void draw() {
translate(300,300);
rotateX(-.5);
rotateY(-.5);
//UPDATE PHYSICS
background(255);
physics.update();
cluster.display();
cluster.showConnections();
translate(300, 300, 300);
if (frameCount%2==0) {
sunflow.setPathTracingGIEngine(32);
sunflow.setWidth(1200); sunflow.setHeight(1200);
sunflow.render(false, sketchPath + "/"+frameCount+".png");
}
}