Posts: 9
Threads: 2
Joined: Mar 2003
I originally had this post in the Programming Help section but thought it would probably be better here. Im trying to draw a line from x1,y1 to x2,y2 in text. I was told to use Bresenham's Algorithm but all of the examples i found were in c code.
Posts: 3,288
Threads: 167
Joined: Nov 2001
Posts: 9
Threads: 2
Joined: Mar 2003
Okay, that looks like it would have what im looking for but im not sure about what to do with it. I messed around with it but i couldnt get anything to show up on the .bas version.
Posts: 3,288
Threads: 167
Joined: Nov 2001
Have you ever tried to read the DOC?
Posts: 2,020
Threads: 24
Joined: Jun 2002
blast! library comes with one as well.
or you could type in "bresenham line" into google and end up with many, many routines.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Posts: 1,845
Threads: 44
Joined: Aug 2002
the old, but working Search Engines
Posts: 9
Threads: 2
Joined: Mar 2003
That demo is for lines in screen 13 and i dont understand much of the code. Im just looking for something simpler (if there is anything) that would print in text. For example:
X
.
.
.
.
.
.
X
with no gaps in the line
I have checked google a lot ,of course, and it either doesnt have what im looking for or i dont know what to look for.
Posts: 9
Threads: 2
Joined: Mar 2003
I HAVE found exactly what im looking for, but it is in C code. Is this of any value to me? I know nothing about programming in c.
Posts: 3,368
Threads: 195
Joined: Jan 2003
nathan posted an answer to this.
Replace PSET (x, y) with:
LOCATE y, x: PRINT "X";
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 9
Threads: 2
Joined: Mar 2003
I dont understand all that sub stuff. I run the program and nothing happens. and when i go to the rel.line i dont even see pset?