// INDIAN FLAG : SIMPLE PROGRAM //
#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int gdriver=DETECT, gmode, xc=195, yc=175;
double deg, max, x, y, newx, newy, i, move;
initgraph (&gdriver, &gmode, "--path--");
rectangle (100, 100, 300, 250);
rectangle (90, 100, 100, 400);
line (100, 150, 300, 150);
line (100, 200, 300, 200);
setfillstyle (SOLID_FILL, LIGHTRED);
floodfill (110, 110, WHITE);
setfillstyle (SOLID_FILL, WHITE);
floodfill (110, 160, WHITE);
setfillstyle (SOLID_FILL, GREEN);
floodfill (110, 210, WHITE);
setfillstyle (SOLID_FILL, BROWN);
floodfill (91, 101, WHITE);
setcolor (BLUE);
circle (xc, yc, 20);
deg= (double)(15 * 3.14 / 180);
max= (double)(360 * 3.14 / 180);
move= deg;
x= xc;
y= 155;
line (xc, yc, x, y);
for (i= deg; i<= max; i+= move)
{
newx= xc + (x-xc)*cos(i) + (y-yc)*sin(i);
newy= yc - (x-xc)*sin(i) + (y-yc)*cos(i);
line (xc, yc, newx, newy);
}
putpixel (xc, yc, 15);
delay (500);
getch ();
closegraph ();
}
If you want to use classes you need to use an object-oriented language, such as C++ or Java.
To create a flag class you will need a base class (flag) plus some derived classes to cater for common layouts such as tricolours and Saltires. The Indian national flag is derived from a horizontal tricolour with orange, white and green bands of equal width. In the centre of the white band there is an Ashoka Chakra, a 24 spoked Wheel of Life.
The Ashoka Chakra is the hardest part to implement, however the geometry is reasonably simple and can be achieved by overlaying a white circle on top of a slightly larger blue circle to create the outer blue ring, with blue quadrilaterals for the spokes. There are 24 spokes in total so these need to be arranged at 15 degree intervals from top centre. There are also 24 semi-circles around the inner edge of the blue ring, but these can be drawn using small blue circles centred on the large white circle's circumference. The diameter of these circles is equal to the circumference of the inner edge divided by 48. The semi-circles also sit between the spokes, so the first semi-circle will be centred 7.5 degrees from top centre, with 15 degree intervals thereafter.
The spokes are formed from diamond-shaped quadrilaterals. If we imagine a circle that is half the diameter of the inner white circle, then its circumference will intersect the mid-points which should be about 3 degrees either side of the outer and inner points. The outer point should hit an imaginary circle with a diameter that is equal to the white inner circle minus one of the small blue circles while the inner point should start on a circle that is roughly twice the diameter of a small blue circle. The first spoke has inner and outer points 0 degrees from top centre while the points of each subsequent spoke are offset 15 degrees from the points of the previous one.
Your graphics library should provide all the facilities you need, which is essentially filled polygons and circles. However, to avoid any flickering during a resize, you should use double-buffering to calculate the geometry and draw the flag in memory before bit-blasting the complete image to the view port for display.
Write a program to find the grade obtained by the students of a class
if you are using the IDE then there is no need to set class path, ant you are using Command prompt to run the java program then you need to set the class path where the class (which is going to be used in your program) is actually located,use the following command:set calsspath=%classpath%;actual_path_of the class;we cancall more than two class by using this command by using separator (,)
To write a C++ program to display the student details using class and array of object.
C++ is a generic programming language. As such, it has no graphics capability built-in. Therefore you will need a graphics library to suit your hardware. Once you have access to your library, look at methods of using animated GIFs within your application.
i want a coding of a program of a calculator using graphics in c language??
ANSI/ISO C does not and never has done graphics.
hey i m going to give a program that accepts edges a input and then it draws the graph using a computer graphics display...
pro c language to implement linear search using pointers
Write a program to find the grade obtained by the students of a class
The same way you capture screenshots of anything on your computer. If you are using windows: Press the "PrtScn" button. Then open a graphics program (such as paint) and paste the image. If you are using Mac: Press the Apple key ⌘ + Shift + 3 and then release. Then, again, open a graphics program and paste.
Service Oriented Architecture programs do not include graphics. They communicate using different platforms and XLM messages within their software services.
In order to run a OpenGL program, you must download and install a program called GLDirect. This program allows you to run OpenGL-based games and other applications using your graphics card's DirectX drivers.
Rob Krumm has written: 'Harvard Graphics' -- subject(s): Harvard graphics (Computer program), Harvard graphics (Computer file) 'Using a PS1' -- subject(s): IBM PS/1 (Computer system) 'Expert advisor' -- subject(s): DBase IV (Computer program), Data base management, Database management
This depends on what CAD program you'll be using, but generally speaking you don't need a very robust or recent graphics card to do 3D house designs.
if you are using the IDE then there is no need to set class path, ant you are using Command prompt to run the java program then you need to set the class path where the class (which is going to be used in your program) is actually located,use the following command:set calsspath=%classpath%;actual_path_of the class;we cancall more than two class by using this command by using separator (,)
A computer program that utilizes 3D graphics.
Platform dependent. I guess you are using TurboC; it has a built-in help-system, and it comes with an example program called bgidemo.c