Skip to main content

Allows you to draw beautiful matrices.

Project description

Drawing on a matrix

What is this?

The module allows you to create a symbolic matrix and draw different lines on it, after which you can convert the drawn lines into a beautiful structure.

Quick Guide

Drawing a simple, beautiful line:

my_picture = РЎanvas_matrix(10,10)
my_picture.makeline(1, 1, 8, 9)
my_picture.beautify()
my_picture.pt()

Using

Using the library is as simple and convenient as possible:

Let's import it first: First, import everything from the library (use the from ... import * construct).

To start working with the module, you need to create an object with the class Canvas_matrix, in this case we are creating a 10 by 10 matrix filled with spaces:

my_picture = РЎanvas_matrix(10,10," ")

This class has several methods that will help you master this library:

.pt() - prints the entire matrix, if pt = True, the garden will be printed after printing for the next print:

my_picture.pt(pt = False)

.makeline(x1, y1, x2, y2) - draws a line at two points, the coordinates start at 1, that is, the coordinate at the upper left point will be [0,0]

my_picture.makeline(1, 1, 8, 9)

.point(x, y, r) - draws a point in x, y coordinates with the same width and height r:

my_picture.point(5, 7, 2)

.local_draw - stores the coordinates of the local drawing, you no longer need to count the coordinates from the origin, but only from the beginning of the local coordinates:

my_picture.local_draw = [x, y]

.beautify() - Transforms a boring picture from identical symbols into a beautiful picture with different symbols:

my_picture.beautify()

an example of drawing a simple picture:

t = РЎanvas_matrix(10,25)
t.local_draw = [7,0]
t.makeline(0, 0, 4, 2)
t.makeline(20, 2)
t.makeline(25, -1)
t.local_draw = [2,4]
t.point(0,0)
t.point(10,-1)
t.beautify()
t.pt(False)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matrixdraw-0.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

matrixdraw-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file matrixdraw-0.0.1.tar.gz.

File metadata

  • Download URL: matrixdraw-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.3

File hashes

Hashes for matrixdraw-0.0.1.tar.gz
Algorithm Hash digest
SHA256 91d3468a711ee775bb2086437a9df2c7f971b33c4e53ab8971d3d61f432f7886
MD5 26854a3728489555ebd7339c1a3d7367
BLAKE2b-256 64a7960ac18a019a5bc9eb72ed5cf1c5ecfeffb80632eda2f6dc2b0fe1fed606

See more details on using hashes here.

File details

Details for the file matrixdraw-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: matrixdraw-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.3

File hashes

Hashes for matrixdraw-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f1dd56c5537ca78603b2b0a495f3271eee6004009ec72b281ba118a1f01395b
MD5 51bb67a8f7894aeddb7a5d29daeb45ec
BLAKE2b-256 15466eb3ab870a978b59bfa361763e584094808104d6a6560fd857dafbc6a36b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page