Borrar filtros
Borrar filtros

Lighting only certain surfaces

1 visualización (últimos 30 días)
Theo
Theo el 12 de Oct. de 2011
I'd like to create a lit sphere, to be placed on an unlit surface. For example,
membrane;
[x,y,z] = sphere(40);
hold on;
surf(0.1*x,0.1*y,0.1*z+1);
light % lights everything!
The last command lights everything, but I just want to light the sphere. How would I do that?

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 12 de Oct. de 2011
Manually set the facelighting property of each object:
Z = membrane;
H(1) = surf(Z);
[x,y,z] = sphere(40);
hold on;
H(2) = surf(0.1*x,0.1*y,0.1*z+1);
set(H(1),'facelighting','none');
set(H(2),'facelighting','phong');
light % lights everything!

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by