Math Intersection of two lines
[if $f1>$f5 && $f3$f4 && $f6$f7 && $f2>$f4 && $f6$f5 && $f3$f8 || $f1$f7 && $f2$f8 then 1 else 0]
variables/inputs:
A1 X = $f1
A1 Y = $f2
A2 X = $f3
A2 Y = $f4
B1 X = $f5
B1 Y = $f6
B2 X = $f7
B2 Y = $f8
proposal done without max, pls check if it works right.
-110
Hi Roman,
your formular doesn´t work in my test Patch
Try this one---the way you had the nodes pairs coming out, the [if] got evaluated before any node past 1 got into the expression. This one collects them all into a list first. It still doesn't work the way it was intended, but probably just a minor tweak needed. Regardless, you'll need to have the [if] evaluate this way, I think, because [nodes] sends out the values in order from node 1 upwards.
that seems not to be the problem. look at the presets. preset 1 should give a 1 as preset 2 does.
he could use $f2 until $f9 - then inlet 1 can be use to evaluate by a bang.
and to make it theoretically more correct, it should be all >= and
:)
look at the patch. if you make a "Cross" the result should be 1. If you move node 1 above node 2 you get the wrong result (0) see Preset 1. If node 1 is lower node 2 the result is right (1). so it seems to be a problem with the formular. since i don´t understand the formular i cant determinate whats wrong (i just copied it into my patch). Perhaps its a typing error. (it has not to be 100% correct so i dont need the >=
Any help is apprecitated.