1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Maths problem....

Discussion in 'Chit Chat' started by Paul_UK, Jun 28, 2006.

  1. Paul_UK

    Paul_UK Guest

    Joined:
    Nov 23, 2004
    Messages:
    6,885
    Likes Received:
    0
    Gender:
    Male
    I have never been much good at maths, despite managing to get an HNC in electronics (which had a lot of maths). So it's no surprise that I am struggling with a maths problem on something I'm doing at work. It's probably quite basic school-level trig, but it's been a long time....

    Part of a machine we are making involves a large diameter pipe which is placed on a pair of rollers. The rollers rotate, which rotates the pipe. Our machine is doing some inspection stuff on the pipe.

    The size of the rollers and the distance between them is fixed. The diameter of the pipe varies. Smaller pipes will sit lower in the rollers than larger pipes. The attached picture should show what I mean.

    I am writing the software for this and need to be able to calculate how high/low the pipe sits in the rollers. Ideally knowing the distance between the centre of the rollers and the top of the pipe as shown with a question mark on my diagram.

    Can anyone help? I don't even know where to start with this..... :eusa_doh: :bang:
     
    #1 Paul_UK, Jun 28, 2006
    Last edited: Jan 19, 2014
  2. Triplume

    Regular Member

    Joined:
    Jun 11, 2006
    Messages:
    47
    Likes Received:
    0
    Location:
    Twin Cities, MN
    Gender:
    Male
    Sexual Orientation:
    Gay
    Out Status:
    All but family
    Well... of course, the height the pipe reaches is proportional to its diameter. Perhaps there's some formula or function that could describe that relationship, although I wouldn't know where to start on figuring one out.

    Have you tried measuring the diameters and heights of multiple pipes and then comparing them? Or something.

    Yeah, I'm just throwing random ideas out there. Hopefully something I said will trigger a thought in you. Otherwise, I don't really know... my trigs class never really went in-depth with circles.

    >_<
     
  3. Jo A

    Regular Member

    Joined:
    Jun 16, 2006
    Messages:
    29
    Likes Received:
    0
    Location:
    West Yorkshire
    Out Status:
    Out to everyone
    Hmm...

    First thoughts are:
    • The centre of the fixed roller, the contact point between it and the pipe, and the centre of that pipe are always in a straight line.
    • The distance between the centre of one fixed roller and the centre of the pipe is therefore the sum of the radii of the pipe and the fixed roller.
    • The centres of the pipe, and both fixed rollers form the points of a triangle - a triangle composed of two right-angled triangles back-to-back.
    • The hypotenuse of this triangle is therefore the sum of the radii of the pipe and the fixed roller.
    • You already know the base of this triangle, it's half the distance between the centres of the two fixed rollers.
    • Armed with the base and hypotenuse of a right angled triangle, you can calculate the length of the remaining side - the vertical side.
    • The distance from the horizontal centreline on which the two fixed rollers are located, to the top of the pipe is then the vertical side of that triangle - plus the radius of the pipe.

    Does that help, or shall I work out the algorithm for it as well? :wink:

    Regards, Jo
     
    #3 Jo A, Jun 29, 2006
    Last edited: Jun 29, 2006
  4. Jo A

    Regular Member

    Joined:
    Jun 16, 2006
    Messages:
    29
    Likes Received:
    0
    Location:
    West Yorkshire
    Out Status:
    Out to everyone
    Hi again,

    I can't resist this sort of thing; sorry...

    Known variables:

    RollerRadius - the radius of the fixed rollers.
    PipeRadius - the measured radius of the pipe.
    RollerSeperation - the distance between the centres of the fixed rollers.

    So, the vertical distance from a line between the centres of the fixed rollers to the top of the pipe is (in C using "pow" and "sqrt" from math.h):

    Code:
    PipeRadius + sqrt( pow( RollerRadius + PipeRadius, 2 ) - pow( RollerSeperation / 2, 2 ) )
    
    Regards, Jo
     
  5. Proud1p4

    Proud1p4 Guest

    Woah.....Jo A.....you are one smart person....ouch...and to think i felt proud when i learn the how to calculate the area of 3D figures:icon_redf ...lol:lol:
     
  6. TriBi

    Full Member

    Joined:
    Dec 23, 2004
    Messages:
    1,911
    Likes Received:
    1
    Location:
    DownUnder
    Jo - you're clever...:icon_bigg
    Paul - you're in trouble...:lol:
    Me - I'm just hopelessly confused (and stupid):confused: :eek:
     
  7. Jo A

    Regular Member

    Joined:
    Jun 16, 2006
    Messages:
    29
    Likes Received:
    0
    Location:
    West Yorkshire
    Out Status:
    Out to everyone
    Hiya,
    <modest>It was just a bit of good ol' Pythagoras...</modest>

    ...smart and pretty... :slight_smile: or so people tell me. I just think I'm "not bad considering"; it's an improvement on hating the way I look, at least.

    Regards, Jo
     
  8. Paul_UK

    Paul_UK Guest

    Joined:
    Nov 23, 2004
    Messages:
    6,885
    Likes Received:
    0
    Gender:
    Male
    Yes - of course - it's easy when you view it that way.... :bang: :eusa_doh:

    I was just seeing the circles and not seeing the triangle that they and what I needed to know formed.

    It's been too many years since I've had to do any maths beyond what a basic pocket calculator can do....

    Thanks Jo! (*hug*) I can carry on with this software next week (working on sosmething ele currently) without looking or feeling like an idiot now! :slight_smile:

    Anyway, sorry to horrify everyone with the mention of maths here! :eek: Back to more interesting stuff now.....
     
  9. Triplume

    Regular Member

    Joined:
    Jun 11, 2006
    Messages:
    47
    Likes Received:
    0
    Location:
    Twin Cities, MN
    Gender:
    Male
    Sexual Orientation:
    Gay
    Out Status:
    All but family
    Amazing. I had completely missed the part about the triangle too. After Jo pointed that out, everything just fell nicely into place.

    Sometimes all you need is a little push in the right direction. Kind of like coming out, I guess.

    :wink:
     
  10. Jo A

    Regular Member

    Joined:
    Jun 16, 2006
    Messages:
    29
    Likes Received:
    0
    Location:
    West Yorkshire
    Out Status:
    Out to everyone
    Hmmm... odd, that... I've been told my mind works in a strange way - I literally "saw" the triangles in Paul's diagram straight away, like they were already drawn on it...

    Well, glad to have been of some use :slight_smile:

    Jo
     
  11. Paul_UK

    Paul_UK Guest

    Joined:
    Nov 23, 2004
    Messages:
    6,885
    Likes Received:
    0
    Gender:
    Male
    If anyone is still lost, this amended diagram might help....
     
    #11 Paul_UK, Jun 30, 2006
    Last edited: Jan 19, 2014
  12. Proud1p4

    Proud1p4 Guest

    Thnx for the diagram....but i never got any smarter :tongue: