squiral - square spiral
Project description
squiral
square spiral
Welcome to Squiral!
Here is an example:
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
squiral is a simple and lightweight Python library for generating square spiral patterns.
With squiral, you can easily create a wide range of square spiral designs, from simple to complex.
squiral is easy to use and integrate into existing projects,
making it a great tool for data visualization, computer graphics, and other applications.
With squiral, you can quickly and easily generate square spiral patterns
that are both beautiful and functional.
Whether you're working on a personal project or a professional one,
squiral's square spiral generator is the perfect tool
for adding unique and visually striking designs to your work.
The basic idea behind printing this matrix is
to start from the middle of the matrix and then moving:
right
>> down
>> left
>> up
and not returning to the same row again.
Install
PyPI
pip install squiral
GitHub
pip install git+https://github.com/sadikkuzu/squiral.git
Usage
In console:
buddha@dharma:~$ squiral 7
43 44 45 46 47 48 49
42 21 22 23 24 25 26
41 20 7 8 9 10 27
40 19 6 1 2 11 28
39 18 5 4 3 12 29
38 17 16 15 14 13 30
37 36 35 34 33 32 31
buddha@dharma:~$ squiral --help
usage: squiral [-h] size
positional arguments:
size squiral size
optional arguments:
-h, --help show this help message and exit
In python:
>>> import squiral as sq
>>> sq.printout(sq.produce(5))
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
>>>
Contributing
To learn more about making a contribution to squiral, please see our Contributing guide
Many Thanks To Our Contributors
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
Built Distribution
File details
Details for the file squiral-0.5.0.tar.gz
.
File metadata
- Download URL: squiral-0.5.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 971ee1077165d85c5a5e555e0cd08de0cbb85061bb1f58c26dcb0010f25b5b8e |
|
MD5 | 79e9930539a9f33358e4ca88223d061c |
|
BLAKE2b-256 | 02f2c3430f4384f133afa49d2555db3ef994651e061386ab7d6dec7a6b777d7d |
File details
Details for the file squiral-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: squiral-0.5.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2973bc1978af6d444ccc86ad9dd75a6cb41c5c6b87c32b86a644c197eb79f17 |
|
MD5 | a0ce04b1aa57b77be77d8e2150f51997 |
|
BLAKE2b-256 | c8c4393132bb996f31190602e7d486679a67e42ca0f8e55d25b651eb34cbc00b |