# Calc a set of Points between X,Y to X1, Y1

## Recommended Posts

I want to plot a set of points for a diagonal line.

I`ve seen an equation to do this posted here, but I can`t find it now of course....

Thanks.

2015 - Still no flying cars, instead blankets with sleeves.

##### Share on other sites

I want to plot a set of points for a diagonal line.

I`ve seen an equation to do this posted here, but I can`t find it now of course....

Thanks.

You want the distance between them?

Or do you want to find points that fall on the line?

`y=mx+b`

I could be of more help if you elaborated.

##### Share on other sites

You want the distance between them?

Or do you want to find points that fall on the line?

`y=mx+b`

I could be of more help if you elaborated.

Sorry, yes, points that fall in the line, ie to plot a line say, from 0,0 to 100,100 with 25 points.

Thanks.

Edited by Lakes

2015 - Still no flying cars, instead blankets with sleeves.

##### Share on other sites

Sorry, yes, points that fall in the line, ie to plot a line say, from 0,0 to 100,100 with 25 points.

Thanks.

well, wouldn't there be infinitely many points on the line?

(Don't think you can have fractions of a pixel, but there is at least 100 points on it...)

Which 25 points do you want?

if you want a GUI that actually plots equations for you, someone made one and its in example scripts.

Edited by Paulie

##### Share on other sites

well, wouldn't there be infinitely many points on the line?

(Don't think you can have fractions of a pixel, but there is at least 100 points on it...)

Which 25 points do you want?

if you want a GUI that actually plots equations for you, someone made one and its in example scripts.

Nope, no gui required

25 points was a bad example, to keep it simple, number of pixels in the line, please.

The idea is to draw a line from a to b at any angle, but I`m not using pixels, I`m using Sprites.

Thanks!

2015 - Still no flying cars, instead blankets with sleeves.

##### Share on other sites

I'm excited to see your ProSpeed game, Lakes

Awaiting Diablo III..

##### Share on other sites

I'm excited to see your ProSpeed game, Lakes

No game just yet, doing a scrolly demo first..

2015 - Still no flying cars, instead blankets with sleeves.

## Create an account

Register a new account

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...