Reputation: 1029
I have a stream of data (sin, cos) coming into a limited resource FPGA. By limited I mean I cannot afford to instantiate a massive block-ram to store an entire cycle of Sin and Cos data.
This data IF plotted forms an ellipse (this can see this via x,y plotting with a scope). What needs to be determined is "a" and "b" (and also h,k) of the standard ellipse equation.
is it possible to iterate over this incoming data and determine the key parameters of the ellipse?
Upvotes: 0
Views: 466
Reputation: 3112
Since you asked for a
, b
, h
, and k
, I'm assuming that the ellipse is not rotated, but might be translated from the origin. I'm further assuming that (sin, cos) are measurements of the sin and cos values that can be converted to (x, y) coordinates.
If this is the case, then the extreme values of sin and cos should correspond to points on the axes of the ellipse. You should be able to iterate through the points, looking for where the values change direction, and storing those values. That should result in four (sin, cos) pairs.
From those, you should be able to convert to (x, y) coordinates which hopefully form horizontal and vertical axes. You should be able to calculate a
and b
as half the length of those axes, and (h, k) as the intersection of those axes.
If you need a more generalized solution, you might look at this question and this question on Math.StackExchange.
Upvotes: 1
Reputation: 5674
looking for this? http://www.algebra.com/algebra/homework/Quadratic-relations-and-conic-sections/Quadratic-relations-and-conic-sections.faq.question.480300.html
only 2 points are enough for you to find the "a" and "b"
Upvotes: 0