Comments (2)
OH just found your block on using initialPosition very helpful. Closing this, thanks!
from d3-voronoi-map.
Hi susie,
I'm very pleased you use these plugins, and also that you find these useful.
Regarding your question about deterministic layout, I think there is two ways to do it:
- the easy way: use the prng() API so that you alway have the same final layout; but you haven't any kind of control over this final layout
- the hard way: use the intial position API so that you control the first position of seeds, and thus control more or less the final layout
For the hard way, I say 'more or less' because the algorithm may fall in a situation where a seed must be randomly re-positioned (in case the seed is overweighted by other seeds and has no area left, re-positioning allows to retrieve an area). It is not an issue, except I will recommand to define a prng() in addition to the intialPosition(), so that you will have a repeatable final layout.
I hope I'm clear enough.
from d3-voronoi-map.
Related Issues (9)
- repeatable results? HOT 4
- Uncaught TypeError: Cannot set property 'twin' of null HOT 10
- Get rid of console.log in production
- handleOverweighted1 sometimes gets stuck in an infinite loop HOT 1
- remove unused dependencies (d3-array)
- Update to d3 v6 HOT 1
- 'default' is not exported HOT 4
- Large data set is causing "handleOverweighted1 is looping too much" error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-voronoi-map.