1
Programming / Re: Diagonal Hallways.
« on: August 24, 2011, 06:36:09 AM »Most people just use Bresenham's Line Algorithm or similar.
http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
Thanks!! Looks like it will work!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Most people just use Bresenham's Line Algorithm or similar.
http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
A * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * B
A . * * * * * * * * * * * * * * * * * * * * * * * *
* . . * * * * * * * * * * * * * * * * * * * * * * *
* * . . * * * * * * * * * * * * * * * * * * * * * *
* * * . . * * * * * * * * * * * * * * * * * * * * *
* * * * . . * * * * * * * * * * * * * * * * * * * *
* * * * * . . * * * * * * * * * * * * * * * * * * *
* * * * * * . . * * * * * * * * * * * * * * * * * *
* * * * * * * . . * * * * * * * * * * * * * * * * *
* * * * * * * * . . * * * * * * * * * * * * * * * *
* * * * * * * * * . . * * * * * * * * * * * * * * *
* * * * * * * * * * . . * * * * * * * * * * * * * *
* * * * * * * * * * * . . * * * * * * * * * * * * *
* * * * * * * * * * * * . . * * * * * * * * * * * *
* * * * * * * * * * * * * . . * * * * * * * * * * *
* * * * * * * * * * * * * * . . * * * * * * * * * *
* * * * * * * * * * * * * * * . . * * * * * * * * *
* * * * * * * * * * * * * * * * . . * * * * * * * *
* * * * * * * * * * * * * * * * * . . * * * * * *B
A . . * * * * * * * * * * * * * * * * * * * * * * *
* * . . . * * * * * * * * * * * * * * * * * * * * *
* * * * . . . * * * * * * * * * * * * * * * * * * *
* * * * * * . . . * * * * * * * * * * * * * * * * *
* * * * * * * * . . . * * * * * * * * * * * * * * *
* * * * * * * * * * . . . * * * * * * * * * * * * *
* * * * * * * * * * * * . . . * * * * * * * * * * *
* * * * * * * * * * * * * * . . . * * * * * * * * *
* * * * * * * * * * * * * * * * . . . * * * * * * *
* * * * * * * * * * * * * * * * * * . . . * * * * *
* * * * * * * * * * * * * * * * * * * * . . . * * *
* * * * * * * * * * * * * * * * * * * * * * . . . *
* * * * * * * * * * * * * * * * * * * * * * * * . .
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * *B
A . * * * * * * * * * * * * * * * * * * * * * * * *
* . . . * * * * * * * * * * * * * * * * * * * * * *
* * * . . * * * * * * * * * * * * * * * * * * * * *
* * * * . . . * * * * * * * * * * * * * * * * * * *
* * * * * * . . * * * * * * * * * * * * * * * * * *
* * * * * * * . . . * * * * * * * * * * * * * * * *
* * * * * * * * * . . * * * * * * * * * * * * * * *
* * * * * * * * * * . . . * * * * * * * * * * * * *
* * * * * * * * * * * * . . * * * * * * * * * * * *
* * * * * * * * * * * * * . . . * * * * * * * * * *
* * * * * * * * * * * * * * * . . * * * * * * * * *
* * * * * * * * * * * * * * * * . . . * * * * * * *
* * * * * * * * * * * * * * * * * * . . * * * * * *
* * * * * * * * * * * * * * * * * * * . . . * * * *
* * * * * * * * * * * * * * * * * * * * * . . * * *
* * * * * * * * * * * * * * * * * * * * * * . . . *
* * * * * * * * * * * * * * * * * * * * * * * * . .
* * * * * * * * * * * * * * * * * * * * * * * * *B
1 Itteration:
5 4 5
4 7 4
5 4 5
2 Iterations:
5 4 4 4 5
4 5 4 5 4
4 4 7 4 4
4 5 4 5 4
5 4 4 4 5
3 Iterations:
5 7 4 6 4 6 4 6 5
6 6 6 6 6 6 7 6 7
4 7 5 7 4 7 5 7 4
7 6 7 7 7 7 7 6 7
4 7 4 7 7 7 4 7 4
7 6 7 7 7 7 7 6 7
4 4 5 4 4 4 5 4 4
4 6 4 6 4 6 4 6 4
5 4 4 4 4 4 4 4 5
4 Iterations:
5 4 7 4 4 4 6 4 4 3 6 3 4 3 6 3 5
3 8 4 7 4 7 4 7 4 7 4 7 4 7 4 8 4
6 4 6 4 6 4 6 4 6 4 6 4 7 4 6 4 7
4 7 4 8 4 8 4 7 4 7 4 8 4 8 4 8 4
4 4 7 4 5 4 7 4 4 4 7 4 5 4 7 4 4
4 8 4 8 4 8 4 8 4 8 4 8 4 8 4 8 4
7 4 6 4 7 7 7 7 7 7 7 7 7 7 6 7 7
7 8 7 8 7 8 7 9 7 9 7 8 7 8 7 8 7
4 7 7 7 4 7 7 7 7 7 7 7 4 7 7 7 4
7 8 7 8 7 8 7 9 7 9 7 4 7 4 7 4 7
7 7 6 7 7 7 7 7 7 7 7 7 7 7 6 7 7
7 3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 7
4 7 4 7 5 7 4 7 4 7 4 7 5 7 4 7 4
7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7
4 7 6 6 4 6 6 6 4 6 6 6 4 6 6 6 4
6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6
5 3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 5
......T....T~~~..T~~~~TT~~TT.......~.....T.....T.
..........~~~~~~..~~...~TT.T....TT...............
........~~.T~~T~~..T.~.~........TT.~.............
..T...~~~~..~.~~.~~.T.~..T...T...............T.T~
.....~..~...~~~~~~~......T.T.T.....T..........T.T
.~~.T..~.~...~~~~~~~~~...........T.......T.......
...~...T.~.T.~~~~.~T~..............T.T...........
..~~~....~..~.~.~~~................T..TT........T
..~...~~..~.~~~~.T..T.......T....T...............
T~~.TT~......T.~~............~...T...............
.~TT....T...T...TT......T...~~~..................
...........~.~.~~............T.....T....T........
.~.........TTT~~~....T.....T.~...T...........T...
~~~...........~.~.T.....T........T.T.............
~TT...........~..T........T.~.T...T..............
...............T......~.......~...~..T......T..T.
...........T...~...T.~~..TT..~~...T..............
after 1 smoothing pass
......T....~~~~~..~~~TT...T......TT......T..TT...
.......T...~~~~~~~~.....T......TTTT........TT.TT.
.......~~~.~~~~~~~~....TT....TTTT..........T..TT.
....T...~...~~~~~~~....TT.........T........T...T~
TT.TTT..~...~~~~~~~~~...........TTT.............T
....T...~...~~~~~~~~~.T...........T..............
....TTT.....~~~~~~~~.T..........TTT..............
....TTT.....~~~~~~..T...........................T
.~..T...TT..~~~~~...T.........T..................
....TT..TT........T....TTT.T.....................
~.........T.............TTT......................
...T......TT...~...........T.....................
~~.T......................TT.TT..TT..............
~.T..............T...TTT.TTT.TTTTT...............
.T..........T....T.T.TTT..T.....TTT..............
...........TTT..TTTT..T...T....TTT...............
...........T...~...T.~~..TT..~~...T..............
after 2 Smoothing Passes
........T..~~~~~~~~~.....T.....TTT........TTTTT..
......T...~~~~~~~~~~....T......TTT.........TT.TT.
.....T.....~~~~~~~~~....T.....TTTT.........TTTTT.
..TTT......~~~~~~~~~~..T........TT.............T~
T..TTT.....~~~~~~~~~~..T.........T..............T
...........~~~~~~~~~..T.........TT...............
.....T.....~~~~~~~~..T..........TT...............
............~~~~~~...T..........................T
.....TTT.....~~~~...T...TT.TTTTT.................
....TTTTTT........T.....TTTT..TT.................
....T.....T.......T......TTT..TT.................
~..T.......T......T......TT...TT.................
~...........T.....T....TTTT..TTTTT...............
..T.........T....TTTTTTTTTT....TTT...............
T...........T....TTTTTTT.TT.....TT...............
...........TT....TT......TT....TT................
...........T...~...T.~~..TT..~~...T..............
After 3 Smoothing Passes
......T...~~~~~~~~~~....TT.....TTT.........TTTT..
.....TT...~~~~~~~~~~....TT....TTTT.........TTTTT.
....TT....~~~~~~~~~~~...T.....TTTT.........TTTTT.
TTTTT.....~~~~~~~~~~~..TT......TTT............TT~
..........~~~~~~~~~~~..T.......TTT.............TT
..........~~~~~~~~~~..TT.......TTT...............
...........~~~~~~~~...TTT.....TTTT...............
...........~~~~~~~...TTTTTTTTTTTT...............T
............~~~~~...TTTTTTTTTTTT.................
.....TTTT.....~~...T....TTTT..TT.................
....T....TT.......TT....TTT...TTT................
~..T......TT......TT...TTTT...TTT................
...........T......TTTTTTTTT....TTT...............
.TT........TT.....TTTTTTTTT.....TT...............
...........TT.........TTTTT.....TT...............
...........TT..........T.TT....T.................
...........T...~...T.~~..TT..~~...T..............
Hang in there fighting the good fight JayPC, bound to get things knocked out at some point and there are many helpful folk around here to boot.
1)Great Idea
2)Research in building great Idea
3)attempt building great Idea but get stuck
4)Draw Concept art to fill void of great Idea
5)Determine that my art isent what I really wanted to go for and start over
6)Determine tis new art is no good but would totaly work for my next... See step 1