# Finding the pixel positions for the straight line joining two points [duplicate]

Find the pixel positions for the straight line joining P1 (10, 20) and P2 (18, 25)

## marked as duplicate by DumpsterDoofus, Michael E2, Kuba♦, Öskå, Dr. belisariusJan 21 '15 at 18:23

a P1 + (1-a) P2 for 0 < a < 1.