Intersect Function

Beat Cornaz beatco at gmail.com
Mon Sep 24 10:16:17 EDT 2018


Thanks Craig, I was already afraid of that. Yes, I guess I could figure out
the math. I will have the 2 functions of the lines and if I set them equal,
I could solve the intersection point of the two. Your way is also valid,
but as I need to determine many intersection points, the script might get
slow. Of course your way might prove better if we're looking at curves. The
amount of points in a curved line increases some in comparison to a
straight line, but in setting the functions equal, I'd have to deal with
quadratic functions. It just comes to me, that that is quite doable : move
everything to one side of the equal sign and apply the famous 'abc formula'
(at least that it was called in my high school years in Holland). It's used
to solve a quadratic equation. Once the 'x' is known, I can put it into one
of the functions to get the 'y' coordinate. I will see what goes faster.

Cheers, Beat

On Mon, Sep 24, 2018 at 3:15 PM dunbarxx via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Hi.
>
> No.
>
> But you can determine the points of a line graphic, and calculate all the
> pixels it "contains" from its starting point to its ending point. Do the
> same for a second line.
>
> Then you can determine the point that seems to be common to both lines. I
> say seems, because when you do the math, that is, using the slope of each
> line and calculating the points using that information, you may find that
> there are no exact matches. But you can allow a small differential, and the
> closest pair of points will be the one you want.
>
> Can you do the math?
>
> Craig Newman
>
>
>
> --
> Sent from:
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list