Using a new updatable chart format. Update functions are made accessible to the caller, handing over chart controls with full functionality to the caller in a modular manner. Data binding is done with method chaining, like any other configuration variable, and can be changed after initialization. This allows for changes to be rendered in the context of chart history, leveraging D3's transitions and update logic.
license: gpl-3.0 |
xxxxxxxxx.xxxxxx.xxxxxxxxxxxxx.xxxxxx.xxxxxx.xxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxx.xxxxxxxx.xxxxxxxxxx... | |
xxxxxxxxxx.xxxxxx...xxxxxxxx..xxxxxxxx.xxxx.x.xxxxxxxxxxxx.xxxx.xxxxxxxxxxxxxx.xxxxx....xxxxxxxx.xxx | |
.xxxxxxx..xxxxxxxxx..xxxxxx.x.xxxxxxx.xx.xx.xxxxxxxxxxxx..xxxxxx.xxxxxxx.x....xxxxxxx.x...xxxxx.x.xx | |
xxxxxxxxx.xxxxxxx..xx.xxxxxxxx.x.xxx.xx.x..x.xxxxxxxxxxx.xxxxxxx..x.xxx.x.xxx.xxxxxxxxxx.x.xxx.xxxxx | |
xxxxxxxx.xxxxxxxx..xxx.x..xx..x.x.x.x.x.xxxxx.xxxxxxxx...xxxxxx.xx.x.x.xxx.xxx.xxxxx.x..xxx.x.xxxxxx | |
x..x.xxxx....xxxx.x...x.....xxxxxx.xxx.xxxxx..xxxx..x.xxx.xx.x.xxxxxx.xxxxxxxxx.xxxxxx.xxxxx...xxxx. | |
....xxxx..xxx.xx.xx.xxxxx.xxxxxxxxx.x.x.xxxxxx..x..x.xxxx.xxx.xxxxxxxx.xxxxxxx.x.x.xxx..xxxxx.x.x.xx | |
x.xx......xxxx..xx.xxxxx.xxxxxxxx....xxxxxxxxxx..xxxx.xxxx.x..xx.xxxxx.xxxxxx.xxx.x.x.xx.xxx..xx..x. | |
x..xxxxx..xxxx.xxxx.xxxxx.xxxx.x.x.xx.xxxxxxxxxx.xxxxxxx..x.xx..xxxxxx.xxxxxx.xx.xxx.xxx.x..xxxxxx.x | |
.xxxxxx..x.xxxx.xx.xxx..x.xxxxx.xxx.xxxxxxxxxxxx.x.xxxxxxxxx.xx..xxxx..xxxx..xxxxxx.xxxxx.x..xx.xxxx |
Real-time orthographic projection of the Dequan Li attractor.
The attractor shape can be explored while the attractor is live-rendered by selecting different sets of angles to rotate the scene along the X and Z axes. Initials values of x,y,z (initial data point) can be chosen as well.
The rendering of the attractor is done by canvas, while the axis are rendered by svg.
Visualization of other attractors:
- Lorenz attractor
- Rossler attractor (svg version, canvas version)
import numpy as np | |
def peakdetect(y_axis, x_axis = None, lookahead = 500, delta = 0): | |
""" | |
Converted from/based on a MATLAB script at http://billauer.co.il/peakdet.html | |
Algorithm for detecting local maximas and minmias in a signal. | |
Discovers peaks by searching for values which are surrounded by lower | |
or larger values for maximas and minimas respectively | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
license: mit |
license: gpl-3.0 |
license: gpl-3.0 |
This simple SIR model simulates a zombie outbreak in France, inspired by the scenario described in When zombies attack!: Mathematical modeling of an outbreak of zombie infection.
Here the model is extended spatially to allow neighboring grid cells to interact with one another (each cell can interact with its 8 adjacent cells) so infection can spread from cell to cell, and the global zombie outbreak can be visually appreciated (who doesn't want to see a nice zombie wave!).
The patient zero (there must be one ...) is placed somewhere between Lyon and Nimes. You can also add more foci infection by clicking on the map.
The two line charts on the right show the current state of the population for each iteration of the model: