Do you want to draw some cool pictures with a few lines of Python code? SketchPy is here to help. In this article, let’s look at what sketchpy is and how you can use it to draw pictures using Python on your computer.
PYTHON SKETCHPY TUTORIAL
Do you want to draw some cool pictures with a few lines of Python code? SketchPy is here to help. In this article, let’s look at what sketchpy is and how you can use it to draw pictures using Python on your computer.
Let’s dive right in.
INSTALLING SKETCHPY
Sketchpy is a Python module for animating drawings of images. The sketchpy module is created on top of the turtle module in Python.
To install sketchpy on your computer, you can go to your command prompt (command line) and run the following command.
pip install sketchpy
Once you enter this command, sketchpy will get automatically installed on your system.
Now open your text editor and use the following code to draw any images.
from sketchpy import canvas obj = canvas.trace_from_image("IMAGE PATH")
obj.draw()
Output:
you have 3 customization option in this new module. they are
- scale
- save
- intensity
0 Comments