HELP! Mathmatics problem (geometry) (NLC ;) )

Anything goes in here.....
pete
Vexatious Litigant
Posts: 4708
Joined: Tue Mar 15, 2005 3:23 pm
Location: Kilmarnock

Re: HELP! Mathmatics problem (geometry) (NLC ;) )

Post by pete » Fri Dec 21, 2007 2:30 am

BiggestNizzy wrote:needing a big helping hand from all you mathematics wizards out there I have a geometry problem that as it has to be solved by a Coordinate measuring machine (CMM) and not using CAD so it has to be done mathematically :(

here goes....
Image

I have 2 lines sitting on a YZ plane I have a start position (XYZ)for these lines as well as a direction (IJK in a sin format) I want to draw a circle of known radius (0.0275") that is tangential to those lines. what I want to know is the centerpoint.
Right I know nothing of these things of which you speak, it's a long time since me and Mrs pete did any proper maths however we are trying because I kind of like maths puzzles.

I think I am reading the drawing wrong. Do the lines you show not exist in the x,y plane rather than the yz plane. Possibly doesn't matter.

Do the two lines share the same start position? (They don't on the drawing).

From the intersection of the two lines the centre is y+r, z+r, x. Where r is the radius of the circle (0.0275") provided you are really on the yz axis.

Which is what Kenny said but I said it longer and used more letters.

Give us another one!

Pete

(No way I am right by the way, I didn't really understad the question, mrs pete had to explain it to me)
'99 - '03 Titanium S1 111S.
'03 - '10 Starlight Black S2 111S
'11 - '17 S2 135R
'17 - '19 S2 Exige S+
'23 - ?? Evora

User avatar
alicrozier
Posts: 4394
Joined: Thu Sep 01, 2005 12:58 pm
Location: Aberdeen

Post by alicrozier » Fri Dec 21, 2007 8:11 am

Agreed they seem to be in the XY plane. I guess we also have to assume the 2 lines are not perpendicular? (this makes it harder)

How are the direction vectors defined? You say IJK in Sin format?

From the start point and direction (gradient) we could define an equation for each line (in the form y=mx+c). These would then need to be offset by the circle rad (can be done if we know the gradient).

Then solve the system of 2 equations for the intersection – centre of circle.
All characters appearing in this post are fictitious. Any resemblance to real persons, living or dead, is purely coincidental.
Any references to laptimes, speed or driving on the public highway are purely for dramatic effect.

User avatar
robin
Jedi Master
Posts: 10546
Joined: Mon Mar 27, 2006 1:39 pm

Post by robin » Fri Dec 21, 2007 9:35 am

Can you define what Sin IJK format actually is - I assume it's some sort of polar coordinate system?

If Line 1 and Line 2 intersect at 90 degrees, the problem is trivial, but I assume they don't ...

I assume from the start + vector information you can compute (a) the X/Y/Z coordinate of the Line intersection, (b) the angle of intersection, A.

If you draw a line perpendicular to each of Line 1 and Line 2 at the point of contact with the circle they will intersect at the center of the circle (by definition, lines perpendicular to the tangent run through the center).

Now you have a four sided shape, but by definition it's symmetrical around a line drawn through the intersection of Lines 1 & 2 and the center of the circle, so really it's two right angled triangles, where one side is length R and each of the non-90 angles is known (the angle at the bottom is A/2, the angle at the center of the circle is 90-(A/2)). Call the angle at the center of the circle B, where B = 90-(A/2).

The circle center will be at distance D from the Line intersection.

D = R/cos(B)

The vector of the line that connects from the Line intersection to the circle center is the vector that splits the original two Lines. So travel distance D along that vector and you are at your circle center.

If you post up the definition of the vectors in terms of X/Y/Z space I can make something more definitive. Of course Ali's solution of equations will also work.

Cheers,
Robin
I is in your loomz nibblin ur wirez
#bemoretut

User avatar
BiggestNizzy
Posts: 8932
Joined: Sun May 27, 2007 6:47 pm
Location: Kilmarnock
Contact:

Post by BiggestNizzy » Fri Dec 21, 2007 11:20 am

Ok, Will try to be a bit clearer but knowing me I will make things worse :?

Ok the 2 lines are on the YZ plane ignore the origin on the drawing as it was just a sketch to try and better explain.
Image
Here is the part I am measuring (now in metric)
It has some sizes on it but do not take them as gospel that is what i am trying to check with the machine.

What I mean by expressed in IJK in a sin format is this

a line at 0 degree's (3oclock) is expressed as I1 J0 K0
a line at 90 degree' (12 oclock) is expressed as I0 J1 K0
a line at 45 degree's (1:30) is expressed as I0.707107 J0.707107 K0
a line at -30 degree's on the XY and 45 degree's downward is expressed as I0.857167 J-0.5 K-0.707107

basically the sin values of the angle you are travelling in.

Drawing tangent lines is easy stuff my big problem is I cannot "draw" in anything If I have to create something perpedicular to a line it would have to be done mathematically by using information taken from other lines.
line 1 is defined as such
LN[#].Modifier
--------X, Y, Z----------------------------Location
--------A, B, C----------------------------Direction (a,b,g) (angles in degrees to X, Y & Z axis)
--------I, J, K-----------------------------Direction (cosine format)
--------RCylXY, RCylYZ, RCylZX-------Cylindrical co-ordinate system,radius
--------RSph------------------------------Spherical co-ordinate system, radius
--------ThetaX, ThetaY, ThetaZ---------Spherical co-ordianate system, angle j
--------PhiXY, PhiYZ, PhiZX ------------???
--------L ----------------------------------Length
--------Di ---------------------------------Distance from origin (plane & Line)
--------Rng--------------------------------Range (form of element)
--------SigSigmaMaxNo------------------???

i.e. line 1's X origin would be LN[1].X

to offest line I would have to write a seperate formula for each lines opposite and adjacent face as the hypotonuse would be half the dia of the circle then add these to the values of the original lines to create new lines.

I would then be able to find where these 2 new lines intersect (another formula) then add half the radius this would give me a point on the circle in the Y direction this I can add to the one at the opposite side thus giving me the direction across a set of rollers.

so to get it worked out I would need 21 formulas for each size

there are 22 on each part so that's 462 different formula's, that's ok once written the machine will do it in about 3 seconds but my brain will fry writting it all.

hope thats cleared it all up :?
Sent from my ZX SPECTRUM +2A

User avatar
thinfourth
Posts: 3177
Joined: Tue Mar 15, 2005 12:06 pm
Location: Playing in the mud near aberdeen

Post by thinfourth » Fri Dec 21, 2007 11:33 am

BiggestNizzy wrote:Ok, Will try to be a bit clearer but knowing me I will make things worse :?

Ok the 2 lines are on the YZ plane ignore the origin on the drawing as it was just a sketch to try and better explain.
Image
Here is the part I am measuring (now in metric)
It has some sizes on it but do not take them as gospel that is what i am trying to check with the machine.

What I mean by expressed in IJK in a sin format is this

a line at 0 degree's (3oclock) is expressed as I1 J0 K0
a line at 90 degree' (12 oclock) is expressed as I0 J1 K0
a line at 45 degree's (1:30) is expressed as I0.707107 J0.707107 K0
a line at -30 degree's on the XY and 45 degree's downward is expressed as I0.857167 J-0.5 K-0.707107

basically the sin values of the angle you are travelling in.

Drawing tangent lines is easy stuff my big problem is I cannot "draw" in anything If I have to create something perpedicular to a line it would have to be done mathematically by using information taken from other lines.
line 1 is defined as such
LN[#].Modifier
--------X, Y, Z----------------------------Location
--------A, B, C----------------------------Direction (a,b,g) (angles in degrees to X, Y & Z axis)
--------I, J, K-----------------------------Direction (cosine format)
--------RCylXY, RCylYZ, RCylZX-------Cylindrical co-ordinate system,radius
--------RSph------------------------------Spherical co-ordinate system, radius
--------ThetaX, ThetaY, ThetaZ---------Spherical co-ordianate system, angle j
--------PhiXY, PhiYZ, PhiZX ------------???
--------L ----------------------------------Length
--------Di ---------------------------------Distance from origin (plane & Line)
--------Rng--------------------------------Range (form of element)
--------SigSigmaMaxNo------------------???

i.e. line 1's X origin would be LN[1].X

to offest line I would have to write a seperate formula for each lines opposite and adjacent face as the hypotonuse would be half the dia of the circle then add these to the values of the original lines to create new lines.

I would then be able to find where these 2 new lines intersect (another formula) then add half the radius this would give me a point on the circle in the Y direction this I can add to the one at the opposite side thus giving me the direction across a set of rollers.

so to get it worked out I would need 21 formulas for each size

there are 22 on each part so that's 462 different formula's, that's ok once written the machine will do it in about 3 seconds but my brain will fry writting it all.

hope thats cleared it all up :?
So my method of using a rule and saying about there and then battering a centre punch might not work then

User avatar
BiggestNizzy
Posts: 8932
Joined: Sun May 27, 2007 6:47 pm
Location: Kilmarnock
Contact:

Post by BiggestNizzy » Fri Dec 21, 2007 11:57 am

thinfourth wrote:So my method of using a rule and saying about there and then battering a centre punch might not work then
no it's final inspection tolerance is +/-0.002"

and muggins here has been left to sign it off as ok, I took a mould and it looks good on the projector but I would like to have a print out from the machine to send to the customer, they get kinda grumpy when it's wrong and they have already stuck it 3 miles under the north sea
Sent from my ZX SPECTRUM +2A

User avatar
Brigita
Posts: 615
Joined: Fri Apr 20, 2007 2:33 pm
Location: Glasgow/St. Andrews (and anywhere inbetween)
Contact:

Post by Brigita » Fri Dec 21, 2007 12:15 pm

:ROFL :ROFL

:scratch :?:

I'm with Ed!!!!
Elise S2 Racetech
Cobalt Blue ;-)

woody
Posts: 5637
Joined: Mon Dec 26, 2005 4:03 pm
Location: Southside Triangle

Post by woody » Fri Dec 21, 2007 12:29 pm

There is no way Dougie Ironside taught you this stuff :lol:

User avatar
BiggestNizzy
Posts: 8932
Joined: Sun May 27, 2007 6:47 pm
Location: Kilmarnock
Contact:

Post by BiggestNizzy » Fri Dec 21, 2007 12:39 pm

woody wrote:There is no way Dougie Ironside taught you this stuff :lol:
All Dougie ever taught me was how to copy off a blackboard, and change a couple of numbers! he was rubbish at calculus though couldn't help us with that :( if memory serves me right it was Gordon Hope that ended up doing that, Is he still at GE ?
Sent from my ZX SPECTRUM +2A

woody
Posts: 5637
Joined: Mon Dec 26, 2005 4:03 pm
Location: Southside Triangle

Post by woody » Fri Dec 21, 2007 12:44 pm

Aye, he's still at GE, didn't know he was a maths hot-shot.

User avatar
BiggestNizzy
Posts: 8932
Joined: Sun May 27, 2007 6:47 pm
Location: Kilmarnock
Contact:

Post by BiggestNizzy » Fri Dec 21, 2007 12:53 pm

woody wrote:Aye, he's still at GE, didn't know he was a maths hot-shot.
neither did we !

we where all bricking it as it was the last day and we had failed all the tests previously (the teacher was boring, spoke monotone and it was calculus - so we all went to the pub or the garage to the bowling :D some even partook of some chemical assistance to get through it)

but he pulled it out the bag w eall passed our HNC (i think thats what it was) and it kept work off our back :D
Sent from my ZX SPECTRUM +2A

User avatar
Andy G
Posts: 11390
Joined: Thu Mar 10, 2005 10:27 am
Location: Dirleton/Gullane
Contact:

Post by Andy G » Fri Dec 21, 2007 2:00 pm

Brigita wrote: I'm with Ed!!!!
Have you shared that with him yet?

Think you've made his day :D
AMG GT-R
Atom 4 - CM425
Lotus Esprit S4S
G30 M5 Comp
Ferrari 599
Lotus Elise S1 "Shed" spec

User avatar
mac
Posts: 6880
Joined: Mon Sep 19, 2005 4:36 pm

Post by mac » Fri Dec 21, 2007 3:22 pm

BiggestNizzy wrote:
thinfourth wrote:So my method of using a rule and saying about there and then battering a centre punch might not work then
no it's final inspection tolerance is +/-0.002"

Sorry, can't help either - I need to be spot on in my job :wink:

Mac
S2 Elise (cobalt blue with stripes) - toy spec
Caterham 7 - hillclimb spec
Yamaha Thundercat - 2 wheeled toy spec

User avatar
robin
Jedi Master
Posts: 10546
Joined: Mon Mar 27, 2006 1:39 pm

Post by robin » Fri Dec 21, 2007 4:36 pm

You can do it like I said.

No need to draw anything at all, but you will need to understand how to manipulate the coordinates you have to working out (a) the intercept of the two lines and (b) the angle that the two lines meet at.

It's trivial if you understand the system, but it's hard to write it all down for you in a formulaic fashion (it would take pages).

If you don't know how to do any of this and given this is of more than academic interest, I am reluctant to post up a step-by-step sequence on what to do, as I'm bound to make a mistake and then you would end up with the wrong answer.

Remember intercepts are always solved by finding a value of Y and Z that fit both line equations to produce 0. In your world you have the choice of using:

y = mz + c

Or:

y*J + z*K - p = 0

In both cases, y and z are positions on the line in the YZ plane and m, c or p are constants that describe the slope and axis-intercept of the line.

After you have the intercept (Y0,Z0), imagine drawing a line that is halfway between the two lines. It's start will obviously be Y0,Z0 and it's direction will be the mid point of the angle between the two lines (or, if you prefer, the average of the two angles to the Y or Z axis).

This line *will* pass through the center of the circle. Let's call it Line 0.

In conjunction with the imaginary line drawn from the center to the point of touching on the circumference, and the original lines, you will be able to visualise two right angled triangles where each has the same hypoteneuse (Line 0). Each has the same length sides (one side is length R, the radius of the circle, the other length isn't known but is the same for both).

You know all three angles of this imaginary triangle, and you know the length of one side, so you can work out the length of the hypoteneuse (remember that's what sine is ... the relationship between the lengths of one side and the hypoteneuse for a given angle).

Now you know the center of the circle, no?

Cheers
Robin
I is in your loomz nibblin ur wirez
#bemoretut

Post Reply