Comments (3)
We're essentially drawing a raster grid across the individual voronoi cell, and using that grid to compute the weighted centroid. (Why raster? Because we're comparing it to the original rastered image.) To keep accuracy and computation times reasonable, we scale each cell up (or down) to be about 50-100 pixels across, before creating the grid.
from stipplegen.
In my code i used an consistent step size (1) regardless of cell shape. produced a very even grid of cells. Unsatisfied, I tried stepSize = maxSize/cellBuffer, but quality varies with number of cells (or relative cell size?). I tried the while loops as you have them and one number kept going to -infinity, never ending loop.
from stipplegen.
Um, there might be a bug in your code then?
from stipplegen.
Related Issues (14)
- size and controller String error HOT 2
- Consider several new improvements by Shel, for possible inclusion HOT 1
- Precompiled Stipplegen crashes when Java version is non-numeric HOT 1
- Run calculations on GPU
- Controlling Stipple number – very difficult in lower ranges HOT 1
- Export Voronoi diagram? HOT 1
- command line request HOT 1
- error HOT 3
- Break the stipple count barirer and voronoi net svg export HOT 3
- Request- rise up maximum stipple count HOT 2
- Feature request- export voronoi cell as svg HOT 1
- Put canvas in different thread from UI HOT 1
- Correct pause button behavior
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 stipplegen.