Git Product home page Git Product logo

nebular-automata's People

Contributors

8nhuman8 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nebular-automata's Issues

'ZeroDivisionError' random rare occurrence

ZeroDivisionError randomly and rarely occurs when executing renderer.py.

Traceback:

$ py src/renderer.py 500 500 -r -o -cn 5
1       [2021-03-14T21:47:19.040162]    0.00080 %       (1 / 125000)
2       [2021-03-14T21:47:19.040162]    0.00160 %       (2 / 125000)

Traceback (most recent call last):
  File "src/renderer.py", line 153, in <module>
    render_image(args)
  File "...\nebular-automata\src\utils.py", line 22, in wrapper
    return_value = func(*args, **kwargs)
  File "src/renderer.py", line 98, in render_image
    gradient = utils.gradient(nebula.current_generation, colors)
  File "...\nebular-automata\src\utils.py", line 56, in gradient
    grads.append(gradient2(gens // (len(colors) - 1), colors[i], colors[i + 1]))
  File "...\nebular-automata\src\utils.py", line 70, in gradient2
    d_r = abs(c1.r - c2.r) / gens
ZeroDivisionError: division by zero

GIF-files output

Make it possible to create GIF-files for visual viewing the development of the structure.
Maybe use matplotlib for it.

Use 'numpy' arrays

Use numpy arrays instead of Python default lists to increase the speed of the program.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.