Here's a code for scan conversion of a line using DDA algorithm.... but i guess there's some problem in the sense that not every kind of line is getting plotted properly (at least that's what i think)... check it out plz...
[code=c]
/*start*/
#include <graphics.h>
#include <stdio.h>
void drawaxes();
void slopelessthanon e(double,double ,double,double) ;
void slopegreatertha none(double,dou ble,double,doub le);...
User Profile
Collapse
-
scan conversion of line (DDA algorithm) using graphics in c
Last edited by sicarie; Aug 13 '07, 02:32 PM. Reason: Code tags are to the right as you create or reply to a thread. Please use them. -
graphics in c
following is a code for scan converting a line using DDA algorithm. But I'm not getting any line segment in the output. The code is:
/*start*/
#include <graphics.h>
#include <stdio.h>
float m;
main()
{
int x1,y1,x2,y2;
float dx,dy;
void slopelessthanon e(int,int,int);
initgraph(&gdri ver, &gmode, "c:\\tc\\bg i");
printf("Enter coordinates... -
Some problem installing pygame
Im working in red hat linux 9.0. I've downloaded the pygame package
but there is some problem while installing it. For the tar version, initial steps execute OK, namely,
[root@localhost root]# tar xzvf pygame-1.7.1release.ta r.gz
[root@localhost root]# cd pygame-1.7.1release
but after this:
[root@localhost pygame-1.7.1release]# ./configure
bash: ./configure: No such file or directory
So i don't... -
@bartonc....Yes got it! That link you gave is truly out of this (cyber)world! Thanx a lot! -
Error while installing Python2.5.1 on red hat 9
I use red hat 9 which comes with python2.2 installed in it. Wanting to
use the latest version, i downloaded python 2.5.1 from the official
python website. After downloading, i performed the following steps,
but there is some error during the configuration process and hence i'm
not able to run the "make" command after this. Following is the
sequence of events that happened in my terminal:
... -
How to create and save python program files?
Im working with Python 2.2 on my red hat linux system. Is there any way to write python codes in separate files and save them so that i can view/edit them in the future? Actually I've just started with python and would be grateful for a response. Thanx! -
Problem with following Prime Number Generator code
I've been having problem with the following code. It's supposed to
print the prime numbers between 10 and 100. But i'm not getting any
output, i.e. i guess the outer 'for' loop is being traversed only
once. I would be greatful if you could help me out. Thanx![CODE=python]
>>> f=1
>>> for i in range(10,100):
... for j in range(2,i):
... if i%j==0:
......
No activity results to display
Show More
Leave a comment: