 <p>View the line as (x1,y1) + λ(x2-x1,y2-y1), i.e. the first point, plus a multiple of the vector between them.</p> <p>When λ=0 you have the first point and when λ=1 you have the second. So you just want to take n equally distributed values of λ between 0 and 1.</p> <p>How you do this depends on what you mean by between: are the end points included or not?</p> <p>For example you could take λ=0/(n-1), λ=1/(n-1), λ=2/(n-1), ... λ=(n-1)/(n-1). That would give n equally distributed points including the endpoints.</p> <p>Or you could take λ=1/(n+1), λ=2/(n+1), ... λ=n/(n+1). That would give n equally distributed points not including the endpoints.</p>