Login

Welcome, Guest. Please login or register.

July 24, 2025, 04:14:06 am

Author Topic: Some maths help (partially programming)  (Read 1289 times)  Share 

0 Members and 1 Guest are viewing this topic.

thegubble

  • Victorian
  • Adventurer
  • *
  • Posts: 9
  • Sure we can do it, we just need more gaffer tape!
  • Respect: 0
Some maths help (partially programming)
« on: January 21, 2009, 05:30:08 pm »
0
Hey,
I'm having some maths trouble over the past 2 days, and can't get this to work right, but anyway, I'll explain the problem and my solutions so far.

Ok, say i have 2 number lines (this is a simplified way to look at the actual problem), of the same physical length.
Line 1 goes from 1 to 127
Line 2 goes from 25 to 127
BUT the lines are the same physical length.
If i placed a marker down on Line 1 at '16', what would this position read on line 2.

Now, the hard part is that in fact the starting position of line 1 and line 2 changes, and the position of the marker changes, therefore, all calculations should be done with variables.

Any help would be great.

/0

  • Victorian
  • ATAR Notes Legend
  • *******
  • Posts: 4124
  • Respect: +45
Re: Some maths help (partially programming)
« Reply #1 on: January 21, 2009, 05:42:39 pm »
0
Don't know how right this is :P Just having a crack at it

Let the position of "25 on line 2" relative to "1 on line 1" be given by .

Now, if , then the 1 coincides with the 25.

So then we can just use ratios to find the reading on line 2 when line 1 is at '16'.





So at a time , the reading on line 2 should be


EDIT: Actually, sorry I went into this with some assumptions. Could you say exactly HOW the positions vary? I might be using the wrong scale.
« Last Edit: January 21, 2009, 05:50:51 pm by /0 »

thegubble

  • Victorian
  • Adventurer
  • *
  • Posts: 9
  • Sure we can do it, we just need more gaffer tape!
  • Respect: 0
Re: Some maths help (partially programming)
« Reply #2 on: January 21, 2009, 05:53:02 pm »
0
Thank you so much for your quick and helpful reply. Your solution worked perfectly, i just rewrote it into my application, and all results are as expected.

Thanks once again, now i can stop hitting my head against the brick wall.