Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taichi-dev/poisson-sampling-homework
https://github.com/taichi-dev/poisson-sampling-homework
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/taichi-dev/poisson-sampling-homework
- Owner: taichi-dev
- Created: 2022-06-02T03:51:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-19T10:19:07.000Z (over 2 years ago)
- Last Synced: 2024-08-02T11:23:38.462Z (3 months ago)
- Language: Python
- Size: 332 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-taichi - Poisson sampling homework - Poisson sampling algorithm simulation using Taichi. (Applications / **Simulation**)
README
# The challenge
Challenge 1 (easy): modify the code so that it works for any resolution `(width, height)`, e.g. `640 x 480`.
Challenge 2 (medium): implement Bridson's Poisson disk sampling algorithm with other Python packages, use the same config with this repo (400x400 grid and 100K desired points) and whatever acceleration tricks. See if you can beat the speed of Taichi. (the compile time will not be counted)
Challenge 3 (hard): improve the code so that the result is a maximal Poisson sampling, that is, there won't be any room left to insert new points.
Please submit your work in this [issue](https://github.com/taichi-dev/poisson-sampling-homework/issues/1).
# Install taichi
```
pip3 install -r requirements.txt
```# An interative animation
Mouse and keyboard control:
1. Click mouse to choose an initial point.
2. Press `p` to save screenshots.Example:
# Benchmark with NumPy and Numba
See this repo:
https://github.com/taichi-dev/taichi_benchmark/tree/main/poisson
You are encouraged to implement a faster one to beat ours!