Here is the C code for DDA line drawing...
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void main()
{
int gd, gm;
float x, y, dx, dy, len;
int x1, y1, x2, y2, i;
detectgraph(&gd, &gm);
initgraph(&gd, &gm,"");
printf("\n Enter the coordinates of line : ");
scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
dx = abs(x2-x1);
dy = abs(y2-y1);
if (dx >= dy) len = dx;
else len = dy;
dx = (x2-x1)/len;
dy = (y2-y1)/len;
x = x1 + 0.5;
y = y1 + 0.5;
i = 1;
while (i <= len)
{
putpixel(x, y, 6);
x = x+dx;
y = y+dy;
i++;
}
getch();
}
-Suraj.
writ an opengl program for pool game
You can represent an algorithm by three different ways: 1. Pseudo Code 2. Structured flow charts 3. Actual code
An algorithm is a instruction for solving a problem. It is typically illustrated using prose, pseudo code or flowcharts, but other methods exist. The algorithm is the "here's how it's going to work" part of the solution. An implementation (of an algorithm) is a specific expression of this algorithm, using a specific programming language or any other suitable means. The implementation is the "here's how I've done it" part of the solution.
pseudo code algorithm to create a linked list
No. Indeed, algorithms are actually meant for humans, not computers. Computer programmers translate algorithms into working code such that a computer can process the algorithm. The code is actually the implementation of the algorithm, not the algorithm itself.
writ an opengl program for pool game
the code 11110101101 was received using hamming encoding algorithm what was the original code sent
http://www.mathworks.com/matlabcentral/fileexchange/3649
research is going on to develop a source code for median filtering using java
You can represent an algorithm by three different ways: 1. Pseudo Code 2. Structured flow charts 3. Actual code
To find the version of the shader you have, you can typically check the graphics API documentation or your graphics card settings. On Windows, you can use tools like DirectX Diagnostic Tool (dxdiag) or OpenGL Extensions Viewer for OpenGL shaders. Alternatively, you can run a shader code snippet that retrieves the version using GLSL (OpenGL) or HLSL (DirectX) commands to print the shader version in your application.
An algorithm is a instruction for solving a problem. It is typically illustrated using prose, pseudo code or flowcharts, but other methods exist. The algorithm is the "here's how it's going to work" part of the solution. An implementation (of an algorithm) is a specific expression of this algorithm, using a specific programming language or any other suitable means. The implementation is the "here's how I've done it" part of the solution.
coding for car animation in open gl
PEGASIS Cluster Algorithm Code for WSN Omnet++ ?
A algorithm in artificial intelligence is a line of code meant to simulate a human emotion.
The C code for Prim's algorithm can be found in the following link. https://sites.google.com/site/itstudentjunction/lab-programming-solutions/data-structures-programs/program-to-find-minimal-spanning-tree-using--prims-algorithm
pseudo code algorithm to create a linked list