public class Atom { String name; float atom_x = 0; float atom_y = 0; float atom_speed = .05; int atom_direction = 1; int a = 0; Atom (String n){ name = n; } float singraph2(float ba) { ba = (ba - 0.5) * 1; //scale from -1 to 1 ba = sin(ba*PI)/2 + 0.5; return ba; } void renderAtom(int f, char l) { pushMatrix(); translate(atom_x, atom_y); fill(f); text(l, 0, 0); popMatrix(); } void spinAtom() { a += (PI/2); rotateY(a); } }