hey, im new to processing and was just wondering if any one could explain a few things to me:
1. what does adding a minus sign to your code mean e.g
"if ( y > height - img.height/2 ) { y = height - img.height/2; }"
what are the - for in this code
"void up() {
y -= speed;"
and this code
2. could anyone explain to me what this code is doing breifly
(mainly the code highlighted with a * )
public class field
private Start start[];
private int count;
public Start( int count )
this.count = count;*
start = new Start[count];
for ( int b =0; b < count; b++) *
start[b] = new Start( random( width ), random( height ), random( 10 ));*
public void draw()
strokeWeight( 2 );
or ( int b =0; b < count; b++) *
stroke( start[b].z * 25 );*
point( start[b].x, start[i].y );*
start[b].x -= start[b].z;*
if (start[b].x < 0) *
start[b] = new Start( width, random( height ), start(random( 100 )));
class Start
float x, y, z;
Start( float x, float y, float z )
this.x = x;
this.y = y;
this.z = z;
3. and finally whats the differece between private and public ?
Many thanks in advance, if you can only answer one question please still post and anything at this stage would be helpful.