Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Explosion

$
0
0

Hello everyone; I have created a sphere in 3d and shake it randomly. now I would like to make it explode but I couldn't find out how. Can you help me please?

float x, y; void setup () { size (700, 700, P3D); //Im working in 3D so i added P3D smooth (); cam = new PeasyCam(this, 700); x=10; y=10; } void draw () { background (0); lights();

pushMatrix(); translate(x, y); noStroke(); fill(255); sphere(40); popMatrix();

x += random(-5, 5); y += random(-5, 5); }


Viewing all articles
Browse latest Browse all 2896

Trending Articles