필터 지우기
필터 지우기

Facealpha bug in combination with 3D plots

조회 수: 2 (최근 30일)
Maruan Alberto Bracci
Maruan Alberto Bracci 2023년 2월 9일
답변: Voss 2023년 2월 9일
when this three elements are combined, the smotthing of lines is lost.
- patch or fill3
- lines in the z axis (either with line or plot3)
- alpha (like FaceAlpha)
Examples:
figure() %line smoothing is OK
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b')
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure() %no line smoothing
patch([0 1 1 0],[0 0 1 1],'b','Facealpha',.5)
view([30 30])
line([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
as well:
figure() %no smoothing
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b','Facealpha',.5)
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
Do you have the same behaviour?

답변 (1개)

Voss
Voss 2023년 2월 9일
You might try using the painters Renderer. See below for a comparison of those three cases with painters vs the default OpenGL Renderer.
figure('Renderer','OpenGL')
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b')
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','Painters')
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b')
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','OpenGL')
patch([0 1 1 0],[0 0 1 1],'b','Facealpha',.5)
view([-37.5 30])
line([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','painters')
patch([0 1 1 0],[0 0 1 1],'b','Facealpha',.5)
view([-37.5 30])
line([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','OpenGL')
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b','Facealpha',.5)
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','painters')
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b','Facealpha',.5)
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by