minor math question
-
Hi all, I was wondering if anyone knew of a relatively easy way to draw a random line through a value of X on a graph. I then need to pull two points from the line. None of this needs to be graphical or even displayed i just need the points as text output to be use later. Any ideas at all would be greatly appreciated.
-
Hi all, I was wondering if anyone knew of a relatively easy way to draw a random line through a value of X on a graph. I then need to pull two points from the line. None of this needs to be graphical or even displayed i just need the points as text output to be use later. Any ideas at all would be greatly appreciated.
-
thats not exactly what I meant I'm not looking for truly random numbers I'm looking for 2+ random points on a line that intersects x at a given point
If you generate the equation of the line, you can sub x values back in and calcualte y values. e.g.
y = x + 2 Say x = 2 y = (2) + 2 y = 4 Therefore the point = (2,2)
Looks easy on paper, yet i imagine it's somewhat more difficult to accomplish in code. Hope this gets you started.Posted by The ANZAC