by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 4.3, Creation date: 2018-09-29, Last change: 2025-09-14
Use carefully: The 'Tofplaneparam' function has not yet been extensively tested
[T,VL]=Tofplaneparam(a,b,c,d)
a: | [a b c d] or just a | |
b: | b | |
c: | c | |
d: | d |
T: | Matrix form | |
VL: | [x 0 0; y 0 0; z 0 0; |
Tofplaneparam([1,2,3,4])
This function, Tofplaneparam, converts the parameters of a plane equation into a transformation matrix and a vertex list. The plane is defined by the equation ax + by + cz + d = 0.
[a b c d] or a single value representing a in the plane equation.b in the plane equation, required if a is not a vector.c in the plane equation, required if a is not a vector.d in the plane equation, required if a is not a vector.[x 0 0; y 0 0; z 0 0], where x, y, and z are calculated as -d/a, -d/b, and -d/c respectively.[a b c d]. The values of a, b, c, and d are extracted from this vector.px, py, and pz as [-d/a 0 0], [0 -d/b 0], and [0 0 -d/c] respectively.VL using px, py, and pz.ex as the normalized vector from px to py.z as the cross product of ex and the vector from px to pz, then normalize it to get ez.y as the cross product of ez and ex, then normalize it to get ey.T using ex, ey, ez, and the mean of VL.SGfigure, sofBB, tplot, VLplot, and VLFLplot.