Math/Programming Help

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
So say given an initial equation for a line, just a regular thing y=mx + b
and start graphing that line and all the sudden there is a change in the slope
whats the best way to go about finding the new "b"? This is being drawn dynamically over time and just can't remeber how to generate b's over time when new equations thrown in...

Example
have the equation for initial dotted line but no equation (just the slope) for the second solid line going down.
 

BigPoppa

Golden Member
Oct 9, 1999
1,930
0
0
Try point-slope formula? Not exactly sure what you're trying to do here but:

Y-y1=m(X-x1) => Y=mX-mx1+y1. Therefore, B = -mx1+y1. I think that should work.

(x1,y1) must a point on the new line you're creating. The end point of the previous line will work as long as you plug your new slope into the equation.
 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
the first 3 times i tried that it seemed right but it didnt work. Of course i tried it one more time since u mentioned it and of course it works...so sicka flash...