gwycon.com
Silverlight, WPF and C# .NET development
User NamePassword

26
Jan


Click the video above for a demo of Polynomial Explorer.

Polynomial Explorer is an application developed in C# using Visual Studio 2008. It was written to graph and display a polynomial equation with terms included up to the 6th degree (x6). Any combination of terms can be displayed and each term is controlled by a slider to alter a terms coefficient value. The user interface has been designed so that the equation is displayed clearly and the terms can be altered in an intuitive method via the slider controls. continue

Category : C# | Mathematics | Blog
10
Jan

In many graphics applications it is often necessary to know the distance between two points or pixels, such as collision detection in games. Here, we are just interested in calculating the distance between pixels in 2D. However, it is not that much more complicated to extend this to 3D and we will be covering this at a later date. Anyway, back to our 2D example.

We can determine the distance from one known pixel co-ordinate to another using some simple trigonometry. In the figure below we would like to calculate the distance from point a to point b. These could be any two pixels on the screen with co-ordinates (x1,y1) and (x2,y2) respectively.

The distance from a to b is calculated using Pythagoras’ theorem, as long as the co-ordinates of the two points are known. First we need to know the vertical difference between the points (y2-y1) and the horizontal difference (x2-x1) as show below. continue

Category : Graphics | Mathematics | Blog