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. General Programming
  3. Algorithms
  4. Algorithm needed to find a point on A4 size plane

Algorithm needed to find a point on A4 size plane

Scheduled Pinned Locked Moved Algorithms
algorithmstutorialquestion
3 Posts 3 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.
  • U Offline
    U Offline
    User 12100921
    wrote on last edited by
    #1

    Distance given to a point on plane of A4 size. How to find X, Y if L1 and L2 (distances are given) ? here is a link to image : http://s11.postimg.org/wymbahpxv/Xand_Y.png[^] X1=55mm Any ideas ?

    Richard DeemingR C 2 Replies Last reply
    0
    • U User 12100921

      Distance given to a point on plane of A4 size. How to find X, Y if L1 and L2 (distances are given) ? here is a link to image : http://s11.postimg.org/wymbahpxv/Xand_Y.png[^] X1=55mm Any ideas ?

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Split the larger triangle into two right-angled triangles, and apply Pythagoras: L1² = x² + y² L2² = (X1 - x)² + y² = X1² - 2·X1·x + x² + y² L2² - L1² = X1² - 2·X1·x 2·X1·x = X1² - L2² + L1² x = (X1² - L2² + L1²) / 2·X1 y = ± √(L1² - x²) NB: there will be two solutions - one with a positive value for y, and one with a negative value.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      • U User 12100921

        Distance given to a point on plane of A4 size. How to find X, Y if L1 and L2 (distances are given) ? here is a link to image : http://s11.postimg.org/wymbahpxv/Xand_Y.png[^] X1=55mm Any ideas ?

        C Offline
        C Offline
        Chris Maunder
        wrote on last edited by
        #3

        Use Pythagoras. Let Pen tip = P. We know L1, L2, X1. Define line segments R1 -> P = L1, R1 -> x = A, (x,0) -> P = B. A2 + B2 = L12 We know the length of A is X, since it's (0,0) -> (x,0), and we know length of B is y, since it's (x,0) to (x,y) x2 + y2 = L12 Let R2 -> P = L2, x -> R2 = C B2 + C2 = L22 A + C = X1 => C = X1 - A So we have x2 + y2 = L12 y2 + (X1 - x)2 = L22 Solve these and you get x and y

        cheers Chris Maunder

        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