필터 지우기
필터 지우기

How to write axes on an imported mesh

조회 수: 3 (최근 30일)
Geraldina Berti
Geraldina Berti 2023년 9월 27일
편집: Fabio Freschi 2023년 9월 28일
Hello everyone,
I need help on a specific topic on Matlab.
I need to import on Matlab a meshed sphera created in Rhino7 and to insert in Matlab an axis passing through that sphera.
How can I insert the axis?
Thank you in advance
  댓글 수: 10
dpb
dpb 2023년 9월 27일
unzip('Analisi Matlab.zip')
mesh=readSurfaceMesh('Analisi Matlab')
readSurfaceMesh requires Lidar Toolbox.
surfaceMeshShow(mesh)
Looks as though the Lidar TB isn't available to the Answers forum interactive session....
Geraldina Berti
Geraldina Berti 2023년 9월 27일
Maybe you need this folder too

댓글을 달려면 로그인하십시오.

답변 (1개)

Fabio Freschi
Fabio Freschi 2023년 9월 28일
편집: Fabio Freschi 2023년 9월 28일
You can use quiver3. In the example below I plot the 3 coordinate axes, you can modify accoridng to your vectors
clear variables, close all
% unzip
unzip('Sfera.zip');
% load stl file
tri = stlread('Sfera.stl');
% plot triangulation
figure, axis equal, hold on
view([1 1 1])
trisurf(tri,'FaceAlpha',0.5);
% plot three coordinate axes
vx = [1 0 0];
vy = [0 1 0];
vz = [0 0 1];
quiver3([0 0 0],[0 0 0],[0 0 0],... % starting points
[vx(1) vy(1) vz(1)],[vx(2) vy(2) vz(2)],[vx(3) vy(3) vz(3)],... % vectors
10,... % scaling
'filled','LineWidth',3); % appearance params

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by