Re: SQL challenge
Date: Tue, 13 Jul 2004 19:21:26 GMT
Message-ID: <pan.2004.07.13.19.21.51.416635_at_REMOVETHIS.pandora.be>
On Tue, 13 Jul 2004 11:48:21 -0700, Mikito Harakiri wrote:
> "Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message
> news:pan.2004.07.13.17.45.22.985796_at_REMOVETHIS.pandora.be...
>> Well, the problem was to find the *minimal* set. [...] >> >> You're not there yet. :-)
>
> But this is just planar version of the same conveax hull problem!
Yes, you could approach it that way, but there is a simpeler way.
> Another glitch is for each triangular face (p1,p2,p3) the output would have
> them in all permutations
> (p1,p2,p3)
> (p2,p1,p3)
> (p1,p3,p1)
> ...
> so that I have to take care of this too.
That's easily solved by for example only selecting edges where the first point is lexicographically smaller than the second point.
> Solving these small problems and integrating them into the answer doesn't
> look particularly challenging to me:-) but, i'm afraid, it might lengthen
> the final solution a bit.
>
> Is there an elegant SQL statement? If you say yes, then, I would think hard
> finding it:-)
Yes, there is. We (some people in my research group) found it ourselves, but we had to make the assumption that not all points are in a single plane. Without that assumption things seem to get ugly.
> BTW, after posting the first attempt, I gooled Jims 2002 paper. He seems to
> consider planar case only, right?
Correct. But we already figured out at the conference how to do this, so that was not much of a puzzle.
- Jan Hidders