Skip to main content

vectors draw lib

Project description

vectors-draw-lib or pyvdl

request

matplotlib

numpy

cv2

Docs

install:

pip install pyvdl matplotlib opencv-python numpy

init:

import pyvdl as vl
print(f'install pyvdl: {vl.__version__}')

create_obj:

class example(vl.obj):
    def __init__(self):
        self.color = (255, 255, 255)
    def render(self, x, y):
        return self.abs_(x, y) - 20 < 0

create_animation:

class p(vl.animation):
    def __init__(self):
        self.size = (500, 500)
        self.form = lambda x : x
        self.t = 5
        self.obj_ = example()

render:

# obj
obj = example()
r = vl.render(obj)
vl.show(r)  # show render-obj: r, only works on pykernel
vl.save("test.png", r)  # save render-obj: r as "test.png"
# animation
animate = p()
animate.render()
animate.video("animation.avi")  # filename.avi

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

pyvdl-0.0.3.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvdl-0.0.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pyvdl-0.0.3.tar.gz.

File metadata

  • Download URL: pyvdl-0.0.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for pyvdl-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d724d4231a28d4d3663bc1446a08ff6a0a881929f043b9a5b0d76b4141107a04
MD5 34f3090da217cc8b6b2b801b0555daae
BLAKE2b-256 67689ae5ab4afd3bb2c8d440c0e815f5b418139db2b7fb33c291c971e05d606d

See more details on using hashes here.

File details

Details for the file pyvdl-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pyvdl-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for pyvdl-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0068f39ba7a243463af339e87f98912634d8531d2aa857b71553d1ff84cc826d
MD5 239984073a3b46f16938211b6acedc8c
BLAKE2b-256 f588b8ad7bcee8e5b894ec58cd5830058fde09995af1c2b5bf79bc2fc6c5fd21

See more details on using hashes here.

Supported by

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