
Recent Posts

Recent Comments
 Make a TextBox preview extender provider in C#  C# HelperC# Helper on Make an extender provider that validates required TextBoxes in C#
 Frank on Calculate interest for a loan in C#
 Make the user enter a float in C#  C# HelperC# Helper on Preview TextBox changes in C#
 RodStephens on Let the user draw polygons, move them, and add points to them in C#
 Günter on Let the user draw polygons, move them, and add points to them in C#
Archives
 August 2017
 July 2017
 June 2017
 May 2017
 April 2017
 March 2017
 February 2017
 January 2017
 December 2016
 November 2016
 October 2016
 September 2016
 August 2016
 July 2016
 June 2016
 May 2016
 April 2016
 March 2016
 February 2016
 January 2016
 December 2015
 November 2015
 October 2015
 September 2015
 August 2015
 July 2015
 June 2015
 May 2015
 April 2015
 March 2015
 February 2015
 January 2015
 December 2014
 November 2014
 October 2014
 September 2014
 August 2014
 July 2014
 June 2014
 May 2014
 March 2014
 February 2014
 January 2014
 December 2013
 November 2013
 October 2013
 September 2013
 August 2013
 July 2013
 June 2013
 May 2013
 April 2013
 March 2013
 February 2013
 January 2013
 December 2012
 November 2012
 October 2012
 September 2012
 August 2012
 July 2012
 June 2012
 May 2012
 April 2012
 January 2012
 December 2011
 November 2011
 May 2011
 April 2011
 February 2011
 December 2010
Categories
 .NET
 ADO.NET
 algorithms
 animation
 API
 arrays
 attributes
 audio
 books
 calculations
 challenges
 classes
 clipboard
 coding
 combinatorics
 console
 controls
 cryptography
 curve fitting
 database
 debugging
 dialogs
 directories
 Drag and Drop
 drawing
 drawings
 enums
 Event
 events
 Excel
 extension methods
 extensions
 files
 finance
 fonts
 formatting
 forms
 fractals
 ftp
 games
 GDI+
 generic
 geometry
 globalization
 graphics
 html
 IDE
 image processing
 inheritance
 interfaces
 internationalization
 internet
 interoperability
 LINQ
 lists
 localization
 mathematics
 memory
 menus
 MessageBox
 methods
 miscellany
 multimedia
 network
 Office
 OOP
 operators
 parsing
 performance
 phone
 PowerPoint
 printers
 printing
 productivity
 programs
 puzzles
 recursion
 reflection
 registry
 regular expressions
 serialization
 settings
 SQL
 stories
 strings
 syntax
 system
 threading
 tips
 tools
 transformations
 Uncategorized
 user interface
 variables
 VBA
 web
 Windows Forms programming
 WMI
 Word
 wpf
 XAML
 XML
Meta
Tag Archives: mathematics
Animate rainbow colors in C#
The example Map numeric values to and from colors in a color gradient in C# draws a color gradient that uses rainbow colors. This example animates that one. When you click on the color gradient, the following code starts or … Continue reading
Animate exploding 3dimensional pie slices in C#
The example Draw 3dimensional pie slices in C# shows how to highlight one or more 3D pie slices by “exploding” them. This example draws even more attention to the exploded pie slices by animating their explosion. The program controls the … Continue reading
Posted in algorithms, animation, graphics, mathematics, multimedia
Tagged 3D pie slice, 3dimensional pie slice, algorithms, animated pie slices, animation, C#, C# programming, DrawPie, example, example program, FillPie, graphics, mathematics, multimedia, pie chart, pie graph, pie slice, threedimensional pie slice, Windows Forms programming
Leave a comment
Calculate where a line segment and an ellipse intersect in C#
Finding the intersection between a line segment and an ellipse requires a lot of mathematics. It’s not particularly hard mathematics, but if you’d rather skip it, you can use the following links to jump to the other parts of this … Continue reading
Posted in algorithms, drawing, geometry, graphics, mathematics
Tagged algorithms, C#, C# programming, drawing, ellipse, ellipse line intersection, ellipse/line intersection, example, example program, geometry, graphics, intersection, line, line ellipse intersection, line segment, line/ellipse intersection, mathematics, Windows Forms programming
5 Comments
Produce a repeatable series of “random” numbers in C#
The Random class can generate a series of pseudorandom numbers. They’re called “pseudorandom” rather than “random” because the numbers are generated by a mathematical algorithm rather than by some completely unpredictable process such as observing a source of radioactive decay … Continue reading
Book Review: The Manga Guide to Linear Algebra
(Occasionally I post reviews of book that I think may interest programmers, in this case admittedly only those with a mathematical inclination.) The Manga Guide to Linear Algebra $24.95, 264 pages, 2012 By Shin Takahashi No Starch Press ISBN … Continue reading
Posted in books, mathematics
Tagged book reviews, books, C#, C# programming, example, example program, linear algebra, mathematics, Windows Forms programming
Leave a comment
Make extension methods to generate random double values in C#
This example adds extension methods to the Random class to generate double values within a specified range. The Random class provides methods for generating pseudorandom numbers. The Next method has three overloaded versions that produce a nonnegative integer, an integer … Continue reading
Calculate the present value of a future amount of money in C#
This example shows how to calculate the present value of a future amount of money. Suppose you want a certain amount of money in a given number of years and you know you can realize a specific interest rate (compounded … Continue reading
Compare the performance of simple arithmetic operations in C#
I saw a post the other day that said division was the slowest arithmetic operation so I wrote this example to see exactly how the performance of multiplication, division, addition, and subtraction differ with floating point numbers. When you click … Continue reading
Posted in mathematics, performance
Tagged addition, C#, C# programming, division, example, example program, mathematics, multiplication, performance, speed, subtraction, Windows Forms programming
1 Comment
Make a 3D globe in WPF and C#
This example shows how you can draw a 3D globe. More generally it shows how you can make a threedimensional textured sphere in WPF. The example Draw smooth spheres using WPF and C# shows how to make smooth colored spheres. … Continue reading
Posted in algorithms, drawing, geometry, graphics, mathematics, wpf, XAML
Tagged 3D, 3D globe, algorithms, C#, C# programming, drawing, example, example program, geometry, graphics, mathematics, sphere, tectured sphere, texture, Windows Forms programming, WPF, XAML
Leave a comment