资 源 简 介
基于MATLAB的读取OFF文件程序!!!
function I=offread1(filename)
fid = fopen(filename, "r");
title = textscan(fid, "%s", 1);
number=textscan(fid, "%d %d %d", 1);
points=textscan(fid, "%f %f %f", number{1});
faces=textscan(fid, "%d %d %d %d", number{2});
for i = 1 : number{2}
faces{2}(i, 1) = faces{2}(i, 1) + 1;
faces{3}(i, 1) = faces{3}(i, 1) + 1;
faces{4}(i, 1) = faces{4}(i, 1) + 1;