•**j****pqr **** is a mask; = 1 if p and r are in ****but q is out; = 0 otherwise
**•**Let there be one such mask for every ****combination of 3 points, and let each ****mask have a weight of 1
**

•**Calculate ****S**** ****j****pqr
**

•**If ****S**** ****j****pqr ****= 0 the figure is convex
**

•**If ****S**** ****j****pqr ****³****1 the figure is not convex**