How do I outline the intersection between a plane an a cone in 3D?
6 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Directed Graphs 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!