Hi all,
Can someone help me here?
In a sentence, I need a bit of code (or an explanation) that will tell me whether or not a line (which passes through 0,0) crosses an arc.
It’s got me beat.
Printable View
Hi all,
Can someone help me here?
In a sentence, I need a bit of code (or an explanation) that will tell me whether or not a line (which passes through 0,0) crosses an arc.
It’s got me beat.
Your line has to be defined by y=mx (no +b , sonce it passes thru 0,0), but how does your arc look like?
Say for example
(x-10)²+(y-10)²=10
for x & y values >= 10
Don't know about coding but mathematically
y = mx
(x - 10)² + (y - 10)² = 10 for x & y values >= 10
(x - 10)² + (mx - 10)² = 10
x2 - 20x + 100 + m2x2 - 20mx + 100 = 10
(m2 + 1)x2 -20(m + 1)x + 190 = 0
Solve this quadratic for x, only accepting solutions > 10
Substitute x value/s into y = mx only accepting solutions > 10
That brings back a bit of memory. Thanks Glaysher.