# From MeshBuilder.CreatePlane how to get the equation of mathematical Plane

**URL:** <https://forum.babylonjs.com/t/from-meshbuilder-createplane-how-to-get-the-equation-of-mathematical-plane/39388>\
**Category:** Questions\
**Tags:** mesh, geometry, api\
**Created:** [March 28, 2023, 1:08am UTC](https://forum.babylonjs.com/t/from-meshbuilder-createplane-how-to-get-the-equation-of-mathematical-plane/39388 "2023-03-28T01:08:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Argha\_Chakraborty](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/argha_chakraborty/32/30592_2.png) [@Argha\_Chakraborty](https://forum.babylonjs.com/u/Argha_Chakraborty)\
**Post date:** [March 28, 2023, 1:08am UTC](https://forum.babylonjs.com/t/from-meshbuilder-createplane-how-to-get-the-equation-of-mathematical-plane/39388/1 "2023-03-28T01:08:52Z")

</div>

I am interested to find the a,b,c,d parameters of a plane ax + by + cz + d = 0, from a plane mesh formed by MeshBuilder.CreatePlane.  
Ideally, I need to find the normalized normal(a,b,c) and the distance (d) of the plane from the origin.  
Please suggest a way.

PS: I have the normal, but I don’t know to get the parameter ‘d’ from the mesh position . So now the problem now gets reduced to how to obtain the parameter d of the mathematical plane.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 28, 2023, 8:59am UTC](https://forum.babylonjs.com/t/from-meshbuilder-createplane-how-to-get-the-equation-of-mathematical-plane/39388/2 "2023-03-28T08:59:38Z")

</div>

To calculate d, you can simply take any point (x,y,z) that is on the plane and do: `d=-ax-by-cz`.

For eg, `vertices = mesh.getVerticesData("position")` will retrieve all the vertices, and **(vertices[0], vertices[1], vertices[2])** is a point on the plane. However, it is in the local coordinate system of the mesh, you will have to transform this point with the mesh world matrix to get a point in world coordinates.
