Drag the red dot along the budget line
This 2D companion plots the classic consumer-theory diagram directly: quantities of good X and good Y on the two axes, the orange budget line pxx + pyy = I, and a family of Cobb-Douglas indifference curves U(x,y) = x^α·y^(1-α). Sliders for both prices, income and the preference weight α redraw the whole picture in real time and recompute the closed-form optimum x* = αI/px, y* = (1-α)I/py. A draggable red bundle lets you pick any point along the budget line yourself and see its own indifference curve and utility next to the true optimum — dragging away from the yellow tangency point always costs utility, which is exactly the geometric content of "marginal rate of substitution equals the price ratio" at the optimum.