
8 Oct
2007
8 Oct
'07
3:17 p.m.
On Sun, 7 Oct 2007, Fernando Cacciola wrote: [...]
Let's consider the example below.
[really bad code ommitted]
Translating this to gtl isotropic code:
concave += (a.towards(b).left() == b.towards(c));
OK. So you are calling isotropic what I know as "coordinate free operations".
Notice that I could implement the above as:
concave += ( cross_product((b-a),(c-a)) < 0 ) ;
using basic algebraic stuff (and this would work for non-rectilinear edges as well). [...]
convex += (a.towards(b).right() == b.towards(c));
Right. But using basic algebra that becomes:
convex += ( cross_product((b-a),(c-a)) > 0 ) ; [...]
Just one thing: in linear algebra, cross product returns a vector. Then how can you compare that result with a scalar? -- Francois Duranleau