A fancy visualization of planes intersecting – Part 3 (and Final)

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.planes intersecting

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;
hold on
drawPlane(P(1,:), d(1))
drawPlane(P(2,:), d(2))
drawPlane(P(3,:), d(3))
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);

Continue reading

A fancy visualization of planes intersecting – Part 1

planes intersecting

Well, it might not be the fanciest thing in the world but it surely looks good when you try to visualize your data. You know me, I always graph whatever I do, otherwise I don’t get many ideas. I have to see what is going on, and perhaps are many people like me.

This time I’m gonna share a very simple and nice way to visualize the solution of a linear equation system with 3 unknowns and 3 equations. Continue reading