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!