Another page completed. I have just published the latest page on my website. The page title is Mensuration, and no, it has nothing to do with the monthly periods. Mensuration is a branch of mathematics that deals with the measurement of geometric figures such as squares, cubes, rectangles and cones etc. This page deals only with plane figures or 2D objects, as I hope to publish a second page on solid objects in the future.
The idea for this page was because I was looking for contents for a page of the www.enviroengineer.scot website that would be fairly quick to write and publish. I decided to look through some of my engineering pocket books for inspiration. For anyone new to engineering an engineer’s pocket book was something that engineers consulted for information, charts and tables before the internet and websites such as Wikipedia, although pocket books are still available in the shops.
A few pages into the pocket book and I found exactly what I needed, a section under engineering mathematics on mensuration. That would be quick and easy to write up, as I could still remember most of the equations needed to work out areas and perimeters. How wrong could I have been.
To follow my website structure, I decided to include an SMath calculation sheet along with the web page information. This would allow visitors to the page to access a live calculation sheets so that they could enter their own variables and get instant results on their own laptop or mobile. However, since the background of my web pages are dark grey and the background of my SMath document was white, I would need two versions of each graphic figure. One would need to be transparent with black lines and text, while the website version would need to be dark background with white lines and text.
I used AutoCAD to produce the graphic images of everything from a simple square to an ellipse. AutoCAD normally has a default dark background in model space so text and lines are displayed as white, but when printed these are converted to black to show up on paper. This meant I had to produce two drawings of each geometric figure, one normal and a second with all the text using colour index 255, which is white on screen and prints out as white not black. I now had to transfer the AutoCAD drawings into Photoshop to add the equations and SMath Desktop to provide graphics for the calculation sheet. The easiest way to get AutoCAD drawings into Photoshop is to use portable document format (PDF). AutoCAD can export drawings in PDF and Photoshop can import PDF.
Once loaded into Photoshop it was easy to save the SMath version of the graphics as portable network graphic (PNG) file. This could then be loaded into SMath. The website version of the graphics had to have a background layer to match the background of my website and the equations were added in Photoshop. Although AutoCAD has good text features the character set and glyphs in Photoshop meant the more complex equations could be created fairly easily. The Photoshop finished images were quite big with widths in excess of 3,000 pixels. The website software I was using automatically resized the images when they were uploaded. This produced images and text that was blocky and difficult to read on the web page. To get around this I resized the image in Photoshop before uploading to the website.
I still wanted visitors to view or if they preferred to download the graphics, so I needed another way to produce a larger image. PDF once again came to the rescue and I saved each image as a PDF that could be uploaded to the website. Visitors could now look at web page and see the diagrams of each figure. These were PNG files, but if they clicked on the diagram a larger PDF file was displayed. As you will realise this fairly quick web page to write had taken hours of work to produce all the AutoCAD drawings in two colour schemes and then produce three separate image files for each graphic on the web page.
My problems didn’t end with the graphics. Most of the area, perimeter and centroid equations were straight forward, the ellipse did cause an additional problem. I had known that the equations I used for calculating the perimeter were only approximations, but at the time I had just accepted the shortcoming. However, I wanted to provide accurate methods for calculating the areas and perimeters and the ellipse was no different. I was aware that many of the calculations were only approximations, especially those involving Pi, but as long as Pi is to 4 or 6 decimal places the error is going to be minimal. I wasn’t sure about the approximations for the perimeter of an ellipse.
The only way to get an accurate value for the perimeter of an ellipse was to use calculus. Now I have used calculus in the past, but if it is compared to riding a bike, I am afraid I am still using the stabilisers. I had no idea how to integrate the perimeter of an ellipse, so I started a web search to find out. There were lots of Maths websites offering online calculators for the ellipse, most just used one of the approximations I already was aware of or didn’t divulge the equations used.
There were lots of websites that demonstrated how to use calculus to find the circumference of an ellipse. The best website was Wikipedia, although I had to trawl through rows of equations to find what I was looking for. Two thirds of the way down the page I found equation I was searching for. Next, I needed to find the same equation on another site to confirm that I was using the correct equation. I carried out searches for using integration to find the circumference of an ellipse. I found several sites including Youtube videos demonstrating how to calculate the circumference. I found several different equations including versions from Cornell University, Circumference of an Ellipse collected by Paul Bourke, Columbia College and the organic chemistry tutor. The Paul Bourke equation agreed with the one I used from Wikipedia, but all the others the structure of the equation varied slightly. The one thing they all agreed upon was the result when the same variables were applied. So, I now have several methods for calculating the circumference of an ellipse.
My new web page is now available on my website https://www.enviroengineer.scot/mensuration.asp please visit the webpage, but remember this blog about how it was created.