Awesome Open Source
Awesome Open Source


SharpMath is a C# math library supporting vectors, matrices, linear equation systems, expression parsing and soon more advanced analysis. Specials thanks go to NikxDa who wrote the Canvas2D control for representing vectors and functions graphically.


Class Diagramm

2D and 3D-Geometry

SharpMath offers many structs, such as points, vectors, lines and matrices. These are basically also used in games/computer graphics, except that they're a bit more extensive and sophisticated. Thus, the game engines provide some more flexibility and possibilites than SharpMath. Nevertheless, you can perform simple operations (such as rotating, scaling or translating objects defined through vertices) in space and project everything onto a two-dimensional surface.


Linear equation systems

SharpMath can solve linear equation systems using the Gauss-Jordan algorithm internally by representing the equations as matrices.

Expression Parsing

SharpMath knows most of the functions, constants and operators used in computations. You can provide the parser with an input string containing your expression and it will return the result when calling the corresponding function. The flexibility of the parser allows you to add further operations. This feature may be used for calculators.



SharpMath provides a two-dimensional canvas control for representing vectors and functions graphically in your application. It was written by NikxDa. A three-dimensional representation (e.g. for vectors, points and lines) will follow as well. Thanks to the Geometry-namespace, the implementation of this one should not be too hard as the projection onto a two-dimensional surface can be done using the integrated matrices. Canvas2D

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
c-sharp (12,284
library (1,316
dotnet (885
parser (514
canvas (372
math (225
matrix (138
vector (113
geometry (112
calculator (68
draw (61
tokenizer (50
polygon (38
function (26
expression (24
vectors (20
matrices (19