2010-09-24

What is Our Life

Hai Dear Friend,




Please Read This Article Atleast Once


This article is not an advice or other thought about life. This is real not reel. We are burn
to live in this world with full confidence and for enjoy all thinks in this world. God is only one who
is director of our life. We are living like mechine.

A man in a city live like absolutly a mechine. Because he wake up early , he just eat what ever
they are, and went to work. What kind of work is that means just an business or an architecture.
What they got in life really means "nothing".

But a man in Village is really living his life well. He wake up early as like a man in urban.
But the village person went to his land and watch his agriculture status and live with all living thinks.
He works for human life.

Urban City Guy work for a mechine.
Village Guy work for a human.

All are work for our stomach not for other thinks.

2010-07-21




Hai This is my New Post

நல்ல தமிழுக்கு நான் தலை வணங்குகிறேன்.

2008-09-20

Vivekananda


SUCCESS

Take up one idea,
Make that one idea your life.
Think of it, dream of it, live on it
Let the brain,. muscles, nerves
every part of your body,
be full of that idea
and just leave other ideas alone
This is the way of success
- Swami விவேகனந்தா

2008-09-16

Resume for youngers

RESUME
Name
Address

Email-ID :
Contact No :

OBJECTIVE:
To contribute my abilities and skills to the dynamic and growing organization that
Offers professional growth while being resourceful, innovative and flexible.


Educational Qualifications







Computer Proficiency


· Operating system : Windows XP, 2000.

· Packages : MS Office, excel, Power point.


Languages

· C,
· C++.


Experiences





Skills:

· Good communication,
· Presentation
· Public Relation Skills.


Area of Interest:

· Web designing.
· Java programming.


Personal details


Father’s Name :

Mother’s Name :

Age & Date of Birth : 18 Years, 27th August 1990

Sex : Male

Marital Status : Single

Nationality : Indian

Languages known : English, Tamil


Other Areas of Interest:

· Music, Sports,
· Browsing ,
· Reading Books.

Declaration

I hereby declare that all the above details furnished by me are true and correct to the best of my knowledge and belief.



Place: (Signature)


Date (Name)

2008-09-15

c Graphics

