@@ -0,0 +1,1330 @@
+package com.haxademic.demo.draw.shapes;%0A%0Aimport java.util.ArrayList;%0A%0Aimport com.haxademic.core.app.P;%0Aimport com.haxademic.core.app.PAppletHax;%0Aimport com.haxademic.core.draw.context.PG;%0A%0Aimport processing.core.PVector;%0A%0Apublic class Demo_LorenzAttractor%0Aextends PAppletHax %7B%0A%09public static void main(String args%5B%5D) %7B arguments = args; PAppletHax.main(Thread.currentThread().getStackTrace()%5B1%5D.getClassName()); %7D%0A%0A%09protected float a=10;%0A%09protected float b=28;%0A%09protected float c=8.0f/3.0f;%0A%0A%09protected float x=0.01f;%0A%09protected float y=0;%0A%09protected float z=0;%0A%09%0A%09protected ArrayList %3CPVector%3E points;%0A%0A%09public void firstFrame()%09%7B%0A%09%09points = new ArrayList%3CPVector%3E();%0A%09%09p.colorMode(P.HSB);%0A%09%7D%0A%0A%09protected void drawApp() %7B%0A%09%09PG.setBetterLights(p);%0A%09%09background(0);%0A%09%09PG.setCenterScreen(p);%0A%09%09PG.basicCameraFromMouse(p.g);%0A%0A%09%09// draw word%0A%09%09float h = 0;%0A%09%09float dt = 0.01f;%0A%09%09%0A%09%09for (int i = 0; i %3C 10; i++) %7B%0A%09%09%09float dx = (a*(y-x))*dt;%0A%09%09%09float dy = (x*(b-z)-y)*dt;%0A%09%09%09float dz = (x*y-c*z)*dt;%0A%09%09%09x = x + dx;%0A%09%09%09y = y + dy;%0A%09%09%09z = z + dz;%0A%09%09%09points.add(new PVector(x,y,z));%0A%09%09%7D%0A%0A%09%09noFill();%0A%09%09stroke(255);%0A%09%09float shapeScale = 20f;%0A%09%09beginShape();%0A%09%09for(PVector v : points) %7B%0A%09%09%09stroke(h,200,255);%0A%09%09%09vertex(v.x * shapeScale, v.y * shapeScale, v.z * shapeScale);%0A%09%09%09h += 0.5;%0A%09%09%09if(h%3E255) %7B%0A%09%09%09%09h=0;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09endShape();%0A%09%7D%0A%0A%7D%0A

Add Lorenz attractor demo