N 1

You might also like

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

Introduction..

Computer graphics is an art of drawing


images on computer screen using programs.

This project emphasis on an analog clock as well as that displays


the system time, using graphics.

This real-time analog clock c program uses graphics.h library to


display the clock and time.h library to get current time.

This is a c program which reads the current time from

System and shows an analog clock that shows an analog clock


that shows correct time. The clock hand ticks and the three
hands( hour hand, minute hand second hand) are used to show
correct time.
Proposed logic..

To calculate time taken by a


process, we have used gettime() function
which is available in time.h header file
the code to calculate the system time is
as follows:
I=(int(t.ti_sec)*(0.105))=11
J=(int(t.ti_min)*(0.105))+11
K=((int(t.ti_hour)*(0.105))*5+11)

Min=int(t.ti_min);
Rem=min/12;
K=k+(rem*0.105);
Similarly the second hand, minute hand and hour
hand is calculated using cos()and sin() functions that
are available in math.h header file
Conclusion …

 The project report entitled “ clock with pendulam”


has come to its final stage.

 Computer graphics are pictures that are created


using computers.

 This project focuses on creating an anolog and


digital clock in graphics using suitable libraries.
References..

 Computer graphics book by Tech Knowledge


publications.
 www.wikipedia.com
 www.youtube.com
 www.quara.com
 www.greeksforgeeks.com

You might also like