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:
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. >_<
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? Regards, Jo
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
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:
Jo - you're clever...:icon_bigg Paul - you're in trouble...:lol: Me - I'm just hopelessly confused (and stupid) :eek:
Hiya, <modest>It was just a bit of good ol' Pythagoras...</modest> ...smart and pretty... 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
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! Anyway, sorry to horrify everyone with the mention of maths here! :eek: Back to more interesting stuff now.....
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.
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 Jo