Skip to main content
Notice removed Authoritative reference needed by CommunityBot
Bounty Ended with no winning answer by CommunityBot
Notice added Authoritative reference needed by Dan
Bounty Started worth 50 reputation by Dan
added 530 characters in body
Source Link
Dan
  • 131
  • 6

The returned Point is a clone of the Input point with the Value property set. Every instance of Point have X and Y normalised within range -1..1 (I subtract the quadrilateral center from each point).

Example:

controlPoints = new [] {
    new Point() { X = -0.033675000000000566, Y = -0.02564999999999884, Value = 1.2787 },
    new Point() { X = -0.035524999999999807, Y = 0.024329999999999075, Value = 1.329 },
    new Point() { X = 0.03370499999999943, Y = 0.02564999999999884, Value = 1.3376 },
    new Point() { X = 0.035494999999999166, Y = -0.024329999999999075, Value = 1.302 }
}

point = new Point() { X = 0.018148174616284152, Y = -0.014201699949808244 }

Expected result is Point.Value = 1.3044829106888913

The returned Point is a clone of the Input point with the Value property set. Every instance of Point have X and Y normalised within range -1..1.

The returned Point is a clone of the Input point with the Value property set. Every instance of Point have X and Y normalised within range -1..1 (I subtract the quadrilateral center from each point).

Example:

controlPoints = new [] {
    new Point() { X = -0.033675000000000566, Y = -0.02564999999999884, Value = 1.2787 },
    new Point() { X = -0.035524999999999807, Y = 0.024329999999999075, Value = 1.329 },
    new Point() { X = 0.03370499999999943, Y = 0.02564999999999884, Value = 1.3376 },
    new Point() { X = 0.035494999999999166, Y = -0.024329999999999075, Value = 1.302 }
}

point = new Point() { X = 0.018148174616284152, Y = -0.014201699949808244 }

Expected result is Point.Value = 1.3044829106888913

Usage details
Source Link
Dan
  • 131
  • 6
  • controlPoints: the 4 points, each one with its valueValue.
  • point: the point for which we want to calculate the interpolated value

The returned Point is a clone of the Input point with the Value property set. Every instance of Point have X and Y normalised within range -1..1.

  • controlPoints: the 4 points, each one with its value
  • point: the point for which we want to calculate the interpolated value

The returned Point is a clone of the Input point with the Value property set.

  • controlPoints: the 4 points, each one with its Value.
  • point: the point for which we want to calculate the interpolated value

The returned Point is a clone of the Input point with the Value property set. Every instance of Point have X and Y normalised within range -1..1.

edited tags
Link
200_success
  • 144.1k
  • 22
  • 188
  • 473
Improved question
Source Link
Dan
  • 131
  • 6
Loading
Rollback to Revision 4
Source Link
Phrancis
  • 20.4k
  • 6
  • 68
  • 154
Loading
Parenthesis
Source Link
Dan
  • 131
  • 6
Loading
Tweeted twitter.com/StackCodeReview/status/1006948451454578688
Error in code
Source Link
Dan
  • 131
  • 6
Loading
Improved text
Source Link
Dan
  • 131
  • 6
Loading
Link to wikipedia
Source Link
Dan
  • 131
  • 6
Loading
Source Link
Dan
  • 131
  • 6
Loading