Tags:
  1. Mick West

    Mick West Administrator Staff Member

  2. Mick West

    Mick West Administrator Staff Member

    It's a fun little toy. One interesting thing was when using gasGravity, and the settings shown, then the blob of molecules would rotate, almost seeming to form spiral arms at one point.


    upload_2018-11-1_18-24-11.
     
  3. Mick West

    Mick West Administrator Staff Member

    On my Mac it works best on Safari, then on Firefox, and is slowest (by far) on Chrome.
     
  4. Mauro

    Mauro New Member

    A great fun little toy :) Which language did you use to write it?
     
  5. Mick West

    Mick West Administrator Staff Member

    Javascript, which isn't optimal of course, but is easiest to share. And it does 20,000 particles at 60 fps in Safari on my Mac, which is quite astounding.

    Just added a "Pause" button, which lets you set things up better
     
  6. Dan Ly

    Dan Ly New Member

    Nice simulation Mick! I gave a quick glance at your code to see what you did. From what I understand you created a grid and calculated collisions/ gravity between particles found only in the same partition is that correct? I have created my own N-body code but it's a direct particle-particle method which is accurate but slow for a large number of particles (I use it to simulation the solar system). I'd like to try something on this scale sometime using a space partitioning method like this.
     
  7. Mick West

    Mick West Administrator Staff Member

    Only for the collisions, and it checks for collisions in the same partition (cell) and in the up, down, left, and right cells. It does not check diagonal cells, so occasionally misses a few (leading to temporary overlaps). It also only does a simple radius overlap check for collisions, so will also miss quite a few at higher speeds (not leading to overlaps). However that's acceptable for simulating gasses, as the individual collision are not each important, just that you get a bunch of them.

    For gravity it does the full N*N calculations, which is why it's slow with lots of particles. The math is simpler though.

    Hah, just spotted a bug:
    Code:
    if (d2>0) {
    	var d = Math.sqrt(d2);
    	dx /= d;
    	dy /= d;
    	var a = g / d2;
    	p.vx += dx * g;
    	p.vy += dy * g;
    }
    
    I thought the gas gravity was a bit boring, fix to come.
     
  8. Mick West

    Mick West Administrator Staff Member

    Gas gravity patched.
    https://www.metabunk.org/gas/

    Now forms local clusters as you expect, so you can kind of use it to simulate galaxy formation! :)
    Metabunk 2018-11-02 11-08-46.
     
  9. Mick West

    Mick West Administrator Staff Member

    It occurs to me that (with much additional work) I can use this to demonstrate various aspects of 9/11. Two in particular:

    Firstly: "squibs", where overpressure from the falling internal structure has blasted debris out of individual window openings. This is quite understandable in the normal model, but in the 9/11 Controlled Demolition model it is used as evidence of explosives. (The word "squib" does not mean anything like this, and has taken on an entirely new meaning in 9/11 culture)
    [​IMG]

    Secondly: "multi-ton sections ejected laterally up to 600 feet". Discussed in this thread: https://www.metabunk.org/debunked-wtc-multi-ton-steel-sections-ejected-laterally.t1739/


    Both of which can be simulated with the addition of some rigid-body physics.