$\mathsf{%v}$

$\textsf{Show intersecting lines}$

$\textsf{Show angle measure}$

\text{Drag to change angle}

Anchor = (0, 0)
rotationPoints = Sequence(Rotate[(0, 2.5), K, Anchor], K, 0, (2 * pi), pi / 36)
P2 = Point(rotationPoints)
onboardingCoords = PointToPixels(Corner[1], Corner[3], Corner[5], P2)
pixelsTop: 24
pixelsRight: 16
pixelsBottom: 16
P1 = Point(rotationPoints)
isClockwise: Angle[P1, Anchor, P2] < pi
alpha = If(Angle[P2, Anchor, P1] ≤ pi, Angle[P2, Anchor, P1], Angle[P1, Anchor, P2])
v = Vector(Anchor, P2)
showLines = false
LblPos: Anchor + (If[alpha > pi / 2, 1.5, 2] * UnitVector[Vector[Anchor, Rotate[If[isClockwise, P1, P2], alpha / 2, Anchor]]])
lblAngle = Text(("" * alpha), LblPos, false, true, 0, 0)
intersectingLines: {Line[Anchor, P1], Line[Anchor, P2]}
showMeasure = false
pixelsLeft: 16
colorAngle = If(alpha < pi / 2, {101 / 255, 87 / 255, 210 / 255}, If[alpha ≟ pi / 2, {218 / 255, 37 / 255, 112 / 255}, If[alpha ≟ pi, {58 / 255, 110 / 255, 214 / 255}, {15 / 255, 133 / 255, 56 / 255}]])
u = Vector(Anchor, P1)
arm1 = Segment(Anchor, Anchor + (3 * UnitVector[u]))
arm2 = Segment(Anchor, Anchor + (3 * UnitVector[v]))
onboarding = true
pulsingSpeed: 8
pulsing = 0.9 (slider from 0 to 1, step 0.1)
onboardingX: x(onboardingCoords) - 32
onboardingY: y(onboardingCoords) + 12
onboardingCase: 2
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
pulsingObject = circlePixels(P2, 7 + (7 * pulsing), Corner[1], Corner[3], Corner[5])
onboardingDisplayText: "" + (LaTeX[onboardingText]) + ""
viewbox = Polygon({(-3.25, -3.25), (-3.25, 3.25), (3.25, 3.25), (3.25, -3.25)})
backgroundGrid: {Sequence[Segment[(A, -3.2), (A, 3.2)], A, -3.2, 3.2, 0.64], Sequence[Segment[(-3.2, B), (3.2, B)], B, -3.2, 3.2, 0.64]}
textAngleType = Text((("\text{" * If[alpha < pi / 2, "Acute", If[alpha ≟ pi / 2, "Right", If[alpha ≟ pi, "Straight", "Obtuse"]]]) * " angle}"), (0, 3.6), true, true, 0, 0)

Tool: PixelsToPoint
PixelsToPoint(Corner1,Corner3,Corner5,PixelCoords)
Input: Corner1, Corner3, Corner5, InputPixels
Output: OutputPoint

InputPixels: (100, 200)
xRight: x(Corner3)
xLeft: x(Corner1)
yTop: y(Corner3)
yBottom: y(Corner1)
yCoord: yTop - (y(InputPixels) / y(Corner5) * (yTop - yBottom))
xCoord: (x(InputPixels) / x(Corner5) * (xRight - xLeft)) + xLeft
OutputPoint: (xCoord, yCoord)

Tool: onboardingTextOffset
onboardingTextOffset(textCorner1,textCorner3,case,corner1,corner3,corner5)
Input: CornerText1, CornerText3, case, Corner1, Corner3, Corner5
Output: TextOffset

xPixels: ((x(CornerText3) - x(CornerText1)) * x(Corner5) / (x(Corner3) - x(Corner1)))
yPixels: ((y(CornerText3) - y(CornerText1)) * y(Corner5) / (y(Corner3) - y(Corner1)))
xOffset = Element({27, (-xPixels) + 2, 16 - xPixels / 2, 16 - xPixels / 2}, case)
yOffset = Element({-23, -23, yPixels - 27, -49}, case)
TextOffset: (xOffset, yOffset)

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)

Tool: PointToPixels
PointToPixels(Corner1,Corner3,Corner5,InputPoint)
Input: Corner1, Corner3, Corner5, InputPoint
Output: OutputPixels

Corner1: (-5, -5)
Corner3: (16, 6)
Corner5: (300, 200)
xLeft: x(Corner1)
xRight: x(Corner3)
yTop: y(Corner3)
yBottom: y(Corner1)
yPixels: (y(Corner5) * (yTop - y(InputPoint)) / (yTop - yBottom))
xPixels: (x(Corner5) * (x(InputPoint) - xLeft) / (xRight - xLeft))
OutputPixels: (xPixels, yPixels)