1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Area between two lines

  1. Sep 6, 2008 #1
    Hey everyone. I'm writing a piece of software that will determine the area between two lines. Here's what the software does:

    You input a starting elevation (below ground), say 30 ft, then you specify the ending elevation (below ground) say 37 ft. And the distance between the two is say 150 ft. I need to determine the slop of the line between those two points.

    Then you can specify different stations. So station one would be at 25 ft from the starting point. I need to find the area between the ground level, and the line that I previously found the slope for.

    I've attached an image to help you understand what I'm trying to do. If you have any questions let me know! this program is the working version, but I don't have the source code. That's why I'm re-writing it. The different colors represent different depth categories.

    Thanks for any help!

    Attached Files:

  2. jcsd
  3. Sep 6, 2008 #2


    User Avatar
    Staff Emeritus
    Science Advisor

    If I understand you correctly, the slope is just the difference between the heights divided by the difference between horizontal distances: in this case (37-30)/150= 7/150.

    When you say "starting elevation (below ground), say 30 ft" do you mean 30 ft below ground? Then it would be (-37-(-30))/150= -7/150

    For the area it doesn't matter whether the "heights" are positive or negative. you have a trapezoid. Its area is given by the average of the two "bases", (37+ 30)/2= 33.5, and the "height", the horizontal distance, 150 ft. The area is 33.5*150= 5025 square feet. That has nothing to do with a "station" being 25 feet from the starting point.

    Did you possibly mean just the height (or depth) of the "station" at 25 feet? If that is so just multiply the slope 7/150 (or -7/150) times 25: 7*25/150= 7/6 and add that to the initial 30 feet: 31 and 1/6 feet.

  4. Sep 7, 2008 #3
    I don't quite understand. I wasn't very clear on what I wanted now that I look at it again. You were correct in assuming I meant finding the depth at a certain point, rather than the area.

    Here's a more realistic example; maybe it's the same situation and I just can't picture it with the arbitrary numbers.
    In the image, the depth of Manhole A is at elevation 1818.5 feet and Manhole B is at 1818.77 feet. The rim of Manhole A is at elevation 1830.51 and Manhole B is at 1828.06. I need to find the constant slope between these two points (from the two depths, not the rims). The "stations" are merely markers referring to "feet from Manhole A"; it's a little confusing because the starting point is actually at 2 feet, not 0 feet, because the manhole is 4 feet in diameter. Using what you gave me, I get a constant slope of (1818.5-1818.77)/94 = 0.00287. The software then draws the depth line between Manhole A and Manhole B.

    Then, the user inputs "stations" at where he took elevation measurements again. So in the image, the starting point is at station 2, with an elevation of 1830.51 feet, followed by station 20 with an elevation of 1830.66 feet. I need to find the depth between these two lines, and determine how many feet exist in that space (from station 2 to station 20). So in the image it gives that the distance from station 2 to station 20 is in the depth category of 12-15 feet.

    The image in the example above is fairly simple I suppose since the depth of both Manholes is about the same. I've attached another image representing a more difficult example.
    Thanks for the help!!

    Attached Files:

    Last edited: Sep 7, 2008
  5. Sep 7, 2008 #4


    User Avatar
    Staff Emeritus
    Science Advisor

    So you do NOT need to find the area! You simply want to find the depth. In that case the second part of what I said is correct.

    "How many feet exist"? Do you mean the straight line distance between the stations or some area?

  6. Sep 7, 2008 #5
    Correct. sorry for the confusion in the first post.

    The average straight line distance.
  7. Sep 8, 2008 #6
    Any ideas?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Area between two lines