سؤال

According to the documentation, if isosurface() is called with no output arguments and there is no current axes, Matlab will create an axes and add lighting to the graph.

I want to render my 3D array to a GUI axes. How can I add light and set the properties of the axes so that it behaves similar to calling isosurface without output arguments?

هل كانت مفيدة؟

المحلول

If you want to create a function that behaves like isosurface() you can take a look at how it's done in it. You can do so by entering edit isosurface in the Matlab console.

The part regarding the light when there is no axes is this one:

  if isempty(ax)
    view(3); 
    camlight; lighting gouraud
  end 
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top