Draw Ronaldo Using Python With Code
In this tutorial we will draw the famous football player cristiano ronaldo using python, He is one of the best football player out there, I am a huge fan of him so I decided to draw him using python.
To draw ronaldo we will use the sketchpy library in python with this module you just provide a image of the thing you want to draw then it draws sketch of it.
pip install sketchpy
Before we move to the coding part as we are using sketchpy you need to install it so paste the above command in your terminal and it will download and install the library.
Python Code To Draw Ronaldo
from sketchpy import canvas image=canvas.sketch_from_svg('ronaldo.svg') image.draw()
The code is just 3 lines, in the first we import canvas from sketchpy module then we use a function called sketch_from_svg(‘image-path.svg’) and finally we call the draw function on the image.
You will require a image of ronaldo in svg format to give in this program, you can download ronaldo’s image svg file from below.
After downloading move the file to where your program is located make sure to name the image as ronaldo and after that you are ready to run the program.
You can run the program on your computer if you don’t have python installed then you can use this online python compiler.
After running the program you will a loading bar in the terminal now it is processing the image and after some time a new window will open and it will have ronaldo drawn, below is an example of the drawing it creates.
As you can see it literally drawn cristiano ronaldo you can add any other svg image of ronaldo of your choice and it will draw the sketch of it.
So this was for today I hope you found this tutorial helpful and intresting want more tutorials like this then join our telegram channel to get updated of our latest tutorials.
If you want more drawing tutorials like this in python then do check this article: awesome python turtle codes.
Thanks for reading, Suii