Skip to content

Instantly share code, notes, and snippets.

@vassvik
vassvik / Simulation_Projection.md
Last active July 11, 2024 10:55
Realtime Fluid Simulation: Projection

Realtime Fluid Simulation: Projection

The core of most real-time fluid simulators, like the one in EmberGen, are based on the "Stable Fluids" algorithm by Jos Stam, which to my knowledge was first presented at SIGGRAPH '99. This is a post about one part of this algorithm that's often underestimated: Projection

MG4_F32.mp4

Stable Fluids

The Stable Fluids algorithm solves a subset of the famous "Navier Stokes equations", which describe how fluids interact and move. In particular, it typically solves what's called the "incompressible Euler equations", where viscous forces are often ignored.

@sinbad
sinbad / Steve's Rider For Unreal Code Theme.icls
Last active October 27, 2021 01:05
Rider for Unreal Code Colours
<scheme name="Steve's Custom Monokai Pro" version="142" parent_scheme="Darcula">
<metaInfo>
<property name="created">2021-06-01T12:01:43</property>
<property name="ide">Rider</property>
<property name="ideVersion">2021.1.2.0.0</property>
<property name="modified">2021-06-01T12:02:09</property>
<property name="originalScheme">Steve's Custom Monokai Pro</property>
</metaInfo>
<colors>
<option name="ADDED_LINES_COLOR" value="a9dc76" />
// lib /def:user32.def
// cl /O2 test.cpp /link user32.lib
#include <Windows.h>
#include <stdio.h>
struct PrecisionTouchPadConfig {
BYTE LegacyParams[3];
BOOL LoadedSettings;
// 0: No delay (always on)
@insofaras
insofaras / Quote List
Last active August 4, 2021 03:51
IRC quotes
*************************************************************
* Important Note *
*************************************************************
* This gist is no longer being updated with new quotes. *
* Please use https://dev.abaines.me.uk/quotes/ instead. *
*************************************************************
Here are the quotes stored by insobot, in csv format, one file per channel. Times are UTC.
@altrive
altrive / Microsoft.PowerShellISE_profile.ps1
Last active February 7, 2023 07:11
Sample code to defer PowerShell modules loading.
#Register OnIdle event to load PS moduless.
Register-EngineEvent -SourceIdentifier ([Management.Automation.PsEngineEvent]::OnIdle) -MaxTriggerCount 1 -Action {
Import-Module TabExpansion++
#Import-Module FunctionExplorer
Import-Module VariableExplorer
Import-Module PSCodeAnalyzer.ISEAddin
Import-Module Altrive.ISEExtensions
#Remove current Job (No Need to get job result)
$EventSubscriber.Action | Remove-Job -Force -ErrorAction Ignore
@CADbloke
CADbloke / VisualStudioSolutionSLNstyler.xml
Last active December 2, 2023 12:33
Notepad++ Syntax Highlighting for visual Studio .sln Solution files. Exported from NP++ 6.3.2To use, save this gist as an XML file, NP++ Language menu ==> Define your Language ==> click Import in the window that just popped up...then change the colo(u)rs in the pop-up window dialogues to something that offends you less.
<NotepadPlus>
<UserLang name="SLN" ext="sln" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">03 04 00# 01 02</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>