Giter Site home page Giter Site logo

fagan2888 / density-driven Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rougier/density-driven

0.0 1.0 0.0 19.53 MB

Code for "A density-driven method for the placement of biological cells over two-dimensional manifolds"

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

density-driven's Introduction

A density-driven method for the placement of biological cells over two-dimensional manifolds
Copyright 2017 Nicolas P. Rougier, BSD License.

We introduce a graphical method originating from the computer graphics domain that is used for the arbitrary placement of cells over a two-dimensional manifold. Using a bitmap image whose luminance provides cell density, this method guarantees a discrete distribution of cell position re- specting the local density. is method scales to any number of cells, allows to specify arbitrary shapes and provides a scalable and versatile alternative to the more classical assumption of a non- uniform spatial distribution. e method is illustrated on a discrete homogeneous neural eld, on the distribution of cones and rods in the retina and on the neural density on a a ened piece of cortex.

Figure 1

Please go to https://github.com/ReScience-Archives/Rougier-2017

Figure 2

Before running figure-2.py, you'll need to run the stippler.py script on the gradient-1024x256.png image as follows:

$ ./stippler.py --n_iter 25 --n_point 1000 --channel red data/gradient-1024x256.png
$ mv data/gradient-1024x256-stipple-1000.npy output
$
$ ./stippler.py --n_iter 25 --n_point 2500 --channel red data/gradient-1024x256.png
$ mv data/gradient-1024x256-stipple-2500.npy output
$
$ ./stippler.py --n_iter 25 --n_point 5000 --channel red data/gradient-1024x256.png
$ mv data/gradient-1024x256-stipple-5000.npy output
$
$ ./stippler.py --n_iter 25 --n_point 10000 --channel red data/gradient-1024x256.png
$ mv data/gradient-1024x256-stipple-10000.npy output

Figure 3

Run the script figure-3.py.

Figure 5

Run the script figure-5.py.

Figure 6

Run the script figure-6.py.

Figure 7

Run the script figure-7.py.

Figure 8

Run scripts figure-8A.py, figure-8B.py and figure-8C.py.

Figure 9

Run the script figure-9AC.py, then run:

$ ./stippler.py --n_iter 25 --n_point 25000 --channel red output/galago-patch.png
$ ./stippler.py --n_iter 25 --n_point 25000 --channel red output/galago-inter.png

Then run the script figure-9BD.py.

density-driven's People

Contributors

rougier avatar

Watchers

 avatar

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.