<!--
###########################################################################################
This is a JSFiddle example of "Cacatoo". This HTML page does not contain the code itself,
but determines where the grids, graphs, buttons, etc are placed. The real code is in the
Javascript Tab. I recommend enabling "Tabs (Columns)" under the settings in the top-right.
###########################################################################################
-->
<html>
<script src="https://bramvandijk88.github.io/cacatoo/scripts/cacatoo.js"></script>
<script src="https://bramvandijk88.github.io/cacatoo/scripts/all.js"></script>
<head>
<title>Cacatoo examples</title>
</head>
<script>
/*-------------------------End user-defined code ---------------------*/
</script>
<body onload="cacatoo()">
<div class="", id="all_holder">
<div class="content" id="canvas_holder"> </div>
<div class="content" id="graph_holder"> </div>
<div class="content" id="form_holder"></div>
</div>
</body>
</html>
/*-----------------------Start user-defined code ---------------------*/
let sim;
var d_inh = 5
var d_act = 0.9
var act = 4
var inh = 1
function cacatoo() {
let config = {
title: "Activatie en inhibitie met diffusie",
description: "",
maxtime: 100000,
ncol: 330,
nrow: 330, // dimensions of the grid to build
wrap: [true, true], // Wrap boundary [COLS, ROWS]
scale: 1, // scale of the grid (nxn pixels per grid cell
show_gridname: true,
graph_interval: 1,
graph_update: 5
}
sim = new Simulation(config)
sim.makeGridmodel("turing")
// Initialise the left 3 cols with predators and prey by setting the state via the named ODE 'lotka'
sim.reset = function(){
for (let i = 0; i < sim.turing.nc; i++)
for (let j = 0; j < sim.turing.nr; j++)
{
sim.turing.grid[i][j].A = sim.rng.genrand_real1()
sim.turing.grid[i][j].I = 0
}
}
// sim.initialSpot(sim.turing, "A", 10, 3, sim.ncol/2, sim.nrow/2)
sim.reset()
sim.createDisplay_continuous({model:"turing", property:"A", label:"Activator concentratie", // Createa a display for a continuous variable (ODE state for external resources)
minval:0, maxval:1.0, fill:"viridis", decimals:2, nticks:1})
sim.createDisplay_continuous({model:"turing", property:"I", label:"Inhibitor concentratie", // Createa a display for a continuous variable (ODE state for external resources)
minval:0, maxval:1.0, fill:"inferno", decimals:2, nticks:1})
// The nextState function has 3 steps: 1) ODE integration, 2) Diffusion, 3) Update what is displayed on the grid
sim.turing.statecolours.A["0"] =sim.turing.statecolours.A["1"]
sim.turing.kernelA =...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.