import static util.Generic3DUtil.*;

public class Lissajous3D {
    private static final int n = 128;
    public static void main(String[] args) {
        start();
        stroke(0x0000ff);
        scale(72, 72, 72);
        beginShape();
        for (int t = 0; t < n; t++) {
            double theta = 2*PI*t/n;
            double x = Math.cos(7*theta);
            double y = Math.cos(3*theta+PI/3);
            double z = Math.cos(5*theta+PI/2);
                        
            vertex(x, y, z);
        }
        endShape(true);
        finish();
    }
}
