x

y

$\bold\textsf{%v}$

$\bold\textsf{%v}$

\textsf{Mueve la abeja y observa cómo cambian las coordenadas.}

AreaBee, f, g, h, i = Polygon((0, 0), (13, 0), (13, 6), (0, 6))
PointBee = PointIn(AreaBee)
xCoord = Segment((0, 0), (x(PointBee), 0))
yCoord = Segment((x(PointBee), 0), (x(PointBee), y(PointBee)))
w: x(PointBee)
s: y(PointBee)
B: (-2, 7.5)
C: (16, 7.5)
D: (16, 10)
E: (-2, 10)
F = Point(yAxis)
H: (14.5, -0.5)
I: (14.5, 8)
J: (20, 8)
K: (20, -0.5)
pixelsRight: 16 + 8
pixelsLeft: 16
pixelsBottom: 16 + 36
pixelsTop: 24 + 24 + 8
borderBox = Polygon(Zip[PixelsToPoint[Corner[1], Corner[3], Corner[5], A], A, {(pixelsLeft, pixelsTop), (pixelsLeft, y(Corner[5]) - pixelsBottom), Corner[5] - (pixelsRight, pixelsBottom), (x(Corner[5]) - pixelsRight, pixelsTop)}])
cornerTopLeft = Vertex(borderBox, 1)
cornerBottomRight = Vertex(borderBox, 3)
axisY = Segment((0, 0), (0, y(cornerTopLeft)))
axisX = Segment((0, 0), (x(cornerBottomRight), 0))
appletSize = Corner(5)
lblPointA: "\bold\textsf{(\textcolor{#6557D2}{" + (LaTeX[x(PointBee)]) + "}, \textcolor{#C75000}{" + (LaTeX[y(PointBee)]) + "})"

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: PixelsToPoint (command PixelsToPoint1)
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)