Can the "grid/mesh" of 3D-objects be made transparent?

8 Ansichten (letzte 30 Tage)
John Lof
John Lof am 5 Aug. 2016
Bearbeitet: John Lof am 5 Aug. 2016
Hi,
As a new user I appreciate the work-reducing plotting routines in MATLAB. I often use Cylinder and vary the transparency of the cylinder surfaces.
Can I also make the black lines ("grid/mesh") that outline the cylinder, transparent to a varying degree?
Thanks
Just an example:
i_max = 10;
for i = 1 : i_max
[X,Y,Z] = cylinder();
h(i)=surf(X,Y,Z);
a = 0.0; b = 1.0;
r1 = (b-a).*rand(1,1) + a
r2 = (b-a).*rand(1,1) + a;
r3 = (b-a).*rand(1,1) + a;
a = 0.5 * (1/i_max) * (i_max-i);
set(h(i),'FaceColor',[r1 r2 r3],'FaceAlpha', a );
hold on;
t = hgtransform;
set(h(i),'Parent', t);
Tra = makehgtform('translate', [1.2*i 1.2*i 1.2*i]);
set(t,'Matrix',Tra);
end

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by