Skip to main content

Use numpy to create a world that you dreamed about!

Project description

Numpy World

Draw this world with numpy.

We firmly believe once you can draw one picture with programming, you can also draw a series of that kind of pictures with programming too.

Installation

sudo pip3 install numpyworld

Usage

from numpyworld import World

width = 1920
height = 1080

world = World(width=width, height=height)
world.disable_jupyter_notebook_mode()

for x in range(width):
    for y in range(height):
        if width/7 * 1 < x < width / 7 * 2:
            world.draw_a_point(x, y, (0, 255, 0))
        if width/7 * 3 < x < width / 7 * 4:
            world.draw_a_point(x, y, (0, 0, 0))
        if width/7 * 5 < x < width / 7 * 6:
            world.draw_a_point(x, y, (255, 0, 0))

world.show()

More

Jupyter-notebook Examples

Project details


Download files

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

Files for numpyworld, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size numpyworld-0.3-py3-none-any.whl (4.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size numpyworld-0.3.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page