如何绘制普林格尔形状的函数
我想在 Octave 中重现品客形状。 请查看附件 - 这是在 Mathematica 中使用“区域”函数完成的。 在 Octave 中也可以切割圆形吗?到目前为止,我已经得到了这个(下面的代码),但它具有矩形形状/平台,而不是像 Mathematica 中那样的圆形(如下图)。
a = 10
b = 10
x = [-10:.1:10];
y = [-10:.1:10];
[xx, yy] = meshgrid (x, y);
z = xx.^2/a.^2 - yy.^2/b.^2
h = surf(xx,yy,z);
colormap hsv;
set(h,'linestyle','none');
I would like to reproduce pringle shape in Octave.
Please, look at the attachment - that is done in Mathematica using "Region" function.
Is possible to cut that circular shape also in Octave? Until now I've got this (code below) but it has rectangular shape/ platform not circular like in Mathematica (picture below).
a = 10
b = 10
x = [-10:.1:10];
y = [-10:.1:10];
[xx, yy] = meshgrid (x, y);
z = xx.^2/a.^2 - yy.^2/b.^2
h = surf(xx,yy,z);
colormap hsv;
set(h,'linestyle','none');
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论