If we know the percentage of the chord where the point of interest is located and the distance above the chord line at that point, we can calculate the x-coordinate using the following formula:
main.m33 chars2 lines
where c
is the chord length and percent_position
is the percentage of the chord where the point of interest is located. The 0.5
represents the midpoint of the chord, which is the reference point for this calculation.
Here's an example implementation in MATLAB:
main.m218 chars9 lines
This would output (1.250000, 1.000000)
for the given inputs.
gistlibby LogSnag