How do I outline the intersection between a plane an a cone in 3D?
8 次查看(过去 30 天)
显示 更早的评论
I have 2 3D graphs of a plane and cone, and while they obviously intersect, I want to find a way to highlight their intersection in a different color. How would I go about doing this?
Here is the code for the existing graphs
r = linspace(0,2*pi) ;
th = linspace(0,2*pi) ;
[R,T] = meshgrid(r,th) ;
X = R.*cos(T) ;
Y = R.*sin(T) ;
Z = R ;
figure
surf(X,Y,Z)
hold on
surf(-X,-Y,-Z)
[x, y] = meshgrid(-1:0.1:1); % Generate x and y data
z = 5* x;
s = surf(x,y,z) %Plot the surface
s.EdgeColor = 'red'
colorbar
4 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Directed Graphs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!