Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How can I create a 3D line object in Matlab which I can light using a light object?
Replies: 1   Last Post: Jan 18, 2013 1:27 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
matt dash

Posts: 635
Registered: 4/18/08
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
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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 3-space. 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...



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.