Spatial voting. In the Hotelling–Downs picture each voter has an ideal point in a space of issues and prefers the candidate closest to it (Euclidean distance here). Voters are drawn from two overlapping clusters; each flag is a candidate's position. Dragging a flag changes every voter's ranking.
Four ways to count. Plurality counts first choices only. Borda gives 2, 1, 0 points for first, second and third place. A Condorcet winner beats every rival in one-on-one majority votes (it may not exist: majorities can be cyclic). Instant runoff removes the candidate with the fewest first choices and re-counts. When two similar candidates split their side's first choices, plurality can elect someone that most voters rank last of the three or that loses every head-to-head contest: the spoiler effect. With all candidates and voters on a single line, the Condorcet winner is the candidate nearest the median voter (the median-voter theorem).
Simplifications and honesty. Real voters also care about character, parties, strategy and turnout; two issue axes are a drastic simplification; distance-based preferences are an assumption; the 300 voters are an invented random sample, not a poll; the candidates are abstract flags, not real people or parties. Which rule is "best" is a matter of values as well as mathematics, and Arrow's impossibility theorem says no rule satisfies every fairness criterion at once.
Checks. (1) With all voters projected onto issue 1 the Condorcet winner (pairwise tournament) is compared with the candidate nearest the median voter (the sorted-array median). (2) Borda points from ranks are compared with the number of rivals each candidate beats, summed over voters (from the pairwise counts). (3) For 100,001 evenly spaced voters on a line the plurality shares are compared with the closed forms (a+b)/2, (c−a)/2 and 1−(b+c)/2.
The board, voter pegs, flags and podiums were modelled and baked in Blender; the voting calculations and rendering run in Three.js r160.