Skip to content

This repository contains Python code examples for creating drawings using both a graphics library and the turtle library. The graphics library provides a low-level interface for creating graphics, while the turtle library offers a higher-level, more user-friendly approach.

Notifications You must be signed in to change notification settings

AhmedDiaa0212/Computer-Graphics-with-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Computer Graphics with Python

This repository contains Python code examples for creating drawings using both a graphics library and the turtle library. The graphics library provides a low-level interface for creating graphics, while the turtle library offers a higher-level, more user-friendly approach.

Requirements

To run the code in this repository, you need to have Python installed on your machine. You can download Python from the official website: Python.org

Directory: graphics library

This directory contains examples of drawing using the graphics library:

  • flags.py: This file showcases the drawing of three flags using the Graphics library. The user can specify the name of the country that he wants to display. The flags included are: the Iraq Flag, Syria Flag, and Yemen Flag

  • wow_emoji.py: This file demonstrates the movement of an emoji using the Turtle library. The emoji moves forward (to the right) and then back to its original position (to the left).

Directory: turtle library

This directory contains examples of drawing symbols and natural views using the turtle library:

  • corona_symbol.py: Draws a symbol representing the coronavirus.

  • flower.py: this file allows users to draw a flower with a customizable number of petals. The user can specify the number of petals they want for their flower.

  • natural_view_with_rainbow.py: Draws a natural view with a rainbow.

To run an example, execute the corresponding Python script using the python command. For example:

python corona_symbol.py

This will open a graphics window and display the symbol.

You can explore and modify the different scripts to create your drawings. The graphics library offers functions for drawing lines, rectangles, circles, and more.

Please refer to the documentation of the graphics library for more information.

Contributing

If you'd like to contribute to this repository, you can fork the project, make your changes, and submit a pull request. Contributions such as adding new drawings, improving existing code, or providing additional examples are highly appreciated.

About

This repository contains Python code examples for creating drawings using both a graphics library and the turtle library. The graphics library provides a low-level interface for creating graphics, while the turtle library offers a higher-level, more user-friendly approach.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages