Plane plotted with fimplicit3 fails to render
10 次查看(过去 30 天)
显示 更早的评论
load data E C ax
planefun=@(x,y,z) E(1)*x+E(2)*y+E(3)*z+E(4);
In the plot below, I successfully plot a point C and try to superimpose, with fimplicit3, the plot of a plane described by planefun. Since C nearly satisfies the plane equation,
planefun(C(1), C(2), C(3))
I think I should be able to see a portion of the plane in the figure (and it should pass through C), but I do not. Why?
plot3(C(1), C(2),C(3),'x'); axis(ax); hold on
fimplicit3(planefun,ax); hold off
0 个评论
采纳的回答
更多回答(1 个)
akshatsood
2024-2-5
I have noticed that you are experiencing difficulties with the 'fimplicit3' function during plotting. After attempting to replicate the issue, I encountered similar behavior. It appears that the problem stems from the axis limits defined by 'ax'. The 'fimplicit3' function requires an adequate range to properly visualize the surface where f(x,y,z) = 0 intersects the level f=0. In your instance, the provided 'ax' limits were insufficient, preventing the curve from rendering correctly.
Below is the revised code snippet with appropriate adjustments.
load data E C ax
planefun=@(x,y,z) E(1)*x+E(2)*y+E(3)*z+E(4);
plot3(C(1), C(2),C(3),'x','LineWidth',2,'Color','r');
hold on
f = fimplicit3(planefun,[-250 0]);
f.EdgeColor = 'none';
f.FaceAlpha = 0.8;
hold off
Have a look at the following references for a better understanding
I hope this helps.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!