<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258623</link>
    <title>MATLAB Central Newsreader - Lighting help!</title>
    <description>Feed for thread: Lighting help!</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sun, 16 Aug 2009 07:26:02 -0400</pubDate>
      <title>Lighting help!</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258623#673475</link>
      <author>Husam Aldahiyat</author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
I have a 2D patch (rectangle). I want to create a line of light that horizontally crosses it in the middle.&lt;br&gt;
&lt;br&gt;
How can I do this!? I tried playing with the position property of light() but it's not working :(</description>
    </item>
    <item>
      <pubDate>Sun, 16 Aug 2009 08:05:20 -0400</pubDate>
      <title>Re: Lighting help!</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258623#673480</link>
      <author>Husam Aldahiyat</author>
      <description>I did something but it's half-baked. Any suggestions?&lt;br&gt;
&lt;br&gt;
a = [       0            0            0&lt;br&gt;
	0.75            0            0&lt;br&gt;
	0.75          0.2            0&lt;br&gt;
	0          0.2            0&lt;br&gt;
	0            0         0.15&lt;br&gt;
	0.75            0         0.15&lt;br&gt;
	0.75          0.2         0.15&lt;br&gt;
	0          0.2         0.15].*10;&lt;br&gt;
&lt;br&gt;
b=[1 2 6 5;2 3 7 6;3 4 8 7;4 1 5 8;1 2 3 4;5 6 7 8];&lt;br&gt;
&lt;br&gt;
lp=patch('vertices',a,'faces',b,'edgecolor','k','facecolor',[.24 .24 .24]+.1,'linewidth',2);&lt;br&gt;
&lt;br&gt;
hold on&lt;br&gt;
&lt;br&gt;
for k=-.5:.1/2:.5&lt;br&gt;
	&lt;br&gt;
	r = [.75/2+k .1 .195].*10;&lt;br&gt;
	light('Position',r,'style','local')&lt;br&gt;
	&lt;br&gt;
end&lt;br&gt;
axis([-1 1 -1 1 -.5 .5].*10)&lt;br&gt;
&lt;br&gt;
lighting phong</description>
    </item>
    <item>
      <pubDate>Sun, 16 Aug 2009 10:04:02 -0400</pubDate>
      <title>Re: Lighting help!</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258623#673485</link>
      <author>Husam Aldahiyat</author>
      <description>I'll rephrase my question.&lt;br&gt;
&lt;br&gt;
I need to create one ray of light to cross a rectangular object.</description>
    </item>
    <item>
      <pubDate>Tue, 18 Aug 2009 06:25:20 -0400</pubDate>
      <title>Re: Lighting help!</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258623#673889</link>
      <author>Husam Aldahiyat</author>
      <description>Here is my newest effort.&lt;br&gt;
&lt;br&gt;
close gcf&lt;br&gt;
[X,Y,Z] = cylinder([5,5],140);&lt;br&gt;
s = surf(X,Y,Z.*1);&lt;br&gt;
&lt;br&gt;
shading interp&lt;br&gt;
&lt;br&gt;
axis off&lt;br&gt;
&lt;br&gt;
set(gcf,'color','w')&lt;br&gt;
rotate(s,[1,0,0],90)&lt;br&gt;
rotate(s,[0,1,0],90)&lt;br&gt;
&lt;br&gt;
a=zeros(255,3);&lt;br&gt;
a(:,2)=transpose(linspace(.5,.7,255));&lt;br&gt;
&lt;br&gt;
colormap(a);&lt;br&gt;
&lt;br&gt;
r = [7,-.5,1];&lt;br&gt;
&lt;br&gt;
light('position',r,'style','loc')&lt;br&gt;
&lt;br&gt;
r = [7,.5,1];&lt;br&gt;
&lt;br&gt;
light('position',r,'style','loc')&lt;br&gt;
&lt;br&gt;
rotate3d&lt;br&gt;
&lt;br&gt;
view(90,0)&lt;br&gt;
axis square&lt;br&gt;
&lt;br&gt;
Anything better?</description>
    </item>
  </channel>
</rss>

