Results 1 to 4 of 4

Thread: math question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Posts
    118

    Post

    I need to keep track of fluid in a round tank laying horizontally. I can't figure out how to get the area of a circle under a chord in VB. ______
    / \
    / \
    / \
    \__________/
    \ XX /
    \______/
    Imagine this is a circle with a line through it. I need to get the area where the XX is. How can I code this?

  2. #2
    Addicted Member
    Join Date
    Feb 2000
    Location
    London, UK
    Posts
    145

    Post

    I'm not sure I really understands the figure, but if you paint it a little bit better (for instance in Paint) and mail me, I'll see what I can do.
    It shouldn't be that hard, if you got som of the figures (heirght and so)
    Pentax

    ------------------
    Wilhelm Tunemyr,
    Sweden

    [email protected]

    "Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
    Heinrich Heine (1797-1856)

    Pravda zvítezi!

  3. #3
    Guest

    Post

    You must first find the area of your slice. This is from the middle to the endpoints of the chord. Then you find the area of the triangle that was created by the chord and the two radii. You subtract the latter from the first and that will give you the area. I am working on the equation now.

    ------------------
    Boothman
    There is a war out there, and it is about who controls the information, it's all about the information.



    [This message has been edited by Boothman_7 (edited 02-21-2000).]

  4. #4
    Guest

    Post

    ((A/360) * PIr^2) - (((r^2 - (C/2)^2) * (C/2)) * 2)

    Where:
    A is the angle in degrees
    r is the radius
    C is the length of the chord

    ((A/360) * PIr^2) = Area of segment (slice)
    (((r^2 - (C/2)^2) * (C/2)) * 2) = Area of the triangle with the chord as the base.

    Hope this helps

    ------------------
    Boothman
    There is a war out there, and it is about who controls the information, it's all about the information.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width