Graphics in C Language
We will restrict our discussion on Graphics in C Language to 16 bit C programming and MS DOS environment. In a C Program first of all you need to initialize the graphics drivers on the computer. This is done using the initgraph method provided in graphics.h library. In the next few pages we will discuss graphics.h library in details. Important functions in graphic.h library will be discuees in details and samples programmes will be provided to show the power of C programming language.
Graphics mode Initialization
First of all we have to call the initgraph function that will intialize the graphics mode on the computer. initigraph have the following prototype.
void initgraph(int far *graphdriver, int far *graphmode, char far *pathtodriver);
Initgraph initializes the graphics system by loading a graphics driver from disk (or validating a registered driver) then putting the system intographics mode.Initgraph also resets all graphics settings (color, palette, current position, viewport, etc.) to their defaults, then resets graphresult to 0.
*graphdriver
Integer that specifies the graphics driver to be used. You can give graphdriver a value using a constant of the graphics_drivers enumeration type.
*graphmode
Integer that specifies the initial graphics mode (unless *graphdriver = DETECT). If *graphdriver = DETECT, initgraph sets *graphmode to the highest resolution available for the detected driver. You can give *graphmode a value using a constant of the graphics_modes enumeration type.
*pathtodriver
Specifies the directory path where initgraph looks for graphics drivers (*.BGI) first.
1. If they're not there, initgraph looks in the current directory.
2. If pathtodriver is null, the driver files must be in the current directory.
*graphdriver and *graphmode must be set to valid graphics_drivers and graphics_mode values or you'll get unpredictable results. (The exception is graphdriver = DETECT.)
After a call to initgraph, *graphdriver is set to the current graphics driver, and *graphmode is set to the current graphics mode. You can tell initgraph to use a particular graphics driver and mode, or to autodetect the attached video adapter at run time and pick the corresponding driver. If you tell initgraph to autodetect, it calls detectgraph to select a graphics driver and mode.
Normally, initgraph loads a graphics driver by allocating memory for the driver (through _graphgetmem), then loading the appropriate .BGI file from disk.As an alternative to this dynamic loading scheme, you can link a graphics driver file (or several of them) directly into your executable program file.
Here is a sample program that initializes the graphics mode in C Language.
#include
#include
#include
#include
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
/* initialize graphics mode */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* return with error code */
}
/* draw a line */
line(0, 0, getmaxx(), getmaxy());
/* clean up */
getch();
closegraph();
return 0;
}
The graphics programming in c language is discussed in brief to provide an over view to the beginner.
/* Sample program to draw a circle*/
#include
#include
main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,""); /* initialization of graphic mode */
circle(150,150,100);
getch();
closegraph(); /* Restore orignal screen mode */
}
/* End of program */
Normally the screen which u view in DOS is in the text mode which means it is meant for text. And for graphics u need to initialize graphics mode. And for this to happen u need to include ?graphics.h?.
circle(x coordinate ,y coordinate , radius);
The circle command takes a X coordinate which means Vertical axis and Y coordinate which means Horizontal axis. And the last one is the radius of the circle. closegraph();
With out this function the screen mode will still remain in graphic mode and when u come out, to DOS u will see a different screen, which is not in the text mode.
/*A program to draw a space with stars*/
#include
main()
{
int gd=DETECT,gm;
int i,x,y;
initgraph(&gd,&gm,"");
line(0,0,640,0);
line(0,0,0,480);
line(639,0,639,480);
line(639,479,0,479);
for(i=0;i<=1000;i++)
{
x=rand()%639;
y=rand()%480;
putpixel(x,y,15);
}
getch();
closegraph();
}
/* End of program */
/*Here a sample program to illustrate how to use BARS which are used for visual statistics */
#include
main() {
int gd=DETECT,gm,maxx,maxy,x,y,button;
initgraph(&gd,&gm,"");
line(80,150,200,150);
line(80,150,80,50);
settextstyle(1,HORIZ_DIR,1);
outtextxy(100,153,"<-X axis");
settextstyle(1,VERT_DIR,1);
outtextxy(60,50,"<-Y axis");
bar(100,100,120,150);
bar(130,120,150,150);
getch();
closegraph();





















}
Background
As a result of technical advancements in graphics cards, some areas of 3D graphics programming have become quite complex. To simplify the process, new features were added to graphics cards, including the ability to modify their rendering pipelines using vertex and pixel shaders.
In the beginning, vertex and pixel shaders were programmed at a very low level with only the assembly language of the graphics processing unit. Although using the assembly language gave the programmer complete control over code and flexibility, it was fairly hard to use. A portable, higher level language for programming the GPU was needed, so Cg was created to overcome these problems and make shader development easier.
Some of the benefits of using Cg over assembly are:
High level code is easier to learn, program, read, and understand than assembly code.
Cg code is portable to a wide range of hardware and platforms, unlike assembly code, which usually depends on hardware and the platforms it's written for.
The Cg compiler can optimize code and do lower level tasks automatically, which are hard to do and error prone in assembly.
[edit] Details
[edit] Data types
Cg has six basic data types, some of them are the same as in C, others are especially added for GPU programming, these types are:
float - a 32bit floating point number
half - a 16bit floating point number
int - a 32bit integer
fixed - a 12bit fixed point number
bool - a boolean variable
sampler* - represents a texture object
Cg also features vector and matrix data types that are based on the basic data types, such as float3 and float4x4. Such data types are quite common when dealing with 3D graphics programming. Cg also has struct and array data types, which work in a similar way to their C equivalents.
[edit] Operators
Cg supports a wide range of operators, including the common arithmetic operators from C, the equivalent arithmetic operators for vector and matrix data types, and the common
logical operators.
[edit] Functions and control structures
Cg shares the basic control structures with C, like if/else, while, and for. It also has a similar way of defining functions.
[edit] The standard Cg library
As in C, Cg features a set of functions for common tasks in GPU programming. Some of the functions have equivalents in C, like the mathematical functions abs and sin, while others are specialized in GPU programming tasks, like the texture mapping functions tex1D and tex2D.
[edit] The Cg runtime library
Cg programs are merely vertex and pixel shaders, and they need supporting programs that handle the rest of the rendering process. Cg can be used with two
APIs: OpenGL or DirectX. Each has its own set of Cg functions to communicate with the Cg program, like setting the current Cg shader, passing parameters, and such tasks.
In addition to being able to compile Cg source to assembly code, the Cg runtime also has the ability to compile shaders during execution of the supporting program. This allows the runtime to compile the shader using the latest optimizations available for hardware that the program is currently executing on. However, this technique requires that the source code for the shader be available in plain text to the compiler, allowing the user of the program to access the source-code for the shader, some developers view this as a major drawback of this technique.
To avoid exposing the source code of the shader, and still maintain some of the hardware specific optimizations, the concept of profiles was developed. Shaders can be compiled to suit different graphics hardware platforms (according to profiles). When executing the supporting program, the best/most optimized shader is loaded according to its profile. For instance there might be a profile for a graphics card that supports complex pixel shaders, and another profile for one that supports only minimal pixel shaders. By creating a pixel shader for each of these profiles a supporting program enlarges the number of supported hardware platforms without sacrificing picture quality on powerful systems.
[edit] A sample Cg vertex shader
// input vertex
struct VertIn {
float4 pos : POSITION;
float4 color : COLOR0;
};

// output vertex
struct VertOut {
float4 pos : POSITION;
float4 color : COLOR0;
};

// vertex shader main entry
VertOut main(VertIn IN, uniform float4x4 modelViewProj) {
VertOut OUT;
OUT.pos = mul(modelViewProj, IN.pos); // calculate output coords
OUT.color = IN.color; // copy input color to output
OUT.color.z = 1.0f; // blue component of color = 1.0f
return OUT;
}

2008-08-09

Peace of the world

In this world is contain full of worries and evil, so man has tention in his mind. Causes that make him as tention man. so please relax your mind for every one hour. Tips for relaxing mind is given below

  • Keep similing
  • Thinking about nature
  • Prayer
  • Palying with childrens
  • Reading beautiful stories
  • Watching funnyes
  • Free speak with others
  • make others with happy
  • daily 8 hours sleeping

Those make a man with out tentions..................

Please Keep follow them