Python implementation of the Johannesmann Spatial Tessellation method.
Project description
Python implementation of the Johannesmann Spatial Tessellation method.
This method was developed for the occasion of Sarah Johannesmann’s doctoral thesis defence and is inspired by the way she cuts a cake. For a two-dimensional, bounded plane this is realised by subdividing the plane by a line, which intersects a random point on the plane at a random slope, resulting in two tiles. The process is repeated an arbitrary number of times, with each new line subdividing only the tile the random origin point is located.
Features
Implementation of two-dimensions.
Single point and grid sampling methods.
Example
Import the package by:
import johannesmann
Create a tessellation object with size 4 by 4 with 30 cuts:
tsl = johannesmann.Tessellation(4, 4, 30)
Sample the tile ID number at the centre of the tessellated plane:
center_id = tsl.tile_id(0, 0)
Sample the whole bounded plane (from -2 to 2 in both dimension) with a grid of 1000 by 1000 samples to get an image of the tessellation. Set squash_ids=True to decrease the range of tile ID numbers by renumbering and removing unused ID numbers:
image = tsl.tile_id_grid(1000, 1000, squash_ids=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file johannesmann-0.1.0.tar.gz
.
File metadata
- Download URL: johannesmann-0.1.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 060a455c4809dba86fd95651484c272e8cd780b2516cbb0a53933bba6049ceed |
|
MD5 | a1a4b0bbec1de7474916f73b485f32f4 |
|
BLAKE2b-256 | 6475612338a4911e4b1907ece96b1bc3e7cd395a2fbc1a42ebf502c8ab790226 |