Entering any two of four inter-dependent values

While designing a garden landscape, I want users to be able to define a slope of the terrain.

There are four values users can enter:

  • Run - the horizontal distance along the depth of the slope
  • Rise - the amount by which the slope rises along its length
  • Angle - the inclination of the slope
  • Grade - a percentage inclination of the slope

Different users will use a different primary measurement.

Example 1: they know the grade will be 4% which means they can either define the run or the rise to completely define the slope.

Example 2: they know the rise needs to be 2m which means they need to define either the run or the grade / angle.

Example 3: they know the run needs to be 50m which means they need to define either the rise or the grade / angle.

In each case, it seems there needs to be a way to fix or lock one (primary) measurement allowing the others to be entered.

In what way might you best layout the inputs and guide the user to define a slope? Would an interactive visual representation work best? Space is limited to about 250px width.