A micro fluid simulation inspired by endoh1.c and its TS port endoh1-ts
Golfed by xem, p01, Aemkei, Irratix, RReverser
Input:
## _=a=[];fo r(C o f O.v ## ## alue)_++, C>' ' &&a.p ush({ ## ## x:_%6 4,y:_ >>6,C ,w:'$ ## ## '>C,u :0,v: 0});M ## ## =o=>a.map( p=>{p .t=.1 ;p.s= 0;o|| (p.D=p.w) ## ## ;a.map(q=> (g=Ma th.hy pot(e =p.x- q.x,f=p.y-q ## ## .y)/2 -1)<0 ?o?(g /=p.D ,p.t+ =(f*(z=3-p.D ## ## -q.D) +p.v- q.v)* g,p.s +=(e* z+p.u -q.u) ## ## *g):p .D+=g *g:1) });se tInte rval` M(c.w ## ## idth^ =M()) ;for( p of a)wit h(p)c .getC ## ## ontex t('2d ').fillText( C,3*x ,5*y),w||(y+ ## ## =v+=t /4,x+= u+=s/2)`//th is is just a test. ## ## // hi, world.. codegolf... team.. // 01-2022. ## ## ## ## ## ## ## ## ## ## ## ##( ,( ,( ,( ,( ,( ,( ,( ,( ,( ,( ,( ## ## `-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `-'## ## ## ############################################################### ###############################################################