Java Graphic Programming - Intermediate Level

You might also like

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

TM240: Introduction to Computer

Graphics
Tutor-Marked Assignment (TMA) Fall 23/24

Cut-Off Date: Based on the Published Deadline.


Total Marks: …. marks turned to 15 marks

Contents
Warnings and Declaration…………………………………….………………………………......1
Question 1 ……………….…………………………………. ………………………………...…..2
Question 2 ………………………………………………………………………………….…..…..3
Question 3 ………………………………………………………………………………….…..…..4
Marking Criteria ...…………..………………………………………………………….………..…5

Plagiarism Warning:
As per AOU rules and regulations, all students are required to submit their own TMA
work and avoid plagiarism. The AOU has implemented sophisticated techniques for
plagiarism detection. You must provide all references in case you use and quote
another person's work in your TMA. You will be penalized for any act of plagiarism as
per the AOU's rules and regulations.

Declaration of No Plagiarism by Student (to be signed and submitted by student


with TMA work):

I hereby declare that this submitted TMA work is a result of my own efforts and I have
not plagiarized any other person's work. I have provided all references of information
that I have used and quoted in my TMA work.
Name of Student:……………………………..
Signature:…………………………………………...
Date:…………………………………………………

TM240 / TMA Page 1 of 5 2023/2024 Fall


Question one [25 marks]

Using appropriate Java code and animation principles that you learnt in the course,
implement the video in the file TMA-Q1.wmv. Please provide the code and video that
you generated in your answer sheet.

Question Two [25 marks]

a) Adopting suitable Java primitives and based on the least significant digit of
your ID, implement one of the following shapes: [15 marks]

ID is ended with 2,3

ID is ended with 0,1

TM240 / TMA Page 2 of 5 2023/2024 Fall


ID is ended with 4,5
ID is ended with 6,7

ID is ended with 8,9

b) Snapshot the output of a) [2 Marks]


c) Use suitable rendering to fill-in the shape suitably using suitable and well aligned-
texture to reflect the real shape of your drawing. [8 Marks]

Question Three [25 marks]

TM240 / TMA Page 3 of 5 2023/2024 Fall


Using appropriate Java code and animation principles that you learnt in the course,
implement the video in the file TMA-Q3.wmv. Please provide the code and video that
you generated in your answer sheet.

Question Four [25 marks]

A. Having the following parametric equation:


X(t) = cos(t);
Y(t) = sin(2t);
,while the output of this equation is:

I- Write an appropriate Java code segment to plot the above function.


II- Modify the basic code to output the following shape:

B. Without using Java BasicStroke class, having the following parametric equation:
X(t) = cos(2t);

TM240 / TMA Page 4 of 5 2023/2024 Fall


Y(t) = sin(3t);
,while the output of this equation is:

1. Write an appropriate Java code segment to plot the above function.


2. Modify the basic code to output the following shape:

End of Questions

TM240 / TMA Page 5 of 5 2023/2024 Fall

You might also like