How to use Cartesian coordinates to create Grid Surface?
8 次查看(过去 30 天)
显示 更早的评论
Greetings,
I have been tasked with using Simscape Multibody to investigate contact forces between objects. One step in the Simscape process is to create a Grid Surface, as is described here: https://www.mathworks.com/help/sm/ref/gridsurface.html .
I am provided with CAD files (.stl) and have written a Matlab script that pulls in coordinate points from the STL that describe the shapes I'm interested in. It is simple enough to pull the X and Y values from the STL file and save them as vectors since Grid Surfaces require X and Y to be defined as "Coordinates in the x-direction or y-direction of the grid surface, specified as a real 1-by-m vector".
The Z values, however, are defined as "Elevations of the grid points in the grid surface, specified as a real m-by-n matrix. m and n are the lengths of the vectors for the X Grid Vector and Y Grid Vector parameters."
Does anybody have an idea of how to generate a Z-matrix given cartesian coordinates? I have manually done so with simple shapes, like a cube, but will need to eventually automate the process with a Matlab script.
Thanks
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bodies 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!