T=Tofhesseplane([d,ez,T0])
d : | distance to plane | |
ez : | ez vector of plane | |
T0 : | optional relative plane that is used for d and ez; default is eye(4) |
T : | HT matrix of plane |
Tofhesseplane(5,[0.8 0.4 0.4]) % relative to T=eye(4)
Tofhesseplane(5,[1 1 1], TofPez([0 0 -10],[0 0 1])) % with respect to a plane at [0 0 -10]
This function, Tofhesseplane
, computes a homogeneous transformation (HT) matrix from the Hesse normal form of a plane. It is part of the SolidGeometry library and was introduced in version 5.2.
eye(4)
.getfuncparams
function. This function extracts the parameters from the input arguments, providing default values if necessary.ez
vector to ensure it is a unit vector. This is done by dividing the vector by its norm.T
using the TofPez
function. This function takes the product of d
and ez
as the position vector and ez
as the normal vector.T
by T0
to account for any relative transformation specified by T0
.nargout==0
), call the hesseplaneofT
function to display or process the resulting transformation matrix T
with respect to T0
.Here are two examples of how to use the Tofhesseplane
function:
Tofhesseplane(5, [0.8, 0.4, 0.4])
: Computes the HT matrix for a plane 5 units away from the origin with a normal vector of [0.8, 0.4, 0.4], relative to the identity matrix.Tofhesseplane(5, [1, 1, 1], TofPez([0, 0, -10], [0, 0, 1]))
: Computes the HT matrix for a plane 5 units away with a normal vector of [1, 1, 1], relative to another plane located at [0, 0, -10] with a normal vector of [0, 0, 1].