README.org

July 2, 2023 ยท View on GitHub

  • emergence

[[/pub/demo.png]]

** About

Emergence is a visualiser and processor of a primordial particle system. The project is based on the article, "How a life-like system emerges from a simple particle motion law", by Schmickl et al.: https://www.nature.com/articles/srep37969.

Demo: https://youtu.be/aowMzix8mYg

** Build & Run

*** Dependencies

  • clang++ 12
  • cmake 3.25
  • glew 2.2
  • glfw 3.3
  • glm 0.9.9

/These versions only indicate what was used in the latest build./

ldd ./emergence:

#+BEGIN_SRC linux-vdso.so.1 /usr/lib/libGLEW.so.2.2 /usr/lib/libglfw.so.3 /usr/lib/libOpenGL.so.0 /usr/lib/libOpenCL.so.1 /usr/lib/libstdc++.so.6 /usr/lib/libm.so.6 /usr/lib/libgcc_s.so.1 /usr/lib/libc.so.6 /usr/lib/libGL.so.1 /usr/lib/libdl.so.2 /usr/lib/libX11.so.6 /usr/lib/libpthread.so.0 /usr/lib/libGLdispatch.so.0 /usr/lib64/ld-linux-x86-64.so.2 /usr/lib/libGLX.so.0 /usr/lib/libxcb.so.1 /usr/lib/libXau.so.6 /usr/lib/libXdmcp.so.6 #+END_SRC

**** Bundled with this repository (in =external/=)

  • catch2
  • fonts (Liberation Mono)
  • glmConfig.cmake (at least one linux distribution lacks this file)
  • imgui
  • stb

**** Optional

*** Linux

  • If OpenCL is desired on Intel graphics, install NEO ::

  • Refer to https://github.com/intel/compute-runtime.

  • If possible, install the necessary packages via your distribution's package manager.

  • Otherwise:

    1. Download the =deb= assets from their [[https://github.com/intel/compute-runtime/releases][releases page]].
    2. Extract the libraries from the =deb= files, and place them under, say, =/usr/local=.
    3. Make sure =ld.so.conf= recognises the directory holding the new libraries, for instance =/usr/local/lib=.
    4. =sudo ldconfig=, substituting renamed copies of library files with symlinks if =ldconfig= complains.
    5. Make sure the path to the new OpenCL driver (eg. =/usr/local/lib/intel-opencl/libigdrcl.so=) is recognised under =/etc/OpenCL/vendors=.
    6. Check that your device is recognised and ready, using a program like =clinfo=.
  • Build ::

  1. Retrieve this repository from https://github.com/blobject/emergence.
  2. cd emergence
  3. Optionally configure =CL= (default =on=) in CMakeLists.txt.
  4. rm -R build; mkdir build; cd build
  5. cmake ..
  6. make

Note: If any OpenCL component was (un)installed after an invocation of =cmake=, make sure to remove =build/= and do a fresh =cmake= again.

  • Run ::
  1. cd emergence/build
  2. ./emergence (append =-h= for usage help)
  • On Intel graphics, turn vsync off to get better performance: vblank_mode=0 ./emergence

  • Test ::

  1. cd emergence/build
  2. ./testemergence