Add new plane using the 4 coefficients of the plane

Feel free to ask any question here
Post Reply
diegoteijeiro
Posts: 2
Joined: Fri Jul 08, 2022 12:38 pm

Add new plane using the 4 coefficients of the plane

Post by diegoteijeiro »

Hello,
I have not found a way to create a new plane using the 4 coefficient of the plane.
The first 3 are the normal, so i can create a plane with the correct inclination, but i need to include the 4th coefficient since the height with respect to the origin is important.

I want to check if a fitted plane is adequate for a point cloud, but the plane is generated using another program and i only have the coefficients since i will be computing distances and it is easier to do with the coefficients.

Is there any way to just put the 4 coefficients to create a plane?, or where can i put the 4th one to offset the plane to the correct position?
Also, is there a way to restrict the render of the plane to a range of coordinates, without having to use the size and center?
diegoteijeiro
Posts: 2
Joined: Fri Jul 08, 2022 12:38 pm

Re: Add new plane using the 4 coefficients of the plane

Post by diegoteijeiro »

I think a got a way of doing it. Setting the center of the rendered plane with a point inside the plane, forces to render the plane in the correct position.

I only want to render a part of the plane, therefore i know the "size" or the X and Y ranges i want the plane to be rendered. Using the plane equation i can compute the Z coordinate of the point in the plane with the coordinates X and Y of the center of the area i want to render. Using that point as the center to position the plane, the rendered plane goes through that point and the normal sets the slope accordingly.

I only need to compute the Z coordinate of the point that lies in the plane for the X and Y that will be the center, and you can do that with the plane equation with the coefficients: Z = (-a*X-b*Y-d)/c

With that you can set the normals using coefficients a, b and c, and then set the center to the point just computed, the Z coordinate of the center will put the plane in the correct position.

Know if i knew why the plane representation is rotated it would be nice, but it is not required to check what i need.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Add new plane using the 4 coefficients of the plane

Post by daniel »

Thanks for answering your own question! That might be helpful for others.
Daniel, CloudCompare admin
Post Reply