Micro-Project Proposal
Develop a program in 'C' Analog and digital clock Computer
Graphics
1.0 Brief Introduction
The mini-project “Analog and digital clockproject in C” is a console application using
the C programming languageAn analog clock is a tool for reading the time of day. The
shortest hand indicates the hour, a longer hand indicates the minutes, and the longest arm
indicates the seconds. Some analog clocks have only two hands: the shorter hand indicating
the hour and the longer hand indicating the minutes.
A clock or watch is called "analog" when it has moving hands and (usually) hours marked
from 1 to 12 to show you the time. Some have Roman Numerals (I, II, III, etc) instead, or no
numbers at all! In other words: not a digital clock.
A digital clock is a type of clock that displays the time digitally numerals or other symbols, as
opposed to an analog clock, where the time is indicated by the positions of rotating hands.
2.0 Aim of the Micro-Project
Develop a program in 'C' Analog and digital clock Computer Graphics
3.0 Intended Course Outcomes
1. Develop programs for 2-D and 3-D transformations.
2. Use projection to visualize objects on view plane.
3. Implement various clipping algorithms.
4. Develop programs to create curves using algorithms.
5. Manipulate visual and geometric information of images.
6. Implement standard algorithms to draw various graphics object using c program.
3.0 Literature Review
Most of the research and writings on analog and digital clock. The Project is idea to display
the clock with computer graphics. This project just used the local time, fetching from the
computer and display it on screen. This project implements the wall clock with the round
circular board and three conic geometrics which forms the different (sec, min & hour) hands.
Small cubes are also made for the minutes, while each hour is represented with a large
block. Digit display of the clock timing is also placed at the left.
This Function Use in Project
main()-The first lines in main are graphic initialization, you must change the path
“c:\turboc3\bgi\” to your compiler’s BGI file path otherwise program will not work.This
program is like getting the static picture of clock every second and combining all the pictures
to make a moving analog clock and show digital clock in number.
getmaxx()-The header file graphics.h contains getmaxx() function which returns the
maximum X coordinate for current graphics mode and driver.
getmaxy()-The header file graphics.h contains getmaxy() function which returns the
maximum Y coordinate for current graphics mode and driver.
settextstyle()-
The header file graphics.h contains settextstyle() function which is used to change the way in
which text appears. Using it we can modify the size of text, change direction of text and
change the font of text.
outtextxy()-The header file graphics.h contains outtextxy() function which displays the text
or string at a specified point (x, y) on the screen.
cleardevice()-The header file graphics.h contains cleardevice() function which clears the
screen in graphics mode and sets the current position to (0,0). Clearing the screen consists of
filling the screen with current background color.
settextstyle()-The header file graphics.h contains settextstyle() function which is used to
change the way in which text appears. Using it we can modify the size of text, change
direction of text and change the font of text.
closegraph()-The header file graphics.h contains closegraph() function which closes the
graphics mode, deallocates all memory allocated by graphics system and restores the screen
to the mode it was in before you called initgraph.
Here, we are going to develop the Analog and Digital clock in computer graphics. In this, we
will tell how to make a clock by using functions to display time. The programming language is
used here is C.
The main theme of this project is as follows:
–> It is Interactive 2D graphics.
–> The clock will be displayed.
–> Time will be displayed as same as system time.
A clock or watch is A clock or watch is called "analog" called "analog" when it has moving
hands when it has moving hands and hours marked and hours marked from 1 to 12 to show
you the time. Analog clocks usuall clocks usually indicate ti y indicate time using angles me
using angles. The most The most common clock face clock face uses a fixed numbered uses a
fixed numbered dial or dials and movi dial or dials and moving hand or hands. It u hand or
hands. It usually has a cirsually has a circular scale of 12 scale of 12 hours, which can also
serve as a scale of 60 which can also serve as a scale of 60 minutes minutes, and 60 seconds
seconds ifthebclock has clock has a second hand. Man second hand. Many other styles and
des y other styles and designs have been used igns have been used throughout the
throughout the years, includi years, including dials d ng dials divided into ivided into 6, 8, 10
6, 8, 10, and 24, and 24 hours. The only other widely used clock face today is the The only
other widely used clock face today is the 24 hour analog dial 4 hour analogdial , because
because of the use of the use of 24 hour time 24 hour time in military military
organizations and timetables.
This project shows the graphical representation of a working analogue and digital clock. The
objective of this program is to implement simple and basic functions of graphics. Computer
graphics plays a major role in today’s world where visualization takes the upper hand as
compared to textual interaction. This is largely true as we can see user interface becoming
more and more attractive all thanks to major leaps in the fields of computer graphics. The
project is implemented using graphics provided by C. The above argument is equally justified
in the fields of computer simulation which involve complex graphics being highlighted at its
peak. It is becoming more and more popular and the constant dive to improve particular
system efficiency by studying its simulated model attracts more people towards it.
4.0 Proposed Methodology
An information In this Project we have learned To create an analog and digital clock
in C Language using computer graphics. This Function use In Micro Project
main()-The first lines in main are graphic initialization, you must change the path
“c:\turboc3\bgi\” to your compiler’s BGI file path otherwise program will not
work.This program is like getting the static picture of clock every second and
combining all the pictures to make a moving analog clock and show digital clock in
number.
getmaxx()-The header file graphics.h contains getmaxx() function which returns the
maximum X coordinate for current graphics mode and driver.
getmaxy()-The header file graphics.h contains getmaxy() function which returns the
maximum Y coordinate for current graphics mode and driver.
settextstyle()- The header file graphics.h contains settextstyle() function which is used
to change the way in which text appears. Using it we can modify the size of text,
change direction of text and change the font of text.
outtextxy()-The header file graphics.h contains outtextxy() function which displays
the text or string at a specified point (x, y) on the screen.
cleardevice()-The header file graphics.h contains cleardevice() function which clears
the screen in graphics mode and sets the current position to (0,0). Clearing the screen
consists of filling the screen with current background color.
settextstyle()-The header file graphics.h contains settextstyle() function which is used
to change the way in which text appears. Using it we can modify the size of text,
change direction of text and change the font of text.
closegraph()-The header file graphics.h contains closegraph() function which closes
the graphics mode, deallocates all memory allocated by graphics system and restores
the screen to the mode it was in before you called initgraph.
5.0 Resources Required
S. No. Name of Resources/material Specifications
1 Laptop Core i5 -2.3 GHz 8 GB
Ram 64-bit operating
system
2 Software C Turbo
6.0 Action Plan
S. No. Details of activity Planned Start Planned Name of
date Finish Responsible
date Team
Members
1 To discuss and getting the topic of 6-Jan-2020 All
Micro project
2 To start planning on our Topic of 13-Jan-2020 All
Micro project.
3 To collect Information about our 20-Jan-2020 All
Topic.
4 To start with gathering information 28-Jan-2020 All
about various data about Library
management
5 To discuss about the Library 3-Feb-2020 All
management with our guide.
6 To start the main copy of our Micro 13-Feb-2020 All
project.
7 To present soft copy of our Micro 24-Feb-2020 All
project to the guide
8 To show the hard copy of our Micro 16-Mar-2020 All
project to our guide.
Name of Responsible Team Members
S. No. Name Of Members Enrollment No. Signatures
1 Sanket s. patil 1901320094
2 Pratik k. jaypurkar 1901320097
3 Sudhanshu p. sarode 1901320100
4 Kunal g. yaidya 1901320102
**************
PART B – Micro-Project Report
Develop a program in 'C' Analog and digital clock Computer
Graphics
1.0 Rationale
A digital clock is a type of clock that displays the time digitally (i.e. in numerals
or other symbols), as opposed to an analogue clock.Digital clocks are often associated
with electronic drives, but the "digital" description refers only to the display, not to
the drive mechanism. (Both analogue and digitalclocks can be driven either
mechanically or electronically,but "clockwork" mechanisms with digital displays are
rare).Because digital clocks can be very small and inexpensive devices that enhance
the popularity of product designs, they are often incorporated into all kinds of
devices such as cars, radios, televisions, microwave ovens, standard ovens,
computers and cell phones. Sometimes their usefulness is disputed: a common
complaint is that when time has to be set to Daylight Saving Time,many household
clocks have to be readjusted.The incorporation of automatic synchronization by
aradio time signal is reducing this problem (see Radio clock).
A clock is a device used to measure, keep, and indicate time. The clock is one of the
oldest human inventions, meeting the need to measure intervals of time shorter than
the natural units: the day, the lunar month, and the year. Devices operating on
several physical processes have been used over the millennia.
2.0 Course Outcomes Addressed
1. Develop programs for 2-D and 3-D transformations.
2. Use projection to visualize objects on view plane.
3. Implement various clipping algorithms.
4. Develop programs to create curves using algorithms.
5. Manipulate visual and geometric information of images.
6. Implement standard algorithms to draw various graphics object using c
program.
3.0 Literature Review
Most of the research and writings on Most of the research and writings on analog and
digital clock. The Project is idea to display the clock with computer graphics. This project just
used the local time, fetching from the computer and display it on screen. This project
implements the wall clock with the round circular board and three conic geometrics which
forms the different (sec, min & hour) hands. Small cubes are also made for the minutes,
while each hour is represented with a large block. Digit display of the clock timing is also
placed at the left.
This Function Use in Project
main()-The first lines in main are graphic initialization, you must change the path
“c:\turboc3\bgi\” to your compiler’s BGI file path otherwise program will not work.This
program is like getting the static picture of clock every second and combining all the pictures
to make a moving analog clock and show digital clock in number.
getmaxx()-The header file graphics.h contains getmaxx() function which returns the
maximum X coordinate for current graphics mode and driver.
getmaxy()-The header file graphics.h contains getmaxy() function which returns the
maximum Y coordinate for current graphics mode and driver.
settextstyle()-The header file graphics.h contains settextstyle() function which is used to
change the way in which text appears. Using it we can modify the size of text, change
direction of text and change the font of text.
outtextxy()-The header file graphics.h contains outtextxy() function which displays the text
or string at a specified point (x, y) on the screen.
cleardevice()-The header file graphics.h contains cleardevice() function which clears the
screen in graphics mode and sets the current position to (0,0). Clearing the screen consists of
filling the screen with current background color.
settextstyle()-The header file graphics.h contains settextstyle() function which is used to
change the way in which text appears. Using it we can modify the size of text, change
direction of text and change the font of text.
closegraph()-The header file graphics.h contains closegraph() function which closes the
graphics mode, deallocates all memory allocated by graphics system and restores the screen
to the mode it was in before you called initgraph.Here, we are going to develop the Analog
and Digital clock in computer graphics. In this, we will tell how to make a clock by using
functions to display time. The programming language is used here is C.The main theme of
this project is as follows:
–> It is Interactive 2D graphics.
–> The clock will be displayed.
–> Time will be displayed as same as system time.
A clock or watch is A clock or watch is called "analog" called "analog" when it has moving
hands when it has moving hands and hours marked and hours marked from 1 to 12 to show
you the time. Analog clocks usuall clocks usually indicate ti y indicate time using angles me
using angles. The most The most common clock face clock face uses a fixed numbered uses a
fixed numbered dial or dials and movi dial or dials and moving hand or hands. It u hand or
hands. It usually has a cirsually has a circular scale of 12 scale of 12 hours, which can also
serve as a scale of 60 which can also serve as a scale of 60 minutes minutes, and 60 seconds
seconds ifthebclock has clock has a second hand. Man second hand. Many other styles and
des y other styles and designs have been used igns have been used throughout the
throughout the years, includi years, including dials d ng dials divided into ivided into 6, 8, 10
6, 8, 10, and 24, and 24 hours. The only other widely used clock face today is the The only
other widely used clock face today is the 24 hour analog dial 4 hour analogdial , because
because of the use of the use of 24 hour time 24 hour time in military military
organizations and timetables.
This project shows the graphical representation of a working analogue and digital clock. The
objective of this program is to implement simple and basic functions of graphics. Computer
graphics plays a major role in today’s world where visualization takes the upper hand as
compared to textual interaction. This is largely true as we can see user interface becoming
more and more attractive all thanks to major leaps in the fields of computer graphics. The
project is implemented using graphics provided by C. The above argument is equally justified
in the fields of computer simulation which involve complex graphics being highlighted at its
peak. It is becoming more and more popular and the constant dive to improve particular
system efficiency by studying its simulated model attracts more people towards it.
5.0 Actual Methodology Followed
An information In this Project we have learned To create an analog and digital
clock in C Language using computer graphics. This Function use In Micro
Projectmain()-The first lines in main are graphic initialization, you must change the
path “c:\turboc3\bgi\” to your compiler’s BGI file path otherwise program will not
work. This program is like getting the static picture of clock every second and
combining all the pictures to make a moving analog clock and show digital clock in
number.
5.0 Actual Resources Used
S. No. Name of Resources/material Specifications
1 Laptop Core i5 -2.3 GHz 8
GB Ram 64-bit
operating system
2 Software C Turbo
6.0 Program
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<graphics.h>
#include<dos.h>
void main()
intgd=DETECT,gm,i,y,x,s,m,h,l;
float pi=3.14;
initgraph(&gd,&gm,"c:\\TURBOC3\\BGI");
x=getmaxx()/2;
y=getmaxy()/2;
settextstyle(3,0,3);
outtextxy(x-100,y-100,"DIGITAL AND ANALOG CLOCK");
getch();
printf("\n Digital And Analog Clock");
printf("\n Set Time:- \n");
printf(" Hour:- ");
scanf("%d",&h);
printf(" Minute:- ");
scanf("%d",&m);
printf(" Second:- ");
scanf("%d",&s);
printf(" till:- "); //how many the clock is to be display
scanf("%d",&l);
cleardevice();
settextstyle(1,0,1);
for(i=0;i<l;i++)
//clock//
circle(x,y,200);
circle(x,y,199);
line(x,y-200,x,y-180);
line(x,y+200,x,y+180);
line(x-200,y,x-180,y);
line(x+200,y,x+180,y);
if(s==60)
s=0;
m++;
if(m==60)
m=0;
h++;
line(x,y,x+75*sin(h*pi/6),y-75*cos(h*pi/6)); //hour hand //
line(x,y,x+150*sin(m*pi/30),y-150*cos(m*pi/30));
//min hand //
line(x,y,x+175*sin(s*pi/30),y-150*cos(s*pi/30));
//sec. hand //
printf("%d:%d:%d:",h,m,s);
s++;
delay(1000);
printf("\b\b\b\b\b\b\b\b");
cleardevice();
getch();
closegraph();
6.1 Outputs of the Micro-Project
7.0 Skill Developed / learning out of this Micro-Project
• Technical Skills: ...
• Communication Skills: ...
• Problem Solving Skills: ...
• Decision Making Skills: ...
• Leadership Skills: ...
• Performance Skills: ...
• Team Building Skills: ...
**************