[LSC] LDraw coplanarity check

Philo philohome at free.fr
Wed Nov 14 05:48:29 EST 2007


(resent with my LSC email address...)

Hello Michael,

I bring this discussion to the LSC as others could also shed some light...

Thanks for the link to Lars explainations, I never got deep enough into
that issue. Clearly a figure of merit should be a dimentionless value,
which is not the case of -dist (equivalent to a distance) or even worse
of -det (homogeneous to a volume !!!).

The -dist with variable threshold works rather well for me, but that
could be improved... (I never used -det)

Here is the algorithm I would try:
- Compute vector N1 = (ab)X(ad) and N2 = (cb)X(cd) (X means cross
product) N1 and N2 are orthogonal to planes abd and dbc
- calculate s1 = N1 X N2 / ||N1||.||N2|| . s1 is the sine of the angle
of the two planes.
- Calculate s2 similarly for planes adc and abc
- Max(s1, s2) is an dimentionless angle (for small angles sine is about
equal to angle) that should be a good measure of coplanarity.

Thoughts?

Philo


Michael Heidemann wrote:


> Hello Philo,

>

> I have now checked the file

> http://www.ldraw.org/cgi-bin/ptdetail.cgi?f=parts/6942.dat

>

> As you are an engineer maybe you can solve the problem with the

> different values for the det and dist options.

>

> I have also noted in the comment of my last vote a link to the

> discussion of a previous occurence of this problem.

>

> cu

> mikeheide

>






More information about the LSC mailing list