Shadow on xy plane of line in plot3?
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Andrew
el 15 de Sept. de 2020
How I could plot the shadow line on xy plane for this line in plot3?
clear
close all
clc
format long
V1=1;
p1=10*10^5;
n=1.322;
V2=2;
p2=(p1*V1^n)/(V2^n);
V=V1:.01:V2;
P=(p1*V1^n)./(V.^n);
W=(p1*V1-P.*V)./(n-1);
plot3(V,P,W)
grid on
view([-19 55])
0 comentarios
Respuesta aceptada
Adam Danz
el 19 de Sept. de 2020
Editada: Adam Danz
el 15 de Mzo. de 2021
To project the 3D line onto each pair of 2D axes, set the axis limits first and then use the min or max axis limits depending on your view angle.
Add this to your code.
xlim(xlim)
ylim(ylim)
zlim(zlim)
hold on
shadeColor = [.85,.85,.85];
plot3(V,P,min(zlim).*ones(size(V)),'-','Color',shadeColor,'LineWidth',2);
plot3(V,max(ylim).*ones(size(V)),W,'-','Color',shadeColor,'LineWidth',2);
plot3(max(xlim).*ones(size(P)),P,W,'-','Color',shadeColor,'LineWidth',2);
0 comentarios
Más respuestas (1)
Asad (Mehrzad) Khoddam
el 16 de Sept. de 2020
use surfc function but you need a grid in x and y directions
0 comentarios
Ver también
Categorías
Más información sobre Contour Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!