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.

Source Distribution

numpyworld-0.3.tar.gz (4.3 kB view hashes)

Uploaded source

Built Distribution

numpyworld-0.3-py3-none-any.whl (4.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page