Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How do you reverse an equation?

  1. Jan 24, 2005 #1
    I have an equation, that I used in a software I made (Delphi). Now, I want to sort of "reverse" this equation.

    Y = 0-((( ClickedY * (1800 / PicHeight ))*2)-1800)
    X = (( ClickedX * (1800 / PicWidth ))*2)-1800

    What does ClickedY = if you know Y and the PicHeight?

    what does ClickedX = if you know X and the PicWidth?

    :confused:

    Thanks in advance, hopefully, there is a mathematician that can solve this.
     
  2. jcsd
  3. Jan 24, 2005 #2
    Easy. Just solve for ClickedX and ClickedY. Surely you can do this.
     
  4. Jan 24, 2005 #3
    Y = 0 - ((( ClickedY * (1800 / PicHeight ))*2)-1800)
    -Y = ((( ClickedY * (1800 / PicHeight ))*2)-1800)
    1800 - Y = (ClickedY * (1800 / PicHeight )) *2
    (1800 - Y)/2 = ClickedY * (1800 / PicHeight )
    ClickedY = PicHeight/1800 * (1800 - Y)/2,

    and similarly for the other equation.
     
  5. Jan 24, 2005 #4
    OK, is this it.

    Y = 0-((( ClickedY * (1800 / PicHeight ))*2)-1800)
    X = (( ClickedX * (1800 / PicWidth ))*2)-1800

    clickedX = ((PicHeight / 1800) * X) / 2
    clickedY = ((PicWidth / 1800) * Y) / 2
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?