Im trying to make a program that involves moving a 2d object from one point to another. It must be able to vary in speeds, but always move in a straight line. Can someone give me the Bresenham Line Algorithm in java that could do this? (any other fixes would work too :D
Copyright © 2024 Q2A.MX - All rights reserved.
Answers & Comments
Verified answer
A google for
java Bresenham Line Algorithm
has the original and the simplified. If you want precision 2D animation, check out the book 'Filthy Rich Clients'. The web site for the book has the NetBeans project files. Animation is about 200 lines of code.