Saturday, December 31, 2011

Field Measurement of Quadrilaterals Using Only a Tape Measure

Trapezoids
A common nonrectangular area that needs to me measured in the field is a trapezoid. Sometimes shapes are approximated by a trapezoid, if a rectangle is not considered a reasonable approximation or not easily visualized. The well-known formula for the area of a trapezoid is

                        clip_image002

where b1 and b2 are the lengths of the two parallel sides and h is the distance between them (measured perpendicularly to the parallel sides, of course). It is noteworthy that the (b1+b2)/2 can be interpreted as the average of the lengths of the parallel sides. This is the length of a line referred to as the median of the trapezoid. In the field, it is often more convenient/faster to measure the median and the height (h, also called the altitude) than to measure both bases and the height. If the location of the median can be “eye-balled” with sufficient precision for the purposes being met, this may increase productivity by decreasing the number of measurements needed. For more information on the trapezoid and the median, see a description here.
General Case Quadrilateral
There are (at least) two approaches to measuring the area quadrilaterals when nothing is known about the internal angles or “parallelness” of nonadjacent lines. The following diagram displays both methods.

We can determine the area of this shape by making 5 measurements and produce an exact picture, or by taking 3 measurements and getting an approximate area. Both are “area by triangles” methods.
Area by Triangles – Heron Method
If we measure the sides AB, BC, CD, DA, and one of the diagonals (either AC or BD), we can use Heron’s theorem to determine the area of the triangles on either side of the chosen diagonal. We can use the law of cosines and law of sines to determine the angles. Alternatively, a basic AutoCAD drawing using temporary construction-line circles would allow you to determine these results without manual calculations. This would give us a full description of the area. This method also generalizes well to an arbitrary number of sides (but requiring a lot of measurements--don't use this method).
Area by Triangles – By Altitude
On the other hand, we could measure the length of a diagonal (say, AC), leave the measuring tape in place (or replace with a string line) and use a second tape measure to measure from the other vertices (B and D) to the diagonal. As long as the accuracy/precision of the result desired is not too high, we can “eye-ball” perpendicular to the diagonal to get the heights of the triangles to an acceptable accuracy. The area calculation is obvious from there. This method involves fewer measurements, minimal extra equipment, and is quicker to calculate, which may make it more efficient for a quadrilateral. It does not generalize to an n-sided figure as easily as the previous method, but could be done with additional string lines used simultaneously.

Tuesday, December 20, 2011

Introducing the Twisted Plane

This idea is motivated by something that comes up often in the world of surveying. Not always do we have simple straight lines, and not always do we have a simple plane. Here is an example of the situation in plan view:


You may know that three points define a plane and that an arbitrary fourth point, may not be on the same plane. We can unambiguously define the elevation of every point on the outside of our rectangle by "stringing a line" (which is surveyor-speak for straight interpolation). We want the elevations we would get if we pulled a string really tight all the way around the outside of the rectangle. (If you care about the units, call them meters, but they are not really the point of this example.)

What about arbitrary points on the interior of the rectangle?  It is possible to use interpolation schemes to determine the elevation of a point on the interior of a plane such that it will coincide with the plane. But in the above situation, we have four points that are not coplanar.  A common, and highly adaptable, solution to this problem is to break our region up into triangles.  There are two ways we could do this.

Case 1
Notice that in case 1 the elevation at the midpoint of the diagonal line would be 100.125 m.

Case 2
On the other hand, the elevation at the middle of the diagonal line drawn in case 2 would be 100.000 m.

The general case of this sort of procedure - breaking a region up into triangles - is called creating a triangular irregular network (TIN) and is a well established method.  The fact that there may be multiple solutions which are not equivalent does not normally concern us.  We just pick one that works because all we care about is that the water will run.  In a complex plan, it is not uncommon to see the choice of lines given on the plan.  As a surveyor you like to see that as it mean the ambiguity of your job is largely removed.

When it comes to disadvantages, the first thing that is noteworthy about the TIN is that triangles and graders (or their operators) do not like each other very much. Although the grader is a very versatile machine, it still likes following a line. Rectangles are ideal. Look up at case 2 and pretend you're driving a grader, starting from the SW corner and proceeding to the SE corner. As you approach the SE corner, you have a problem: you've got two edges that you are trying to put the blade against. This is frankly infeasible. If this is a very large area (5 miles by 8 miles), we don't care, because the tricky spot is so small compared with the total area.  For a smaller area, this might be significant. So what happens? The watchword is "blend", which basically means the grader operator is supposed to figure it out himself and "make it work."

So, can we model this "blending"? (I don't mean just at the diagonal edge, I want to get rid of that.) Can we figure out what the math looks like that describes the result which the grader (operator) would produce if given four corner points on a small, rectangular area and told to "blend" and "make it work"? If we can do this, then we can apply this same method to areas too big for the grader to cover in just one or two passes. Or apply it to the problem of setting grades on concrete islands that are on such a surface. I call it a twisted plane and it allows us to completely discard the diagonal line.

A twisted plane is a surface formed by using a line (segment) and "sweeping" laterally while changing its angle. The line segment is just like the blade of a grader running from one edge of the rectangle to the opposite side. If the width of our rectangle was exactly the width of the grader blade, it would begin with north end of the blade at elevation 99.50 m and the south end at 100.00 m at the west edge of the area. As the grader proceeded to the east the blade would gradually change its angle from having 0.500 m fall from south to north to having 0.250 m fall from the south to north. (The realities of grading are somewhat swept under the carpet for the sake of simplicity.) Here is an attempt to show what the terrain would look like:

GNU plot of "twisted plane" performed using Maxima

We will now proceed to develop the equation which describes this surface.  Let's start with a fresh diagram that uses variables in it:

For completeness, here are the equations for the elevations of the north, south, east, and west line elevations (we take the south-west corner as the origin):





Now, to determine the elevation at any point on the interior, we can use the west and east lines and do straight interpolation across them like so:


This produces the equation:

If we were to use the north and south lines and interpolate across them instead, we would get:


In both cases the resulting equation is

Tuesday, December 6, 2011

Volume Under a Twisted Plane

If you want to know what a twisted plane is, check out my previous post on it.  Basically, a twisted plane is what you get if you take a plane and twist it and the application I have in view is surface modelling.  In that previous post, I developed the equation of this surface as defined by the (x, y, z) coordinates at the 4 corners of a rectangular area (rectangular in plan view).  For review, that equation is


In construction estimation, it is often necessary to measure volumes of material to be excavated or filled in.  To do so, we need to be able to turn elevation and position data into volumes.  A common approach is to find average depths and multiply by the relevant area.  If the depths are different in different areas, the average will need some kind of weighting or the areas treated separately and summed afterwards for a total.  If using a TIN to model a surface, volume calculations are straightforward and fit this idea of using an average depth and multiplying by the area.  (I have the derivation here.)

So, an interesting question that remains, is whether the twisted plane is as well behaved.  The answer is yes, the derivation is straightforward (but tedious to write and is omitted), and the result is


(The result is obtained by integrating z(x, y) for x over [0, length] and then y over [0, width].)

Sunday, November 6, 2011

3D Analogue to the Trapezoid (part 2): Truncated Pyramid

Since I wrote the post entitled 3D Analogue to the Trapezoid, I have learned that people already have something in mind when they type in terms to this effect. They are interested in a truncated pyramid. In the aforementioned post, I described a shape, namely, an irregular triangular prism, that was analogous to a trapezoid in terms of its volume formula (the proof is located here). Now, we look at a shape that is analogous to a trapezoid in terms of its appearance, but has an only loosely analogous volume formula.


The first observation we might make is that pyramids are really not very different from cones from a volume perspective. The simple volume formula for both is given by

                                 clip_image004

where B is the area of the base and h is the height of the cone. This is true regardless of the shape of the base. The only requirement is that the same shape must continue all the way to the peak. In more technical language, the cross-section of the pyramid at distance b below the peak must be similar to the base and the corresponding linear dimensions must be in the ratio b:h. So, given a dimension of length d in the base, the corresponding dimension in the cross-section at b below the peak must have length d(b/h). This is part of the definition of a pyramid. At this point, a well-known, fancy theorem may be in order.

Theorem. Let A and B be similar (2-dimensional) shapes. Then,
Corresponding linear dimensions have a ratio of a:b if and only if the areas of A and B (or corresponding subareas) are in the ratio a2:b2.

In theorem form, this might seem like it’s from outer space, but notice how simply that works out with squares and circles. For example, if one square has a side of a and another of side b, then their areas are a2 and b2, respectively. The converse is obviously true as well, and it is the converse we will need.

Suppose we take the area of the top surface to be B1 and the area of the bottom surface to be B2. Also, take a to be the height of the part of the pyramid that has been removed and h to be the height of the truncated pyramid. Here’s a front orthographic view of the pyramid with the cut off part added back to the top:
                                     
                                   clip_image006

Our theorem then tells us that

                                         clip_image008

If we solve for a, we get

                                          clip_image010

The volume of our truncated pyramid is simply the volume of the full pyramid minus the volume of the part that has been cut off (truncated off):

                                         clip_image012
                                        clip_image014
                                        clip_image016
                                        
                                            clip_image020

It is noteworthy that we could have calculated a without calculating the areas B1 or B2. But we would need to know the ratio between a pair of corresponding sides, say d1 and d2 (see diagram below).

                                           
We would calculate a according to

                                                    clip_image024
which gives

                                                     clip_image026

Our volume formula will look a little nicer:

                                 clip_image028
                                    clip_image030
                                    clip_image032
                                    clip_image034
                                    clip_image036
                                    clip_image038
                                
                     
Letting r = d2/d1, we get


                             


The first volume formula makes somewhat of an analogy with the area formula of a trapezoid: We are taking the average (arithmetic mean) of
  1. the bottom base area,
  2. the top base area, and
  3. the geometric mean of the top and bottom areas
and multiplying by the perpendicular distance between the top and bottom areas. I must say, that’s a closer analogy than I expected before I wrote this article.

Thursday, October 6, 2011

Volume of Irregular Triangular Prism

A triangular prism is a 3 dimensional shape with a triangular cross-section.  By “irregular triangular prism” I mean a triangular prism where the ends are not both parallel with a cross-section of the prism. (If you're interested in a "really irregular triangular pyramid", try here.)  The below pictures demonstrate:



In the above picture, a, b, and c are parallel sides, the base B is parallel with the cross-section, but the top end is not.  (If both ends are not parallel with the cross-section, we still name it the same way.)  In a previous post, I indicated that the volume of this rascal is given by V = (a+b+c)B/3, where B is the area of the cross-section.  Today, it’s time to prove it.  We do so using integration.

We first observe, that the orientation of the object does not affect is volume.  We may therefore move (translate and rotate) any given prism (as above) so that the sides a, b, and c are parallel with z-axis and cross-sections are parallel with the xy-plane. 
We first consider the shape above with base B coincident with the xy-plane and denote the top end points of sides a, b, and c according to the pattern a = (ax, ay, az).  We will only need the z-coordinates.  The top view of the above shape looks like this:

Notice the dh in the picture above.  It represents the thickness of a slice of our prism.  The zL and zR represent the height of the sides of the slice.  (We could have used the other side of the slice if we wanted – what matters is consistency.)  Notice that our slices have a rectangular top view but a trapezoidal side view - the left and right sides are different elevations (z-coordinates).  Hence, we may take dV = ½(zL+ zR) λ dh.  Note that zL, zR, and λ, are functions of h as follows:

          
 
Therefore,

              
       
      
      
      
      
      
If the bottom end of the prism is not parallel with the xy-plane, we move it above the xy-plane and determine the volume of the shape using subtraction of volumes.  We write az, bz, cz, as the z-coordinates of the top of lines a, b, and c, and az’, bz’, and cz’ for the bottom end points.  Now, V = Vtop – Vbottom, where Vtop is the volume below the top end and Vbottom is the volume below the bottom end.  This becomes V = (az + bz + cz)B/3 – (az’ + bz’ + cz’)B/3 = ((az – az’) + (bz – bz’) + (cz – cz’))B/3 = (a + b + c)B/3, where in this case a = az – az’, b = bz – bz’, and c = cz – cz’.  This completes the argument.

Monday, June 6, 2011

3D Analogue to the Trapezoid (part 1)

The other day I derived a volume formula that had exactly the result that you would expect if you were to take a guess at it - I didn't even think about it until after I had derived it.

A trapezoid is a quadrilateral (four sided figure) with (at least) one pair of parallel sides.  (If it has two pairs of parallel sides it is a parallelogram, though technically it is still also a trapezoid.)
 

The area, A, of a trapezoid is given by, A = 1/2(b1 + b2)h, where b1 and b2 are the parallel sides and h is the distance measured perpendicularly between the two parallel sides.  You can think of the formula in words as, “the area of a trapezoid is equal to the average of the lengths of the parallel sides multiplied by the perpendicular distance between them.”

Below is a shape that is similar in some respects, but it’s three dimensional.  Instead of two parallel lines, there are three parallel lines with lengths a, b, and c.  At the base of this solid shape is a triangle.  (It’s not important that the lines all come to a common base – the volume formula I came up with will work anyways.)  What is significant about the triangle B is that it is formed by lines which are all perpendicular to the vertical lines (a, b, c).  I don’t know what this shape is called; let’s call it an irregular triangular prism.

The volume, V, of the above shape is given by V = 1/3(a+b+c)B, where B is the area of the triangle formed by a plane perpendicular to the three parallel sides and a, b, and c are the lengths of the parallel sides.  You can think of this formula in words as, “the volume of an irregular triangular prism is equal to the average of the lengths of the three parallel sides multiplied by the perpendicular cross-sectional area.”

(See proof.  Or, see a different analogous shape in part 2.)

Sorta makes you wonder it there’s a four dimensional analogue…