VISHAL CHAVARE PROJECT Wall Watch Application Computer Graphics
VISHAL CHAVARE PROJECT Wall Watch Application Computer Graphics
A STYDY ON
The
at
[ your college name ]
Certificate
This is to certify that Mr. /Mrs
Place:Pune EnrollmentNo:
Index…
Implementaion Details(code):
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <graphics.h>
#include <dos.h>
/*
* find the points at 0, 30, 60,.., 360 degrees
* on the given circle. x value correponds to
* radius * cos(angle) and y value corresponds
* to radius * sin(angle). Numbers in the clock
* are written using the above manipulated x and
* y values. And the hour needle movement
* is based on this
*/
void calcPoints(int radius, int midx, int midy, int x[12], int y[12]) {
int x1, y1;
return;
}
2
/*
* Calculates position for minute and second needle movement
* Each quadrant has 90 degrees. So, we need to split each
* quadrant into 15 parts(6 degree each) to get the minute
* and second needle movement
*/
2
void minSecCalc(int radius, int midx, int midy, int secx[60], int secy[60]) {
int i, j = 0, x, y;
char str[32];
return;
}
int main() {
/* request auto detection */
int gdriver = DETECT, gmode, err, tmp;
int i, j, midx, midy, radius, hr, min, sec;
int x[12], y[12], minx[60], miny[60];
int hrx[12], hry[12], secx[60], secy[60]; 3
int secx1, secy1;
char str[256];
time_t t1;
struct tm *data;
radius = 200;
while (!kbhit()) {
setlinestyle(SOLID_LINE, 1, 3);
settextstyle(TRIPLEX_FONT, 0, 3);
getch();
Result/Analysis:
6
Conclusion:
Thus we have understand that how to create a analog wall watch and represented the time in it.
REFRENCE:
Techamax book of computer graphics.
http://see-programming.blogspot.com/2013/09/c-program-to-implement-analog-
clock.html.