Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

How to put points from file to create 3D.?

Asked by Lalit Patil on 5 Dec 2012

I have this text file,

http://speedy.sh/sANpC/New3d.txt

And script for it is,

fileID = fopen('New3d.txt');

C = textscan(fileID, '%f %f %f');

fclose(fileID);

x=cell2mat(C(:,1));

y=cell2mat(C(:,2));

z=cell2mat(C(:,3));

patch(x,y,z,'R')

view(3)

axis equal off tight vis3d; camzoom(1.2)

colormap(spring)

rotate3d on

I have written this script to create 3D..

 But this script connects all the points in image, where as i only want only to put the poins, so, how to do it..?

0 Comments

Lalit Patil

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 5 Dec 2012

Instead of using patch(), use

scatter3(x,y,z)

1 Comment

Lalit Patil on 5 Dec 2012

Yes, i already tried it. But, it is also showing so big blue circle dots. As my text file points are so dense, so i want only point which looks like just a dot..

Walter Roberson

Contact us