Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 1.21 KB

README.md

File metadata and controls

9 lines (7 loc) · 1.21 KB

ReactionLabClassic

Shows how to implement a reaction-diffusion simulation by using WPF and the WriteableBitmap class.

For details, see Using WriteableBitmap to Display a Procedural Texture.

Notes

  • The ReactionDiffusionControl is a XAML control that uses WriteableBitmap to render a dynamic texture. In a real-world app, you should probably prefer writing an HLSL shader, which runs on the GPU and is immensely faster.
  • The off-thread work is performed by a BackgroundWorker instance. Although this works fine, it's an archaic way to do asynchronous operations. Nowadays, you should prefer using the async and await keywords. See Asynchronous programming (Windows Runtime apps) for details.