-
point to point
I have a program which will have small rectangles following a line or path from point A to point B. Does anyone have a snippet of code that will figure this out along the way from A to B or B to A. They will be painted every 20 milliseconds and increase i pixel length or more so i have to know what the next MIDpoint is.
Thanks
robarm4
-
Draw it out on paper, and figure out the geometry.
-
Ya i have tried to do that many times but i am bad a geomatry. I Will have many lines randomly produced so It will be different every time. Just need a working formula i guess
robarm4
-
Game programming is going to get hard in a hurry if you're not comfortable with 2D and 3D geometry.
Maybe get some maths text books (or http://mathworld.wolfram.com/topics/Geometry.html)