orientacija negativna

orientacija pozitivna

A = (-1, 2)
B = (6, 4)
C = (1, 6)
a = Segment(A, B)
b = Segment(C, A)
c = Segment(C, B)
d = OrthogonalLine(A, xAxis)
e = OrthogonalLine(C, xAxis)
f = OrthogonalLine(B, xAxis)
S, c_3, a_3, b_3 = Polygon(A, B, C)
S_1: (y(A) + y(C)) (x(C) - x(A)) / 2
S_2: (y(B) + y(C)) (x(B) - x(C)) / 2
S_3: (y(A) + y(B)) (x(B) - x(A)) / 2
T1: "S=" + S
p: S_1 + S_2 - S_3
T5 = If(p > 0, T3, If[p < 0, T2])