"Vista" <abc@[EMAIL PROTECTED]
> wrote in message
news:f4p9ik$r1h$1@[EMAIL PROTECTED]
>
[...]
> Let me describe my problem with an simpler example.
>
> Let's say I have a 2D plane.
>
> I draw a straight line to split the plane to two parts: Left and Right.
> The equation for the straightline is y=a*x+b.
>
> In the left part the values of F(x, y) are 1s, while in the right part
the
> values of F(x, y) are 0s.
>
> You can query the value of F for any x and y. That's to say, you give me
a
> location (x, y), I will tell you the function value F(x, y).
>
> What's the most efficient way to discover the value of "a" and "b"?
>
Find three non-collinear points, two (U and V say) where F is zero, and
one
W where F is one. Use binary search along the lines UW and VW to locate
the
change from zero to one. That gives you two points on the line from which
you can find a and b.
Graham


|