Can the "grid/mesh" of 3D-objects be made transparent?
4 views (last 30 days)
Show older comments
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
0 Comments
Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!