Tag Archives: vectors

Use vectors to manage bouncing balls in C#

This example is similar to the one Use sprites to animate several bouncing balls in C# except it uses vectors to store information about the balls. A vector is a direction represented by X and Y coordinates. For example, the … Continue reading

Posted in algorithms, animation, audio, geometry, graphics, multimedia | Tagged , , , , , , , , , , , , , , , , , , , | Leave a comment

Draw lines with arrowheads in C#

If <vx, vy> is a vector between two points, then <-vy, vx> and <vy, -vx> are perpendicular vectors of the same length. If you add and subtract these vectors from the original one, you get new vectors that make a … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , | 3 Comments