Skip to content

Reaction Diffusion simulation with Sverchok SNLite node and C codes in Blender.

License

Notifications You must be signed in to change notification settings

asahidari/ReactionDiffusion_SNLite_b3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reaction Diffusion with Sverchok SNLite node in Blender

Description

This project includes some examples of Reaction Diffusion (RD) simulation with SNLite node in Blender Sverchok add-on.

This project includes:

  • Python script that simulates 2D RD with C code.
  • Python script that simulates 3D RD with C code.
  • Python script that simulates 3D RD "without" C code.
  • Python script that simulates RD on mesh with C code.
  • Python script that simulates RD on mesh "without" C code.

Python scripts "with C code" uses these C codes as C dynamic libraries. So you have to compile these C codes to generate C dynamic libraries in advance. Though you have to do so, these scripts runs very fast and achieves high performance.

Scripts "without C code" can run without C library. But the processing speed and performance are relatively low.

This project idea is originated from @zeffi's gist and nortikin/sverchok#1734 .

Usage

  • Compile C code and make C dynamic library.

    :: Windows
    cl.exe /D_USRDLL /D_WINDLL Basic_RD_xd.c /MT /link /DLL /OUT:libBasic_RD_xd.dll
    # macOS
    gcc -dynamiclib -o ./libBasic_RD_xd.dylib ./Basic_RD_xd.c
    # Linux
    gcc -c -fPIC Basic_RD_xd.c -o Basic_RD_xd.o
    gcc Basic_RD_xd.o -shared -o libBasic_RD_xd.so
  • Launch Blender and open Sverchok node editor.

  • Add Script Node Lite (SNLite) node.

  • Open Text editor in Blender.

  • Copy and paste one of the Python script to the text buffer.

  • Modify "load_library" arguments in the script to load your library (if you use "with C code" script).

  • Put the the text buffer name to the node and click the right button.

Image of Reaction Diffusion with SNLite

Requirements

  • Blender 2.8 (or later)
  • sverchok add-on 0.6 (or later)

Author

asahidari

Licence

GPL 3

About

Reaction Diffusion simulation with Sverchok SNLite node and C codes in Blender.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages