Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

ASSIGNMENT – I

Computer Graphics
(CSE-601)
Max Marks: 10

Note: Paste the necessary colored screenshots where applicable.

Q1. Create a “Rainbow Benzene “using the Turtle in python programming language. “Turtle” is a Python
feature like a drawing board, which lets us command a turtle to draw all over it! We can use functions like
turtle.forward(…) and turtle.right(…) which can move the turtle around.

To make use of the turtle methods and functionalities, we need to import turtle.” turtle” comes packed with the
standard Python package and need not be installed externally.

The roadmap for executing a turtle program follows 4 steps:  

a) Import the turtle module


b) Create a turtle to control.
c) Draw around using the turtle methods.
d) Run turtle.done().
Apply the following Steps as well:
a) Changing the Turtle Size
b) Changing the Screen Title
c) Changing the Screen Color
d) Changing the color of Turtle
Q2. Developer wants to fill the polygon by means of highlighting all the pixels which lie inside the polygon with
any colour other than the background colour. One approach is to start from the “seed “point and highlight out -
ward from this point i.e. neighboring pixels until we encounter the boundary pixels. Another approach is to apply
the inside test and then highlight pixels which lie inside the polygon. Implement the area filling approach in all
cases using any programming language.
Note : Prerequisite , Theory, Algorithm used, Program, conclusion.
Q3. Implement the intermediate pixels that would be turned on for the line with end points (-1,-2) & (4,8) using
Bresenham’s algorithm using any language. Also elaborate the concept of aliasing and anti-aliasing with the
techniques.

You might also like