Signed Area of Parallelogram or Triangle Test

Manipulate[SeedRandom[ranint];With[{x1=RandomInteger[{1,8}],y1=RandomInteger[{1,8}]},With[{x2=RandomInteger[{1,10-x1}],y2=RandomInteger[{1,10-y1}]},With[{paralelogram={If[x1 y2-x2 y1>0,RGBColor[0.47451, 1, 0.47451],RGBColor[1, 0.560784, 0.34902]],Polygon[{{0,0},{x1,y1},{x1+x2,y1+y2},{x2,y2}}]},triangle={If[x1 y2-x2 y1>0,RGBColor[0.47451, 1, 0.47451],RGBColor[1, 0.560784, 0.34902]],Polygon[{{0,0},{x1,y1},{x2,y2}}]}},Text@Column[{Graphics[{If[para==1,paralelogram,triangle],{PointSize[0.01],Point[{{0,0},{x1+x2,y1+y2},{x1,y1},{x2,y2},{x1,0},{0,y1},{x1,y1},{x1+x2,0},{x2,0},{0,y2},{0,y1+y2}}],Text[TraditionalForm[{(Subscript[x, 1]),(Subscript[y, 1])}],{x1,y1},1.3{-1,0}],Text[TraditionalForm[{(Subscript[x, 2]),(Subscript[y, 2])}],{x2,y2},1.3{-1,0}],Text["O",{0,0},{1,1}]}},PlotRange->{{-1,10},{-1,10}},Axes->True,Ticks->{Range[10],Range[10]},GridLines->{Range[10],Range[10]},GridLinesStyle->Directive[{RGBColor[0.317647, 1, 1]}],ImageSize->400],Row[{"What is the signed area of the ",If[para==1,"parallelogram","triangle"],"?  ",If[sha,If[para==1,x1 y2-x2 y1,(x1 y2-x2 y1)/2.],""]}] },Alignment->Left]]]],{{para,1,""},{1->"parallelogram",2->"triangle"}},Button["click for a problem",ranint=Random[Integer,{1,123577}]],{{ranint,177},ControlType->None},"show answer",{{sha,False,""},{True,False}},ControlPlacement->Left]

The Demonstration asks for the signed area of a parallelogram (triangle) determined by points {0,0}, {(Subscript[x, 1]),(Subscript[y, 1])}, {(Subscript[x, 1])+(Subscript[x, 2]),(Subscript[y, 1])+(Subscript[y, 2])}, and {(Subscript[x, 2]),(Subscript[y, 2])} ({0,0}, {(Subscript[x, 1]),(Subscript[y, 1])}, and {(Subscript[x, 2]),(Subscript[y, 2])} for triangle). The signed area of the parallelogram is (Subscript[x, 1])(Subscript[y, 2]) -(Subscript[x, 2])(Subscript[y, 1]).

Contributed by: Izidor Hafner