在 Mathematica 中使用隐式函数

发布于 2024-12-26 01:48:23 字数 108 浏览 4 评论 0原文

我可以在 Mathematica 中绘制和处理隐式函数吗?

例如:-

x^3 + y^3 = 6xy

我可以绘制这样的函数吗?

Can I plot and deal with implicit functions in Mathematica?

for example :-

x^3 + y^3 = 6xy

Can I plot a function like this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

趁微风不噪 2025-01-02 01:48:23
ContourPlot[x^3 + y^3 == 6*x*y, {x, -2.7, 5.7}, {y, -7.5, 5}]

两条注释:

  1. 注意双等号和乘号。
  2. 您可以通过 WolframAlpha 界面找到这个确切的输入。这个界面更加宽容,几乎完全接受您的输入 - 尽管我确实需要指定我想要某种类型的绘图。

在此处输入图像描述

ContourPlot[x^3 + y^3 == 6*x*y, {x, -2.7, 5.7}, {y, -7.5, 5}]

Two comments:

  1. Note the double equals sign and the multiplication symbols.
  2. You can find this exact input via the WolframAlpha interface. This interface is more forgiving and accepts your input almost exactly - although, I did need to specify that I wanted some type of plot.

enter image description here

戏剧牡丹亭 2025-01-02 01:48:23

是的,使用ContourPlot

甚至可以通过用多个 Text 替换 Line 基元来沿其自己的曲线绘制文本 x^3 + y^3 = 6xy > 基元:

ContourPlot[x^3 + y^3 == 6 x y, {x, -4, 4}, {y, -4, 4}, 
 Background -> Black, PlotPoints -> 7, MaxRecursion -> 1, ImageSize -> 500] /. 
{
 Line[s_] :> 
 Map[
  Text[Style["x^3+y^3 = 6xy", 16, Hue[RandomReal[]]], #, {0, 0}, {1, 1}] &, 
  s]
}

Mathematicagraphics

或者您可以沿着曲线对方程进行动画处理,如下所示:

res = Table[ Normal[
 ContourPlot[x^3 + y^3 == 6 x y, {x, -4, 4}, {y, -4, 4}, 
  Background -> Black, 
  ImageSize -> 600]] /. 
 {Line[s_] :> {Line[s], 
   Text[Style["x^3+y^3 = 6xy", 16, Red], s[[k]], {0, 0}, 
    s[[k + 1]] - s[[k]]]}},
  {k, 1, 448, 3}];

ListAnimate[res]

Mathematica 图形

Yes, using ContourPlot.

And it's even possible to plot the text x^3 + y^3 = 6xy along its own curve, by replacing the Line primitive with several Text primitives:

ContourPlot[x^3 + y^3 == 6 x y, {x, -4, 4}, {y, -4, 4}, 
 Background -> Black, PlotPoints -> 7, MaxRecursion -> 1, ImageSize -> 500] /. 
{
 Line[s_] :> 
 Map[
  Text[Style["x^3+y^3 = 6xy", 16, Hue[RandomReal[]]], #, {0, 0}, {1, 1}] &, 
  s]
}

Mathematica graphics

Or you can animate the equation along the curve, like so:

res = Table[ Normal[
 ContourPlot[x^3 + y^3 == 6 x y, {x, -4, 4}, {y, -4, 4}, 
  Background -> Black, 
  ImageSize -> 600]] /. 
 {Line[s_] :> {Line[s], 
   Text[Style["x^3+y^3 = 6xy", 16, Red], s[[k]], {0, 0}, 
    s[[k + 1]] - s[[k]]]}},
  {k, 1, 448, 3}];

ListAnimate[res]

Mathematica graphics

つ低調成傷 2025-01-02 01:48:23

我猜这就是您所需要的:

http://reference.wolfram .com/mathematica/Compatibility/tutorial/Graphics/ImplicitPlot.html

ContourPlot[x^3 + y^3 == 6 x*y, {x, -10, 10}, {y, -10, 10}]

在此输入图像描述

I'm guessing this is what you need:

http://reference.wolfram.com/mathematica/Compatibility/tutorial/Graphics/ImplicitPlot.html

ContourPlot[x^3 + y^3 == 6 x*y, {x, -10, 10}, {y, -10, 10}]

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文