The mystery is over! From the previous posts we have seen the way we can generate a random plane, and visualize 3 of them at the same time showing their intersecting point.
It might be enough for some simple visual purposes, but we are more ambitious than that and we want to get it fancier.
And that’s why I’m here! This final step would be to achieve a neat visualization of our three planes and even the equations involved. Let’s begin with what we have so far:
P = rand(3);
d = rand(3,1);
x = P\d;
scatter3(x(1), x(2), x(3))
Where the function drawPlane was defined as:
function drawPlane(P, d)
[x, y] = meshgrid(-10:10);
z = -(1/P(3))*(P(1)*x + P(2)*y - d);
surf(x, y, z);