如何绘制普林格尔形状的函数

发布于 2025-01-17 01:03:48 字数 475 浏览 3 评论 0原文

我想在 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');

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文