Hi. I have defined a 3D polygon creating a vertice and a face matrix to use the function Patch. Now i would like to know: how do i transform my 3D polygon in an homogeneous matrix.
Any clues ?
Thanks for the help.
No products are associated with this question.
The matrix "vert" in your code is your homogenous matrix for your purposes described in your comment.
Couldn't you just transform all of the vertices and recreate the patch? E.g.,
vert_translated=bsxfun(@plus, vert, [3,0,0]);
Note that invertible linear/affine transformations don't change the faces.
Instead of using PATCH, you could also consider using these 2 FEX files,
So first, this willl let you obtain your polyhedron as a set of inequalities A*x<=b
Now you can transform the polyhedron as you like by appropriately transforming A and b. In the case of your translation, this would be
Finally, you can plot using the plotregion() tool