void drawHelp() { pushStyle(); fill(200,200,200,255); textAlign(LEFT); rectMode(CORNER); rect(20, 30, w*0.55, w*0.90); fill(255,0,0); textSize(18); textAlign(CENTER); text("CONTEXT", w*0.55/2,50); textSize(w/25); textAlign(LEFT); fill(0); String infos = ""; infos += " PARAMETERS \n"; infos += " cells : "+str(S)+"\n"; infos += " particles: "+str(Np)+"\n"; infos += " viscosity: "+str(visc)+"\n"; infos += " diffusion: "+str(diff)+"\n"; infos += " dt step : "+str(dt)+"\n"; infos += " CONTROLS \n"; infos += " Left-MB to add forces \n Right-MB to add density \n"; infos += " s: add a source \n"; infos += " v: show/hide velocity field \n"; infos += " d: show/hide density field \n"; infos += " g: show/hide grid \n"; infos += " p: show/hide particles \n"; infos += " q: add solid cell \n"; infos += " r: restore all \n"; infos += " h: show/hide context \n"; text(infos, 30,80); popStyle(); } ////////////////////////////////////////////////////////////////////////////////////////// void drawSolid(float h, boolean[] fluid) { pushStyle(); for (int k=0; k