Dotted line..

Blitz3D Forums/Blitz3D Programming/Dotted line..

Jimmy(Posted 2011) [#1]
I'm creating an algorithm to do lines with certain number of dots, which I use for moving objects and various things. And I want it this way. It's been originally designed from being floating point, but
It's not an approximation though, the endpixel always ends up perfectly. It all works wonderfully but it has this single flaw that I can't seem to correct right now.. It's not very nicely centered so to speak?

Any ideas what it could be? I'm know well some various algorithms such as Bresenham and others, but I cannot see the flaw in this code, it looks symmetrical and correct?
But on screen it does not, If you try the example and go around with the mouse, the endpoint "skips" around abit as it shouldn't

Of course I share the algorithm for you here!

Any ideas what It could be, making it so uncentered?



Last edited 2011

Last edited 2011

Last edited 2011

Last edited 2011


Jimmy(Posted 2011) [#2]
I might have solved it now, and wanted to share it. Marking out the corrected errors with an asterix.



Last edited 2011