It converts a C graphics code to its equivalent python graphics code in pygame. It basically converts only the shapes functions of C graphics such as line, circle, drawpoly( for drawing various polygons), ellipse, arcs and rectangele. It can run on Windows and linux.
=> Python version 3
=> pygame and tkinter packages installed
You need to clone the this repository.
For linux use the command git clone : git clone https://github.com/RaghuGulati/C-Graphics-To-python-convertor
-
for linux, then enter in the folder which is downloaded and you will se the file Convertor.py;
To execute, use command "python3 Convertor.py" -
for windows, you can execute it on any python IDE such as visual studio, pycharm.
You can type the new code or can open the pre-existing C graphics file and execute it. On execution it will open a window which will display the output of the code (i.e. it will draw the shapes as entered in the code) and a file "Source Code.txt" will be created in which the equivalent python graphics code for corresponding C graphics code will be there.