Cody

Problem 44253. Compute the intersect point of line and plan

Solution 1251400

Submitted on 15 Aug 2017 by Chris Cleveland
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
A = [1, 2, 3]; B = [-4, -5, -6]; D = [8 1 6]; E = [3 5 7]; F = [4 9 2]; O = [3.1429 5.0000 6.8571] assert(norm(intersectOfLineAndPlan(A,B,D,E,F)-O)<1e-4)

O = 3.1429 5.0000 6.8571

2   Pass
A = [ -3.11, 8.35, 3.24]; B = [ 5.61, -4.62, -1.68]; D = [ 3.51, 5.31, 6.84]; E = [ -9.87, -6.23, 6.66]; F = [ 2.04, -4.25, -4.87]; O = [2.683498, -0.267164, -0.028809]; assert(norm(intersectOfLineAndPlan(A,B,D,E,F)-O)<1e-4)

3   Pass
A = [ -2.26, -8.18, 2.27]; B = [ 8.32, 1.52, 1.64]; D = [ -9.98, 3.67, 0.81]; E = [ -0.75, 0.93, 7.40]; F = [ -1.51, -1.49, -4.70]; O = [3.945810, -2.490363, 1.900467]; assert(norm(intersectOfLineAndPlan(A,B,D,E,F)-O)<1e-4)

4   Pass
A = [ -0.78, 2.89, -3.64]; B = [ 5.40, 2.95, -7.62]; D = [ -3.55, 3.58, 8.80]; E = [ 5.69, 2.72, 2.91]; F = [ -0.57, 8.90, -0.41]; O = [87.248536, 3.744646, -60.331517]; assert(norm(intersectOfLineAndPlan(A,B,D,E,F)-O)<1e-4)

5   Pass
A = [ -9.28, -5.82, 2.79]; B = [ -6.48, 4.19, 0.89]; D = [ 4.44, -5.28, 2.95]; E = [ -0.53, -7.61, 0.88]; F = [ -6.95, 2.15, 4.42]; O = [-8.249071, -2.134430, 2.090441]; assert(norm(intersectOfLineAndPlan(A,B,D,E,F)-O)<1e-4)

6   Pass
A = [ -3.18, -1.00, 0.45]; B = [ 2.15, -0.83, 9.87]; D = [ -6.17, 3.24, -5.63]; E = [ 4.77, 5.41, -7.88]; F = [ -5.14, -3.00, -7.81]; O = [-7.217344, -1.128771, -6.685419]; assert(norm(intersectOfLineAndPlan(A,B,D,E,F)-O)<1e-4)

Suggested Problems

More from this Author17

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!