Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: How can I create a 3D line object in Matlab which I can light using a light object?
Posted:
Jan 18, 2013 1:27 PM


"Chris" wrote in message <kdc3fd$cns$1@newscl01ah.mathworks.com>... > Hi, > > I have 3 vectors which specify the X, Y, and Z coordinates of various points on a line in 3space. I plot them using plot3, i.e. > > plot3(X,Y,Z,'go','LineWidth',4,'MarkerSize',32); grid on > > to get a 3D line object on a grid. I would like to be able to change the lighting on the object using a command like lightangle, but it seems to only work with objects created with surf, mesh, etc. Does anyone have a good way to turn my line into an object which I can adjust the lighting of? > > Thanks, Chris
You cannot light lines. You would have to give calculate the coordinates of a similar very thin cylinder and then plot it using the surf function. Shouldnt be too hard...



