$\textsf{GRAPH INEQUALITY}$

$\textsf{NEW INEQUALITY}$

Reset

xintsOpts = Shuffle(Sequence[-5, 5])
yintsOpts = Shuffle(Sequence[-5, 5] \ {0})
cases = Shuffle(Sequence[4])
countQuestion = 0
AppSize = Corner(5)
xint = Element(xintsOpts, Mod[countQuestion, Length[xintsOpts]] + 1)
MoveGuideLine = (-5.5646, 5.57448)
hGuideline: y = y(MoveGuideLine)
vGuideline: x = x(MoveGuideLine)
ViewCorner1_{1}: (-5.5, -5.5)
ViewCorner3_{1}: (5.5, 5.5)
q1_{1} = Polygon({ViewCorner1_{1}, (x(ViewCorner3_{1}), y(ViewCorner1_{1})), ViewCorner3_{1}, (x(ViewCorner1_{1}), y(ViewCorner3_{1}))})
xAxisFake_{1} = Segment((x(ViewCorner1_{1}), 0), (x(ViewCorner3_{1}), 0))
yAxisFake_{1} = Segment((0, y(ViewCorner1_{1})), (0, x(ViewCorner3_{1})))
text1_{1} = Text("x", (6, 0.1), true, true, 0, 0)
text2_{1} = Text("y", (0, 5), true, true, 1, 1)
eq1: x = x(Corner[1]) + (x(Corner[2] - Corner[1]) / 800 * 16)
hGuideline' = Translate(hGuideline, Vector[(Vector[Corner[1], Corner[4]] / 500 * 16)])
Cor1 = (-6.048462499999999, -5.9637600000000015)
Cor3 = (16.7784625, 8.232800000000001)
yint = Element(yintsOpts, Mod[countQuestion, Length[yintsOpts]] + 1)
Case = Element(cases, Mod[countQuestion, Length[cases]] + 1)
a(x, y) = x / xint + y / yint ≥ 1
b(x, y) = x / xint + y / yint ≤ 1
c(x, y) = x / xint + y / yint > 1
d(x, y) = x / xint + y / yint < 1
e(x, y) = y ≥ (yint * x)
f(x, y) = y ≤ (yint * x)
g(x, y) = y > (yint * x)
h(x, y) = y < (yint * x)
i = If(xint ≠ 0 ∧ yint ≠ 0, Element[{a, b, c, d}, Case], Element[{e, f, g, h}, Case])
A: (7, 5)
CorIcon1 = (-1.3650471534391544, -3.378769942857144)
CorIcon2: CorIcon1 + (0.75, 0)
Home: (7, 5)
PointsInReg: {}
PointsNotInReg: {}
wid = Distance(CorIcon1, CorIcon2)
checks = Zip(Translate[pic1, Vector[CorIcon1, PP - (wid / 2, wid / 2)]], PP, PointsInReg)
crosses = Zip(Translate[pic2, Vector[CorIcon1, PP - (wid / 2, wid / 2)]], PP, PointsNotInReg)
B: (100, 100)
IsBSol = IsInRegion(B, i)
left1: "" + (LaTeX[(((If[sgn(xint) ≟ 1, "", "-"] * If[abs(xint) ≟ 1, "x", (("\frac{x}{" * abs(xint)) * "}")]) * If[sgn(yint) ≟ 1, "+", "-"]) * If[abs(yint) ≟ 1, "y", (("\frac{y}{" * abs(yint)) * "}")])]) + ""
right2 = If(yint ≟ 1, "x", yint ≟ -1, "-x", (yint * "x"))
ineqSplit = If(xint ≠ 0, {left1, "1"}, {"y", right2})
leftSideIneq = ReplaceAll(ReplaceAll[ineqSplit(1), "x", ((If[x(B) ≥ 0, "", "("] * Text[x(B)]) * If[x(B) ≥ 0, "", ")"])], "y", ((If[y(B) ≥ 0, "", "("] * Text[y(B)]) * If[y(B) ≥ 0, "", ")"]))
rightSideIneq = If(xint ≠ 0 ∧ yint ≠ 0, "1", ReplaceAll[ineqSplit(2), "x", If[x(B) ≥ 0, (If[abs(yint) ≟ 1, "", "\\cdot"] * x(B)), (((If[abs(yint) ≟ 1, "", "\\cdot"] * "(") * x(B)) * ")")]])
ineqSym = Element({"≥", "≤", ">", "<"}, Case)
fLeft = If(xint ≠ 0 ∧ yint ≠ 0, x / xint + y / yint, y)
fRight = Polynomial(If[xint ≠ 0 ∧ yint ≠ 0, 1, (yint * x)])
resultLeft = Text(fLeft(B), (0, 0), true, true)
resultRight = Text(fRight(x(B)), (0, 0), true, true)
BinGV = IsInRegion(B, q1_{1})
text2: "\text{Point }" + (LaTeX[B]) + " \text{ is " + (LaTeX[If[IsBSol, "", "not "]]) + "a solution}\\\text{to the inequality.}"
line1: x / xint + y / yint = 1
line2: y = (yint * x)
EndPoints: {Intersect[If[xint ≠ 0 ∧ yint ≠ 0, line1, line2], q1_{1}]}
anim = 0 (slider from 0 to 2)
animLine = Segment(EndPoints(1), EndPoints(1) + (Min[anim, 1] * (EndPoints(2) - EndPoints(1))))
speed = 1
text3: "\textsf{Boundary line: }" + (LaTeX[ineqSplit(1)]) + "=" + (LaTeX[ineqSplit(2)]) + "
\\\\\\\textsf{Style: " + (LaTeX[If[Case ≤ 2, "Solid", "Dashed"]]) + " because the inequality\\is " + (LaTeX[If[Case ≤ 2, "not ", ""]]) + "strict.}\\\\\\" + (LaTeX[If[anim ≤ 1, "", "\textsf{The region that contains the solution\\points is shaded.}"]]) + ""
textQuestion: "\textsf{Drag and drop points onto the coordinate plane so at least 4 points are solutions and 4 are}\\\textsf{not solutions to the inequality }" + (LaTeX[ineqSplit(1)]) + " " + (LaTeX[ineqSym]) + " " + (LaTeX[ineqSplit(2)]) + ""
pulsingSpeed: 8
pulsing = 0.2 (slider from 0 to 1, step 0.1)
pulsingObject = circlePixels(A, 9 + (7 * pulsing), Cor1, Cor3, (800, 500))
onboarding = true
l1: {{ineqSplit(1), (ineqSym * ineqSplit(2))}, {leftSideIneq, ((If[IsBSol, "", "\cancel"] * ineqSym) * rightSideIneq)}, {resultLeft, ((If[IsBSol, "", "\cancel"] * ineqSym) * rightSideIneq)}}
text4 = TableText(l1, "rl", 150, 60)
PosSolution: (17, 5.5)
text1 = Text(text4, PosSolution, true, true, -1, -1)
tabOrder: {textQuestion, A, text1, text2, btnShow, text3, btnNew}
prevObject: 0
labelPoint = Text(B, B, true, true, If[x(B) ≤ -4.5, 1, 0], If[x(B) ≤ -4.5, 0, -1])

Tool: sectorPixels
sectorPixels(Midpoint,B,C,pixelRadius,Corner1,Corner3,Corner5
Input: A, B, C, pixelRadius, Corner1, Corner3, Corner5
Output: newSector

pointRadius: (pixelRadius / x(Corner5) * (x(Corner3) - x(Corner1)))
BPrime: A + (pointRadius * UnitVector[B - A])
newSector = CircleSector(A, BPrime, C)

Tool: circlePixels
circlePixels(A,pixelRadius,Corner1,Corner3,Corner5
Input: A, pixelRadius, Corner1, Corner3, Corner5
Output: newCircle

pointRadius: (pixelRadius / x(Corner5) * (x(Corner3) - x(Corner1)))
newCircle = Circle(A, pointRadius)