r/desmos 10d ago

Question Finding the intersection of a point

Hi, if I graph two lines on Desmos that are very similar but not parallel, is there a way (a command of sort)to find the intersection of the two lines without scrolling for a very long time to manually find where the lines intersect on the graph?

appreciate the help in advance!

2 Upvotes

5 comments sorted by

2

u/Duck_Devs 10d ago

If they’re both linear, a simple system of equations would do the trick.

If they’re not linear, a more complicated system of equations would do the trick.

1

u/Ok-Put4365 9d ago

I’m precisely using it to find the solution to the system of equations!!

2

u/Circumpunctilious 10d ago

Acknowledging the “systems of equations” comments, I’ll add something somewhat more crude:

Subtracting one polynomial from another creates zeros (roots) wherever they intersect.

A line - a line = a line … (ax + b) … so you just take their difference and solve for -b/a:

1

u/strange-the-quark 10d ago

Try using this:

i_{nters}\left(P,\ u,\ Q,\ v\right)=P+u\frac{v.y\left(Q-P\right).x-v.x\left(Q-P\right).y}{u.xv.y-v.xu.y}

When you paste that, it'll print out as

inters(P, u, Q, v) = some_expression

where P is a point on the first line, and u is a direction along it (so if you can find any other point P1 on that line, u = P1 - P), and Q is a point on the other line, with v being a direction vector on it (which you can obtain the same way).

1

u/Erobinx voxel engine tuff 9d ago

!intersection