fact: Fixpoint check_bezier_cw (fuel : nat) (v : vert_edge) (a b c : pt) : option bool := match fuel with | O => None | S p => let bot_edge := Bpt (ve_x v) (ve_bot v) in if point_strictly_under_edge bot_edge (Bedge a c) then Some true else if negb (point_strictly_under_edge bot_edge (Bedge a b)) || negb (point_strictly_under_edge bot_edge (Bedge b c)) then Some false else let b' := midpoint a b in let b2 := midpoint b c in let c' := midpoint b' b2 in if Qlt_bool (p_x c') (ve_x v) then check_bezier_cw p v c' b2 c else if Qlt_bool (ve_x v) (p_x c') then check_bezier_cw p v a b' c' else if Qlt_bool (ve_bot v) (p_y c') then Some true else Some false end.
imports: mathcomp(all_ssreflect) ZArith QArith List String OrderedType OrderedTypeEx FMapAVL