Function Repository Resource:

CoplanarQ

Source Notebook

Determine whether a set of points lies in a plane

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["CoplanarQ"][{list1,list2,}]

returns True if the set of points determined by listi lies in a plane.

Details and Options

ResourceFunction["CoplanarQ"] accepts numeric and symbolic arguments.

Examples

Basic Examples (3) 

Any set of three points of the same dimension lie in a plane:

In[1]:=
ResourceFunction[
 "CoplanarQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{{0, 0, 0}, {1, 1, 1}, {1, 2, 3}}]
Out[1]=
In[2]:=
ListPlot3D[{{0, 0, 0}, {1, 1, 1}, {1, 2, 3}}]
Out[2]=

Add a fourth point that lies in the same plane:

In[3]:=
ResourceFunction[
 "CoplanarQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{{0, 0, 0}, {1, 1, 1}, {1, 2, 3}, {2, 2, 2}}]
Out[3]=
In[4]:=
ListPlot3D[{{0, 0, 0}, {1, 1, 1}, {1, 2, 3}, {2, 2, 2}}]
Out[4]=

A set of four points need not be coplanar:

In[5]:=
ResourceFunction[
 "CoplanarQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{{0, 0, 0}, {1, 1, 1}, {1, 2, 3}, {2, 300, 2}}]
Out[5]=
In[6]:=
ListPlot3D[{{0, 0, 0}, {1, 1, 1}, {1, 2, 3}, {2, 300, 2}}]
Out[6]=

Scope (2) 

CoplanarQ works with symbolic arguments:

In[7]:=
ResourceFunction[
 "CoplanarQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{{a, b, c} , {d, e, f}, {e, f, g}, {h, i, j}}]
Out[7]=
In[8]:=
ResourceFunction[
 "CoplanarQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{{a, b, c} , {d, e, f}, {a + d, b + e, c + f}, {2 a, 2 b, 2 c}}]
Out[8]=

CoplanarQ works in higher dimensions as well:

In[9]:=
ResourceFunction[
 "CoplanarQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}}]
Out[9]=
In[10]:=
ResourceFunction[
 "CoplanarQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}, {0, 0, 0, 0}}]
Out[10]=

Publisher

Wolfram|Alpha Math Team

Version History

  • 2.0.0 – 23 March 2023
  • 1.0.0 – 15 May 2020

Related Resources

Author Notes

To view the code:

In[1]:=
SystemOpen[
 FileNameJoin[{DirectoryName[FindFile["ResourceFunctionHelpers`"]], "CollinearQ.wl"}]]

License Information