
Recent Posts

Recent Comments
Archives
 December 2019
 November 2019
 October 2019
 September 2019
 August 2019
 July 2019
 June 2019
 May 2019
 April 2019
 March 2019
 February 2019
 January 2019
 December 2018
 November 2018
 October 2018
 September 2018
 August 2018
 July 2018
 June 2018
 May 2018
 April 2018
 March 2018
 February 2018
 January 2018
 December 2017
 November 2017
 October 2017
 September 2017
 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
 February 2014
 January 2014
 December 2013
 October 2013
 August 2013
 June 2013
 December 2012
 September 2012
 July 2012
 June 2012
 November 2011
 May 2011
 April 2011
 February 2011
 December 2010
Categories
 .NET
 3D
 3D graphics
 ADO.NET
 algorithms
 animation
 API
 arrays
 attributes
 audio
 books
 C#
 C# programming
 calculations
 challenges
 classes
 clipboard
 coding
 combinatorics
 console
 controls
 cryptography
 curve fitting
 database
 debugging
 dialogs
 directories
 Drag and Drop
 drawing
 drawings
 enums
 Event
 events
 example program
 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
 threedimensional graphics
 tips
 tools
 transformations
 Uncategorized
 user interface
 variables
 VBA
 web
 Windows Forms programming
 WMI
 Word
 wpf
 XAML
 XML
Meta
Monthly Archives: November 2015
Platonic Solids Part 5: Cube and octahedron
You may recall from the first article in this series (Platonic Solids Part 1: What are the Platonic solids?) that each platonic solid has a dual. The cube and octahedron are duals of each other. To make a dual from … Continue reading
Posted in algorithms, graphics, mathematics, wpf
Tagged 3D, algorithms, C#, C# programming, cube, dodecahedron, duals, example, example program, graphics, hexahedron, icosahedron, mathematics, octahedron, polytopes, regular polytopes, regular solids, tetrahedron, Windows Forms programming, WPF
Leave a comment
Platonic Solids Part 4: The octahedron
Finding the Octahedron’s Vertices A platonic octahedron has six triangular faces. Because the edges of the triangles all have the same length, the triangles are equilateral triangles. If an equilateral triangle has edges of length 1, then its height is … Continue reading
Posted in algorithms, graphics, mathematics, wpf
Tagged 3D, algorithms, C#, C# programming, cube, dodecahedron, example, example program, graphics, hexahedron, icosahedron, mathematics, octahedron, polytopes, regular polytopes, regular solids, tetrahedron, Windows Forms programming, WPF
Leave a comment
Platonic Solids Part 3: The cube
A platonic cube has six square faces. The cube’s symmetry makes it easy to find the coordinates of its vertices. For a cube with edge lengths of 1, the vertex coordinates are (±0.5, ±0.5, ±0.5) as shown in Figure 1. … Continue reading
Posted in algorithms, graphics, mathematics, wpf
Tagged 3D, algorithms, C#, C# programming, cube, dodecahedron, example, example program, graphics, hexahedron, icosahedron, mathematics, octahedron, polytopes, regular polytopes, regular solids, tetrahedron, Windows Forms programming, WPF
5 Comments
Platonic Solids Part 2: The tetrahedron
A tetrahedron has four faces that are equilateral triangles. In an equilateral triangle, the sides have the same lengths and they meet at 60 degree angles. Figure 1 shows a tetrahedron. Finding the Tetrahedron’s Vertices It is a trigonometric fact … Continue reading
Posted in algorithms, graphics, mathematics, wpf
Tagged 3D, algorithms, C#, C# programming, cube, dodecahedron, example, example program, graphics, hexahedron, icosahedron, mathematics, octahedron, polytopes, regular polytopes, regular solids, tetrahedron, Windows Forms programming, WPF
5 Comments
Platonic Solids Part 1: What are the Platonic solids?
This is the first in a series of posts about the Platonic solids. These posts will show how to find the corners of six Platonic solids: tetrahedron, cube (hexahedron), octahedron, dodecahedron, and icosahedron. Deriving these values requires only algebra and … Continue reading
Posted in algorithms, graphics, mathematics, wpf
Tagged 3D, algorithms, C#, C# programming, cube, dodecahedron, dual, dual solids, example, example program, geometry, graphics, hexahedron, icosahedron, mathematics, octahedron, platonic solids, polygon, polytope, polytopes, regular polygon, regular polytopes, regular solids, solids, tetrahedron, Windows Forms programming, WPF
2 Comments
Add and remove pictures in an Excel worksheet
This is another brief foray into VBA programming. When you click the Insert Image button, the following VBA code executes. ‘ Insert a picture at the selection. Sub Button1_Click() Dim filters As String Dim filename As Variant ‘ Define the … Continue reading
Posted in Excel, Office, VBA
Tagged example, example program, Excel, insert picture, Microsoft Office, Office, remove picture, VBA, Visual Basic for Applications, Windows Forms programming
Leave a comment
Number files in a directory in C#
I recently went on a trip where I took almost a thousand pictures. My phone (which has a pretty good camera) gives the pictures file names such as WP_20151106_22_04_47_Pro.jpg. I wanted an easy way to number files so they have … Continue reading
Posted in directories, files, system
Tagged C#, C# programming, directories, example, example program, files, number files, rename files, system, Windows Forms programming
Leave a comment
Convert a directory’s files to grayscale in C#
The example Quickly convert an image to grayscale in C# explains how to convert an image to grayscale. This program uses the same technique to convert all of the files in a directory to grayscale. (I needed this to prepare … Continue reading
Perform line clipping in C#
The example Perform line trimming in C# shows how to determine what the DrawString method does when the last line of text doesn’t fit horizontally in a formatting rectangle. This example shows how to perform line clipping when the last … Continue reading
Posted in drawing, fonts, graphics
Tagged C#, C# programming, clipping, drawing, example, example program, fonts, FormatFlags, graphics, line clipping, line limit, StringFormatFlags, text clipping, Windows Forms programming
1 Comment
Perform line trimming in C#
Line trimming lets you determine how drawn text ends when it reaches the end of the available space. For example, the text could stop in the middle of a word or it could stop after the last word that fits … Continue reading
Posted in fonts, graphics
Tagged C#, C# programming, example, example program, fonts, graphics, line trimming, trim lines, trimming, Windows Forms programming
2 Comments