views:

322

answers:

1

Hello,

I have a quadratic bezier curve and I need the Y coordinate of a point on the bezier curve for a given X coordinate. I know that in pure maths this can be easily done, but I'm wondering is there's a simple / another way for this in C# / WPF? Is it possible to get the single points used by C# / WPF for drawing the bezier curve and then maybe just loop them and compare the X coordinate of each point with the given X coordinate? BTW for the mathematical way it would be good to know which step for the parameter t of the bezier curve has been choosen by C# / WPF? Any chance to find this out? Probably t is just scaled by / steps for t are 1/(distance of P0 and P2) ? Thank you very much for any hint!

+1  A: 

Take a look at Degrafa Bezier Y at X Algorithm.

Sorush Rabiee
Thanks for the hint! Everyone who has this problem, also have a look at http://stackoverflow.com/questions/2656166/calculating-parameters-for-defining-subsections-of-quadratic-bezier-curves it's more detailed.
stefan.at.wpf