Fix degenerate normals

This commit is contained in:
unknown 2023-07-20 10:46:01 -04:00
parent 5cbb1a0ee0
commit 426dd88d29
3 changed files with 1095 additions and 4 deletions

View File

@ -79,7 +79,7 @@ public class FluidSim {
for(int k = 0; k < DIM; k++){ for(int k = 0; k < DIM; k++){
if( if(
Math.abs(16 - i) < 4 && Math.abs(16 - i) < 4 &&
Math.abs(8 - j) < 4 && Math.abs(j) < 4 &&
Math.abs(10 - k) < 4 Math.abs(10 - k) < 4
){ ){
xf.put(1); xf.put(1);

View File

@ -32,7 +32,7 @@ public class Main {
lastTime = System.currentTimeMillis(); lastTime = System.currentTimeMillis();
sim.simulate(i,0.001f); sim.simulate(i,0.001f);
time = time + (System.currentTimeMillis() - lastTime); time = time + (System.currentTimeMillis() - lastTime);
Mesh.remesh(sim); Mesh.remesh(sim,i);
GLFWContext.redraw(); GLFWContext.redraw();
i++; i++;
if(i == 1000){ if(i == 1000){

File diff suppressed because it is too large Load Diff