8000 GitHub - Castor-o7/strange_attractors: various models of strange attractors and dynamical systems written using my 3D_SDL code.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Castor-o7/strange_attractors

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strange_attractors

This is a program for simulation of 3D strange attractor models. It includes controls for manipulation of the attractors in 3D space via rotation, zooming, adjustment of camera depth, panning, and various color schemes.

It also includes functionality for saving videos and screenshots.

This program is run from the command line but aside from confirmation at the beginning of the program of user preference on exporting a video file or not, all controls are given to the program via the keyboard when interfacing with the program window.

The attractors currently supported with this software are:

  • Lorenz Attractor
  • Halvorsen Attractor
  • Dadras Attractor
  • Langford/Aizawa Attractor
  • Three-Scroll Unified System (it's a little buggy though)
  • Rabinovich-Fabrikant Attractor
  • Rossler Attractor
  • Sprott-Linz Attractor
  • Sprott B Attractor
  • Arneodo Attractor

Getting Started

Dependencies

SDL3 (https://wiki.libsdl.org/SDL3/FrontPage)

CMake (https://cmake.org/)

GNU Scientific Library (https://www.gnu.org/software/gsl/)

FFMPEG (https://ffmpeg.org/)

If you have homebrew, apt, or a similar package manager, these tools can all be installed using those.

This project has only been compiled and tested on Mac, but afaik SDL has pretty decent cross-compilation support. I'd be curious to hear if it works well or at all on other platforms.

Installing

Once the dependencies have been installed, navigate to the project directory in your terminal and run the command:

cmake -B build

followed by:

cmake --build build

This should generate an executable ("dynsys") in your build folder. Run the file by double clicking it, or from the command line with

./build/dynsys

If you should decide to record video, the video file will be saved as "anim.mp4" in a folder marked "anims" in the project directory folder.

Keyboard Controls

This program uses keyboard controls to change the attractor being displayed.

  • W / S: Change X rotation
  • A / D: Change Y rotation
  • Z / X: Change Z rotation
  • Q / E: Change overall rotation (rotation scale multiplier)
  • Up / Down: Change depth of field
  • Left / Right: Change image scale
  • Space: Stop rotation
  • I / K / J / L: Pan image
  • O / P: Change color scheme
  • < / >: Change current attractor being displayed
  • C: Take a screenshot (saves to screenshots folder in project directory)
  • The number keys (1-0) can also be used to switch to any of the 10 different attractors more quickly if desired.

Screenshots and Examples

Here are some screenshots of various dynamic systems generated using this program utilizing different color schemes.

frame_000756

frame_001237

frame_001598

frame_001609

frame_001707

Author

All code and testing for this project not mentioned as part of the dependencies was written by Tristan Miller.

Please credit me if you refer to it somewhere.

About

various models of strange attractors and dynamical systems written using my 3D_SDL code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.7%
  • CMake 2.3%
0