Hi Bill,

| I don't know where between is defined, but this result makes pretty good
| sense to me.

The definition of "between" can be found in "Multivariate/vectors.ml".
There are several equivalent formulations, the first of which is the
actual definition (bound to the OCaml name "between")

  between =
   |- !a x b. between x (a,b) <=> dist(a,b) = dist(a,x) + dist(x,b)

  BETWEEN_IN_SEGMENT =
   |- !x a b. between x (a,b) <=> x IN segment[a,b]

  BETWEEN_IN_CONVEX_HULL =
   |- !x a b. between x (a,b) <=> x IN convex hull {a, b}

| 4) You should think about how angle(A,D,B) is even defined.

Yes, this is arguably the problem. The "angle" function is defined
(via "vector_angle" in the file "Multivariate/geom.ml") in a
symmetrical way to be whichever of the two angles between two
vectors is non-reflex, with degenerate cases mapped to pi/2.

 |- vector_angle x y =
        if x = vec 0 \/ y = vec 0 then pi / &2
        else acs((x dot y) / (norm x * norm y)))

 |- angle(a,b,c) = vector_angle (a - b) (c - b)

For some purposes, it would be more useful or natural to use
directed angles. There isn't much infrastructure set up so far
about directed angles, though there are two possible ways of
getting them via complex functions, either the argument function
with 0 <= Arg(z) < 2 pi or the imaginary part of the complex
logarithm with -pi <= Im(clog z) < pi. These would be angles
w.r.t. the positive x-axis, but then you can get the angle
between two vectors w and z by considering the complex quotient
w/z or z/w.

John.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
hol-info mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hol-info

Reply via email to