Intersection of two planesI’m looking for an answer to this and not sure if there is an easy JMP solution. I have two formulas in JMP, each have two X variables. I can make surface plots of these in JMP easy enough and I can visually see that the two planes (well, curved planes) intersect.
I’d like to determine the line that defines the location of the intersection, and if possible get the angle of intersection (tangent planes to both surfaces at the location of the intersection) in the X1 direction.
I see Profiler-based solutions in JMP if the two formulas are based on one X variable. This can be done by subtracting the two formulas from each other and use desirability to match-target to zero to get the intersection point as shown in https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12588. But my problem doesn’t result in an intersection point but rather in an intersection line.
If there’s an easy solution, great. If not, I should be able to solve it with other software.
Re: Intersection of two planesThis works well enough. It turns out that the engineer I was working with on this one had a categorical X1 and a continuous X2, and that complicates the solution a bit. But for the two-continuous-variable case this works.
Re: Intersection of two planesYou could also use the Profiler's ability to save and expanded formula to get the formula for the difference of the two planes. You could then parse that formula to get the coefficients. You can try this script on the data table I uploaded.
_dt=current data table();
y1formula = char(Simplify Expr(_dt:y1 << Get Formula));
y2formula = char(Simplify Expr(_dt:y2 << Get Formula));
_dt << New Column ("Y1-Y2", Formula(:Y1-:Y2));
_pf=Profiler(
Y( :Name( "Y1-Y2" ) ),
Profiler(
1,
Term Value(
X1( 0.5, Lock( 0 ), Show( 1 ) ),
X2( 0.55, Lock( 0 ), Show( 1 ) )
)
),
Expand
);
_pf << Save Expanded Formulas;
_pf << Close Window;
diffformula = char(simplify Expr(column(_dt, "Expanded Y1-Y2")<<GET formula=""></GET>Re: Intersection of two planesLooks like the file attachement didn't go through. Trying again.
Re: Intersection of two planesIf you have the equation of the planes in two column formulas (in column y1 and y2), you could you this JSL to get the formula
_dt=current data table();
y1formula = char(Simplify Expr(_dt:y1 << Get Formula));
y2formula = char(Simplify Expr(_dt:y2 << Get Formula));
You'd then have to figure out how to parse those character strings to get the coefficients for the formula. Simplify Expr() will make both formulas similar in structure, and then probably the Regex() function would work the best for parsing out the coefficients. I don't know enough about regex to figure out the search pattern. Once you had the coefficients, you could then do the math get the coefficients for the line of intersection.
As you stated, you could use Surface Plot to visualize the intersection. See attached file with an example.
Re: Intersection of two planesNot sure what you mean by each formula has 2 X variables - maybe a quadratic equation???
Something, other than JMP, you might give a look-see is Maxima, available under Windoze and Mac OS. It is an open-source (gnu) symbolic mathematical (CAS - computer algebra system) application (http://maxima.sourceforge.net). Think Mathematica, but free!!! (Mathemetica might have something available - haven't looked in a while - give https://www.wolframalpha.com a look).
There are front-ends available (it is fundamentally command-line), and pretty straightforward.