Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. maths question

maths question

Scheduled Pinned Locked Moved The Lounge
helpgraphicsquestioncsscom
70 Posts 18 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M musefan

    Your question is really unclear, are you trying to calculate d1? Regardless, if you have neither the positions nor the angles of the devices then you can't get an accurate calculation. Your best option would be to use which ever device gives you the shortest distance, as that will be the most accurate - but certainly cannot guarantee a correct result. Essentially to get the correct result you need a device pointed directly at the centre point. If they are not pointing directly at the centre point then you could probably compensate for this offset is your calculations, but you would need the angles and positions to be able to do so.

    J Offline
    J Offline
    Joan M
    wrote on last edited by
    #18

    I need to calculate XY position in which the sensor finds the part. The problem is that the sensor is at an unknown position and angle (which will be very similar to the desired one but I need a really high precision (3 micrometers)). I only get from the sensor the distance from the sensor to the part.

    M L 2 Replies Last reply
    0
    • J Joan M

      I need to calculate XY position in which the sensor finds the part. The problem is that the sensor is at an unknown position and angle (which will be very similar to the desired one but I need a really high precision (3 micrometers)). I only get from the sensor the distance from the sensor to the part.

      M Offline
      M Offline
      musefan
      wrote on last edited by
      #19

      Joan M wrote:

      I only get from the sensor the distance from the sensor to the part.

      So just to be clear. Do you just get a single value (distance) from the sensor to the outer circle? Or do you get 2 values, one for outer circle and one for inner circle?

      J 1 Reply Last reply
      0
      • J Joan M

        The measured distances are the length of the red lines when they cross the circles.

        Kornfeld Eliyahu PeterK Offline
        Kornfeld Eliyahu PeterK Offline
        Kornfeld Eliyahu Peter
        wrote on last edited by
        #20

        Like a beam that hits the surface of the circle and you have the distance without the angle?

        "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

        "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

        J 1 Reply Last reply
        0
        • J Joan M

          Hi all, I need help in a math issue: Let's say I have 3 measuring devices which give me a distance. Mechanically those 3 sensors are mounted more or less in the right position, but we can't be sure of the angle neither position the measuring devices are mounted. I have 3 Mastering parts (3 circumferences of a known radius) that I can mount into the machine at any moment and that I want to use to calibrate the system. The measuring error of the 3 measuring devices can be dismissed. this is a small diagram to represent the problem: https://i.stack.imgur.com/a2AyG.png[^] 2 known master circumferences give me a distance [d1] between circumferences (d1 = radius 1 - radius 2). For each circumference the sensor will give me a different measure m1 and m2. Given the difference between r1-r2 and m2-m1 could I find the angle in which the measuring device is mounted? Summarizing: 2 master circumferences mounted in the same center. 3 external measuring devices mounted completely unaligned with the center. I don't know the measuring devices position. The red lines in the drawing are the vector lines the measuring device measures would be placed into. The real measures (in this drawing) would be the distance from the sensor to the position where the red line crosses a circle. Any help will be welcome... Thank you all...

          D Offline
          D Offline
          Daniel Pfeffer
          wrote on last edited by
          #21

          We have the distances m1 (between the measuring device and the outer circle), m2 (between the measuring device and the inner circle), r1, and r2 (the radii of the two circles). If the measuring device were pointed exactly at the common centre of the circles, then m1 - m2 == r1 - r2. If it is not pointing at the centre, the direction vector traces a chord on each of the circles. One chord is the intersections of the direction vector with the outer circle, and one chord is the intersections of the direction vector with the inner circle. The difference between the two chords is 2*(m1 - m2). If the measuring device is at a distance R and angle alpha from the centre of the circles, you should be able to calculate the lengths of the chords in terms of R, alpha, r1, and r2. Working backwards, you should get a formula for R and alpha in terms of m1, m2, r1, and r2.

          Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

          Kornfeld Eliyahu PeterK 1 Reply Last reply
          0
          • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

            Like a beam that hits the surface of the circle and you have the distance without the angle?

            "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

            J Offline
            J Offline
            Joan M
            wrote on last edited by
            #22

            Yes, in that case is a mechanical measuring device, but yes, the red line would represent a beam that measure the distance, but I don't know the incidence angle. Thank you for spending time on that, I'm sure my super explanations are not making it easy to understand it.

            Kornfeld Eliyahu PeterK 1 Reply Last reply
            0
            • M musefan

              Joan M wrote:

              I only get from the sensor the distance from the sensor to the part.

              So just to be clear. Do you just get a single value (distance) from the sensor to the outer circle? Or do you get 2 values, one for outer circle and one for inner circle?

              J Offline
              J Offline
              Joan M
              wrote on last edited by
              #23

              One for each circle. Thank you for spending time on this. And sorry for my bad explanations, it's difficult for me to describe this clearly in English...

              M 1 Reply Last reply
              0
              • J Joan M

                One for each circle. Thank you for spending time on this. And sorry for my bad explanations, it's difficult for me to describe this clearly in English...

                M Offline
                M Offline
                musefan
                wrote on last edited by
                #24

                Joan M wrote:

                One for each circle.

                Ok, that is a good start. We definitely need both. The other vital piece is: do you know the value of d1? (i.e do you know the radius/circumference of both the inner and outer circles?) It looks like Daniel is already suggesting what I am trying to get at too, however I just wanted to be sure you have all the information that he is trying to make use of.

                J 1 Reply Last reply
                0
                • M musefan

                  Joan M wrote:

                  One for each circle.

                  Ok, that is a good start. We definitely need both. The other vital piece is: do you know the value of d1? (i.e do you know the radius/circumference of both the inner and outer circles?) It looks like Daniel is already suggesting what I am trying to get at too, however I just wanted to be sure you have all the information that he is trying to make use of.

                  J Offline
                  J Offline
                  Joan M
                  wrote on last edited by
                  #25

                  Yes, both circles are the master parts and we know the radius of both. Thanks!

                  M 1 Reply Last reply
                  0
                  • J Joan M

                    Yes, both circles are the master parts and we know the radius of both. Thanks!

                    M Offline
                    M Offline
                    musefan
                    wrote on last edited by
                    #26

                    Ok, so my trig is rusty so I will need to take some time to try and process the information. But from what I can see I think it should be possible to do with that data - but don't hold me to that just yet, this is not a specialist area for me by far! :-D

                    J 1 Reply Last reply
                    0
                    • M musefan

                      Ok, so my trig is rusty so I will need to take some time to try and process the information. But from what I can see I think it should be possible to do with that data - but don't hold me to that just yet, this is not a specialist area for me by far! :-D

                      J Offline
                      J Offline
                      Joan M
                      wrote on last edited by
                      #27

                      Same here... trigonometry is rusty to say the least... :sigh:

                      M 1 Reply Last reply
                      0
                      • J Joan M

                        Yes, in that case is a mechanical measuring device, but yes, the red line would represent a beam that measure the distance, but I don't know the incidence angle. Thank you for spending time on that, I'm sure my super explanations are not making it easy to understand it.

                        Kornfeld Eliyahu PeterK Offline
                        Kornfeld Eliyahu PeterK Offline
                        Kornfeld Eliyahu Peter
                        wrote on last edited by
                        #28

                        Some observations: 1. Replacing the circle (disk) with an other one will not change the distance the devices measure as long as the circles are on the same plain... 2. There is an option when one or more of the devices will not hit the circle's surface (infinite or error)... 3. There is a whole sphere for each point on the circle's surface that will return the same measurement...

                        "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                        "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                        J 1 Reply Last reply
                        0
                        • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                          Some observations: 1. Replacing the circle (disk) with an other one will not change the distance the devices measure as long as the circles are on the same plain... 2. There is an option when one or more of the devices will not hit the circle's surface (infinite or error)... 3. There is a whole sphere for each point on the circle's surface that will return the same measurement...

                          "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                          J Offline
                          J Offline
                          Joan M
                          wrote on last edited by
                          #29

                          Yes, yes and yes, but (and I'll write this in the OP) we consider all to be in the same plane. If it is not... I simply abandon all hope and start crying now...

                          Kornfeld Eliyahu PeterK 1 Reply Last reply
                          0
                          • J Joan M

                            I need to calculate XY position in which the sensor finds the part. The problem is that the sensor is at an unknown position and angle (which will be very similar to the desired one but I need a really high precision (3 micrometers)). I only get from the sensor the distance from the sensor to the part.

                            L Offline
                            L Offline
                            Lost User
                            wrote on last edited by
                            #30

                            XY I think you will never find. Assume you position the measurement unit exactly at 0° watching exactly the center. Do the same at any other angle (I mean adjust it exactly to the center).

                            It does not solve my Problem, but it answers my question

                            M 1 Reply Last reply
                            0
                            • J Joan M

                              Yes, yes and yes, but (and I'll write this in the OP) we consider all to be in the same plane. If it is not... I simply abandon all hope and start crying now...

                              Kornfeld Eliyahu PeterK Offline
                              Kornfeld Eliyahu PeterK Offline
                              Kornfeld Eliyahu Peter
                              wrote on last edited by
                              #31

                              Even the circle is on a fixed plain and the beams are always hit the surface, you can not know the position of the device as any of the devices can be at any point of a sphere and still return the same distance... If you would know the distance between the devices it would cut down the possible position to a circle (still a lot but less the a sphere)...

                              "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                              "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                              1 Reply Last reply
                              0
                              • D Daniel Pfeffer

                                We have the distances m1 (between the measuring device and the outer circle), m2 (between the measuring device and the inner circle), r1, and r2 (the radii of the two circles). If the measuring device were pointed exactly at the common centre of the circles, then m1 - m2 == r1 - r2. If it is not pointing at the centre, the direction vector traces a chord on each of the circles. One chord is the intersections of the direction vector with the outer circle, and one chord is the intersections of the direction vector with the inner circle. The difference between the two chords is 2*(m1 - m2). If the measuring device is at a distance R and angle alpha from the centre of the circles, you should be able to calculate the lengths of the chords in terms of R, alpha, r1, and r2. Working backwards, you should get a formula for R and alpha in terms of m1, m2, r1, and r2.

                                Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                Kornfeld Eliyahu PeterK Offline
                                Kornfeld Eliyahu PeterK Offline
                                Kornfeld Eliyahu Peter
                                wrote on last edited by
                                #32

                                Which will place the device on a circle in best case... It still will not give you a XYZ position...

                                "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

                                "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                                1 Reply Last reply
                                0
                                • L Lost User

                                  XY I think you will never find. Assume you position the measurement unit exactly at 0° watching exactly the center. Do the same at any other angle (I mean adjust it exactly to the center).

                                  It does not solve my Problem, but it answers my question

                                  M Offline
                                  M Offline
                                  musefan
                                  wrote on last edited by
                                  #33

                                  Yeah, you might be right. Like I said it's no my area of expertise so takes me some time to validate (or disprove) my current trail of thought. I get what you are saying though, and I fear you are correct.

                                  1 Reply Last reply
                                  0
                                  • J Joan M

                                    Same here... trigonometry is rusty to say the least... :sigh:

                                    M Offline
                                    M Offline
                                    musefan
                                    wrote on last edited by
                                    #34

                                    Sorry, having had some further time to think I don't see a solution. You need to have either the position of the sensor, or the angle of it (relative to the centre point). Without one of those you can't get the position where it intersects. Easiest way to see why: Take your diagram and rotate the whole thing 45 degrees. You will see that the expect output is clearly different, however you will still have the exact same input values. And logic states that the same input cannot produces different outputs - therefore the input data just isn't enough. Hope that makes sense. If you still don't want to give up, post a question on math.se[^], at least then you will get a much better technical explanation of why it can't be done that you can forward to the boss :) And if they somehow suss it out, please report back with the solution!

                                    1 Reply Last reply
                                    0
                                    • J Joan M

                                      Hi all, I need help in a math issue: Let's say I have 3 measuring devices which give me a distance. Mechanically those 3 sensors are mounted more or less in the right position, but we can't be sure of the angle neither position the measuring devices are mounted. I have 3 Mastering parts (3 circumferences of a known radius) that I can mount into the machine at any moment and that I want to use to calibrate the system. The measuring error of the 3 measuring devices can be dismissed. this is a small diagram to represent the problem: https://i.stack.imgur.com/a2AyG.png[^] 2 known master circumferences give me a distance [d1] between circumferences (d1 = radius 1 - radius 2). For each circumference the sensor will give me a different measure m1 and m2. Given the difference between r1-r2 and m2-m1 could I find the angle in which the measuring device is mounted? Summarizing: 2 master circumferences mounted in the same center. 3 external measuring devices mounted completely unaligned with the center. I don't know the measuring devices position. The red lines in the drawing are the vector lines the measuring device measures would be placed into. The real measures (in this drawing) would be the distance from the sensor to the position where the red line crosses a circle. Any help will be welcome... Thank you all...

                                      M Offline
                                      M Offline
                                      Mircea Neacsu
                                      wrote on last edited by
                                      #35

                                      Consider a coordinate system with origin in the center of the mastering circle and one measuring device positioned at X0, Y0 (unknowns) sending a beam with a slope S (also unknown). The equation of the beam is: (1) y-Y0 = S*(x-X0) The intersection of this line with the mastering circle x2 + y2 = R12 can be found by solving (2) x2 + (s*(x-X0) + Y0)2 = R12 And then finding y from equation [1]. This will give you a formula with 3 unknowns (X0, Y0 and S) for the intersection point (Xi, Yi) Distance between the intersection point (Xi, Yi) and (X0, Y0) is given by: d12 = (Xi-X0)2 + (Yi-Y0)2 You need 3 such equations, from 3 mastering circles to solve the 3 unknowns. Note that solution for each sensor is independent of the other sensors. It's a bit early in the morning for me but the basic outline should work.

                                      Kornfeld Eliyahu PeterK 1 Reply Last reply
                                      0
                                      • J Joan M

                                        Hi all, I need help in a math issue: Let's say I have 3 measuring devices which give me a distance. Mechanically those 3 sensors are mounted more or less in the right position, but we can't be sure of the angle neither position the measuring devices are mounted. I have 3 Mastering parts (3 circumferences of a known radius) that I can mount into the machine at any moment and that I want to use to calibrate the system. The measuring error of the 3 measuring devices can be dismissed. this is a small diagram to represent the problem: https://i.stack.imgur.com/a2AyG.png[^] 2 known master circumferences give me a distance [d1] between circumferences (d1 = radius 1 - radius 2). For each circumference the sensor will give me a different measure m1 and m2. Given the difference between r1-r2 and m2-m1 could I find the angle in which the measuring device is mounted? Summarizing: 2 master circumferences mounted in the same center. 3 external measuring devices mounted completely unaligned with the center. I don't know the measuring devices position. The red lines in the drawing are the vector lines the measuring device measures would be placed into. The real measures (in this drawing) would be the distance from the sensor to the position where the red line crosses a circle. Any help will be welcome... Thank you all...

                                        D Offline
                                        D Offline
                                        dan sh
                                        wrote on last edited by
                                        #36

                                        Joan M wrote:

                                        Given the difference between r1-r2 and m2-m1 could I find the angle in which the measuring device is mounted?

                                        Yes.

                                        "It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[^]

                                        L J 2 Replies Last reply
                                        0
                                        • D dan sh

                                          Joan M wrote:

                                          Given the difference between r1-r2 and m2-m1 could I find the angle in which the measuring device is mounted?

                                          Yes.

                                          "It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[^]

                                          L Offline
                                          L Offline
                                          Lost User
                                          wrote on last edited by
                                          #37

                                          No

                                          It does not solve my Problem, but it answers my question

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups