Query By Sketch for indexing into an image database involves presenting the machine with a sketch of the object to be found in the database. The sketch can be of the object shape or distinct contours on the image of the object. This sketch can be made from memory, or can be refined interactively in response to what the database search returns at each iteration. Or the sketch can be made by generating curves of an object boundary or object-surface image-discontinuities from an example image. This paper introduces and describes a family of 2D curves (implicit polynomial curves) for this purpose, and an algorithm for generating a representation which passes within ε of a set of control points specified by the user. Control points can be placed at arbitrary locations and in arbitrary order, and can be erased by the user at will, in order to arrive at the desired shape representation. Level sets of the object potential field have been used to facilitate the interaction process. The fitting algorithm is formulated in the efficient Linear Programming (LP) framework. We illustrate the use of this method in the application of content-based image retrieval.