int points; float sigma,r,b, bound,step,roff; float[][] uni; color[] colors; float friction=0.99F; float centerx,centery,mx,my,dx,dy,maxwrot,maxhrot,rotx,roty; void mouseDragged() { dx=(mouseX-float(pmouseX))*maxwrot; dy=(mouseY-float(pmouseY))*maxhrot; } void updateSpace() { translate(centerx,centery); if(!mousePressed) { rotx+=mx; roty+=my; mx*=friction; my*=friction; } else { rotx+=dx; roty+=dy; mx=dx; my=dy; dx=dy=0; } rotateX(-roty); rotateY(rotx-roff); } void setup() { size(400,400, P3D); sigma=10; //10 r=28; //28 b=(8/3); //8/3 points=2000; bound=50; step=0.003; uni=new float[points][3]; colors=new color[points]; colorMode(HSB); float maxd=sqrt(3*bound*bound); for(int i=0;i