Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

squiral - square spiral

License

NotificationsYou must be signed in to change notification settings

sadikkuzu/squiral

Repository files navigation

made-with-pythonDownloads
pre-commit.ci statusPython lint&testPublish Python Package
Sourcegraphcodecov

square spiral

Welcome to Squiral!Here is an example:21 22 23 24 2520  7  8  9 1019  6  1  2 1118  5  4  3 1217 16 15 14 13

squiral is a simple and lightweight Python library for generating square spiral patterns.
Withsquiral, 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.
Withsquiral, 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

pip install squiral
pip install git+https://github.com/sadikkuzu/squiral.git

Usage

In console:

buddha@dharma:~$squiral 743 44 45 46 47 48 4942 21 22 23 24 25 2641 20  7  8  9 10 2740 19  6  1  2 11 2839 18  5  4  3 12 2938 17 16 15 14 13 3037 36 35 34 33 32 31buddha@dharma:~$squiral --helpusage: squiral [-h] sizepositional arguments:  size        squiral sizeoptional arguments:  -h, --help  show this help message and exit

In python:

>>>importsquiralassq>>>sq.printout(sq.produce(5))21222324252078910196121118543121716151413>>>

Contributing

To learn more about making a contribution to squiral, please see ourContributing guide

Many Thanks To Our Contributors


[8]ページ先頭

©2009-2025 Movatter.jp