Skip to content

Using Simulated Glitter to Solve for Coefficients in Implicit Equation of Ellipse

The implicit equation for an ellipse looks like f(x, y) = ax^2 + bxy + cy^2 + dx + ey + f = 0 . The idea here is that if we have at least five pieces of glitter that are "on" for some location of the camera and light (unknown), and we know the surface normals of those pieces of glitter, then we can use that information to determine the values of the coefficients in the implicit equation, thus defining a set of concentric ellipses associated with our set of "on" glitter. Then, we think the two foci of these concentric ellipses (which will be the same for each ellipse in the set) will define the camera and light locations.

10 pieces of glitter are "on", and the light and camera lie alone a vertical line.

In this image, we can see a sample simulation in which there are 10 pieces of glitter, all of which are "on", and the camera and light are location along a vertical line. Here, we expect to see a set of concentric, vertically oriented (major axis aligned with the y-axis) ellipses such that each ellipse is tangent to at least one piece of glitter.

Previously, we thought that this set of concentric ellipses may be defined by some a, b, c, d, and e that are fixed for the whole set of ellipses, and an f which is different for each of the ellipses. In other words, a, b, c, d, and e defined the shape, orientation and location of the ellipses and f defined the "size" of each ellipse.

I am starting to believe that this is not quite true, and that the "division of labor" of the coefficients is not so clearly defined. Perhaps it is the case that there is some function which defines how the coefficients are related to each other for a given set of concentric ellipses, but I am not sure what that function or relationship is.

1 thought on “Using Simulated Glitter to Solve for Coefficients in Implicit Equation of Ellipse

  1. pless

    Two things:

    1. It is possible that there is some special case happening if the camera and light (or the two foci) are exactly the same distance from the glitter sheet.

    2. I think it might be helpful to show here in a blog post, or, if you need more math, in a linked latex document, the derivation of the constraints about glitter orientation and foci. I know when we first did this together on the board that we were sloppy about the magnitude of the gradient. There was a suggestion that perhaps we could do something cute using a ratio to get away from an absolute value, but trying to be explicit about all our assumptions might highlight the problems! Also, we're going to have to write this up eventually anyway...

    3. Also, for the implicit equation:
    a x^2 + b xy + c y^2 + dx + ey + f == 0

    I still think that f, or the relative value of f compared to the other values does give concentric ellipses. But the devil is in the details; if you scale all the values (a,b,c,d,e,f) by the same amount, you get the same ellipse; *but* you would get a different gradient magnitude. I'm not sure we understand how to think about all that yet.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *