Wednesday 18 March 2015

How To Create a Computer Graphics Game

Here is  a simple example of Computer Graphics game in Turbo c / Dosbox.

Go through the Following coding or download the complete coding by clicking Download.


Here are Some Snap Shots of the Game:




CODE:


# include "process.h"
# include "dos.h"
# include "stdlib.h"
# include "graphics.h"
# include "stdio.h"

what is Aspect Ratio , DPI , Megapixel

Download complete File by clicking Download

Preview:
Aspect Ratio:-

The aspect ratio of a geometric shape is the ratio between its sizes in different dimensions. For example, the aspect ratio of a rectangle is the ratio of its longer side to its shorter side - the ratio of width to height when the rectangle is oriented as a "landscape"......................................
DPI:-
Dots per inch (DPI, or dpi) is a measure of spatial printing or video dot density, in particular the number of individual dots that can be placed in a line within the span of 1 inch (2.54 cm). The metric alternative is dots per centimeter (dpcm)........................................

Megapixel:-
The term Megapixel refers to the size of the image usually in reference to a photo from a digital camera or a camera phone.


How to declare 100 random vectors of type uint8 in MATLAB

How to declare 100 random vectors of type uint8. The length of each vector should be 100. Randomly select one Vector with  all other 99 Vectors.Store the distances into new vector D.Sort the vector D in ascending order.Print the top 10 distance with their indexes.

You can call the coding directly in MATLAB by Downloading the following files and calling in MATLAB:

How to Declare a random Matrix M of size N x N in MATLAB

How to Declare a random Matrix M of size N x N.N is a random number(EVEN Number)

You can directly call it in matlab by Downloading the following files.

CODE:

M = uint8(randi([0 255],[88 88]));
p1 = M(1:end/2    ,1:end/2    );

Creating Simple Loading Bar in Turbo c

Study the following Code or download the Code file and place it at C:\TC\BGI




CODE:

#include <graphics.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <conio.h>
  #include <dos.h>



Creating Windows VISTA LOGO

Simply go through the Following coding or Download By clicking Download.Place the downloaded file in C:\TC\BGI

Download

CODE:

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <dos.h>

How to Create Football in turbo C

First initialize Graphics  by adding the following code:

int gd = DETECT,gm;
initgraph(&gd,&gm,"C:\\TC\\BGI");

Set Colour for the ball and background:
setbkcolor(16);
setfillstyle(SOLID_FILL,23);
floodfill(23,50,23);

How to create Moving Bar in Turbo c

Creating moving bar in tubro c is very easy just go through the following code:

You can download the Complete file by clicking Download
Place the downloaded file in C:\TC\BGI

Download


#include<stdio.h>
#include<graphics.h>
#include<conio.h>


void main()
{
int l,i=250,j=400,x=0,y=-1,ch,gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\TC\\BGI");
while(100)

Bouncing ball in turbo c



This program is build by using Turbo c(Dos Box) .Graphic mode are present in BGI folder of TC .Code Sample are given below you can download it by clicking the download button.Place the downloaded file in C:\TC\BGI

Computer-Aided Design (cad)

Computer aided design is a tool used by graphics designers/engineers to analyze, create, edit and maximization of a design. Computer Aided Design is used to increase the skills of a designer to improve the quality of work, it allow a designer to represent a design graphically and view design from any angle with a single click of a button and to zoom in or out for closer and far views. CAD is used to create two or three dimensional (2D or 3D) graphical representations of physical objects.  It is widely used for computer animation and special effects in movies, advertising, and other applications where the graphic design is needed.

Android Studio Project Structure

Android Project Structure In this blog i have explained Android project structure and file organization in detail, by creating a new An...