Rank: 1678 based on 75 downloads (last 30 days) and 9 files submitted
photo

Luc Masset

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Luc Masset View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
15 Feb 2013 Recursive DIR DIRREC finds files recursively in a given folder Author: Luc Masset path, directories, files, dir, folder, recursive 16 4
  • 5.0
5.0 | 3 ratings
08 Mar 2012 Screenshot GO - Change directory (cd) easily Change directory by using a keyword (search folders matching the keyword) Author: Luc Masset cd, folder, directory, command, macro 2 0
23 Feb 2012 Rotate.m function fixed Surf property "vertexnormals" are updated correctly. Author: Luc Masset rotate, surf, surface, light, lighting, vertexnormals 7 3
  • 5.0
5.0 | 2 ratings
02 Mar 2010 Ellipse arc length Computes the length of an ellipse arc given the two radiuses and the starting and ending angles. Author: Luc Masset ellipse arc length 12 3
  • 2.0
2.0 | 1 rating
17 Oct 2008 Screenshot Search files recursively (DIR2) searches files in a given folder with several criteria Author: Luc Masset path, directories, files, search, dir, extensions 11 1
  • 5.0
5.0 | 1 rating
Comments and Ratings on Luc Masset's Files View all
Updated File Comment by Comments Rating
24 Aug 2014 Search files recursively (DIR2) searches files in a given folder with several criteria Author: Luc Masset Ilya Prokin

11 Jul 2014 Rotate.m function fixed Surf property "vertexnormals" are updated correctly. Author: Luc Masset Josh

Works like a charm. Spent forever trying to figure out what was going wrong with my animation and this solves it!

15 Oct 2013 Rotate.m function fixed Surf property "vertexnormals" are updated correctly. Author: Luc Masset Ryan Gray

I did the same thing and found inconsistent behavior depending on whether there were drawnow commands or automatic refreshes.

Add a figure command to the top of the script, then try these with the stock rotate.m in use:

1. Run the script. I get a result with the light left of center.

2. Now execute the script one line at a time. I then get the light to the right of center.

3. Now add a drawnow command just before the rotate command and run the script whole. I get the same result as in (2) since in (2), the figure was allowed to update implicitly after each command. Adding a drawnow did this explicitly.

4. Add a line after the surf command:

set(hs,'VertexNormals',get(hs,'VertexNormals'));

Now when you run the script with or without a drawnow, the light is consistent but wrong.

The reason the modified rotate.m works is that by rotating the surface normals, it is setting the VertexNormals property or course, and this turns off the automatic normals calculation, putting it in "manual" mode. It is the automatic normals calculation that is buggy. The bug being that the stock rotate.m is not wrong in simply rotating the xyz data since that should trigger an automatic re-calculation of the normals but that if the normals are in manual mode, it needs to rotate them. The problem is that I don't see a way to tell what mode they are in, so always setting them solves the problem.

29 Sep 2013 Rotate.m function fixed Surf property "vertexnormals" are updated correctly. Author: Luc Masset Lucas

Works perfect. Dropped it into my project folder to override the default rotate function. No modifications to existing code needed, fixed the lighting issues I had during rotation.

15 Feb 2013 cvoronoi Computes the best approaching circle of a set of 2D points. Author: Luc Masset Jason Nicholson

Worked well on my dataset.

Contact us