Home CPSC 110

Initials

 

Objective

To get experience with the graphical coordinate system.


 

Task

For this lab, you will write a program which will draw your initials to the screen. You can use line objects to do this, each letter can be made out of some number of lines connected together.

If you have a "curvy" initial, you don't have to make it appear round. For example, an S can be made out of just three lines. The letters just have to be recognizable. But if, you want to be ambitious, you can use the pygame.draw.arc function to make curves.


 

Details

  1. Start by opening a graphics window. You can make the size whatever you want, but should keep the size in mind.
  2. Next work out how many lines you will need to make your initials.
  3. For each line, figure out what coordinates you will need for the starting and ending points. Keep the size of the window in mind. For instance, if your window is 400 by 400, the coordinates should be in that range.
  4. For each line you create, call the draw method so it appears in the window.
  5. The colors are up to you.

 

Submitting

When you are finished, please submit the .py file for the lab on Canvas. To do so, you'll need to navigate to where you saved the file on your computer.

Copyright © 2024 Ian Finlayson | Licensed under a Creative Commons BY-NC-SA 4.0 License.