php 绘制几何图形,科学网—mathematica绘制几何图形 - 程冬的博文

1. Plot[Sin[x], {x, -2 Pi, 2 Pi}]

2.

ContourPlot3D[

x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]

3.

F[x_, y_, z_] := z - (2 x^2 + 3 y^2);

G[x_, y_, z_] := z - (4 - y^2 - 2 x^2);

sf1 = ContourPlot3D[

F[x, y, z] == 0, {x, -2, 2}, {y, -2, 2}, {z, -4, 4},

MeshStyle -> None, Boxed -> False, Axes -> False,

ContourStyle -> {Opacity[0.9], Cyan}, BoundaryStyle -> None];

sf2 = ContourPlot3D[

G[x, y, z] == 0, {x, -2, 2}, {y, -2, 2}, {z, -4, 4},

MeshStyle -> None, Boxed -> False, Axes -> False,

ContourStyle -> {Opacity[0.6], Brown}, BoundaryStyle -> None];

sf = ContourPlot3D[

F[x, y, z] == 0, {x, -2, 2}, {y, -2, 2}, {z, -4, 4},

RegionFunction -> Function[{x, y, z}, G[x, y, z] <= 0],

Boxed -> False, Axes -> False, MaxRecursion -> 1,

MeshStyle -> None, BoundaryStyle -> {Thick, Red},

ContourStyle -> None];

Show[sf1, sf2, sf]

4. Plot[x^2 + 2*x + 1 == 0, {x, -4, 2}]

5. Plot[2*x + 1 == 0, {x, -5, 5}]

6.

tu[1] = Plot[y /. Solve[y^2 == 4*(x + 4), y], {x, -5, 4},

PlotStyle -> Blue];

tu[2] = Plot[y /. Solve[x + y == -4, y], {x, -5, 4},

PlotStyle -> Green];

tu[3] = ListPlot[

Transpose[{x /. Solve[{y^2 == 4 (x + 4), x + y == -4}, {x, y}],

y /. Solve[{y^2 == 4 (x + 4), x + y == -4}, {x, y}]}],

PlotStyle -> Directive[Red, PointSize[.02]]];

Show[Table[tu[i], {i, 1, 3}]]

转载本文请联系原作者获取授权,同时请注明本文来自程冬科学网博客。

链接地址:http://blog.sciencenet.cn/blog-448935-795567.html

上一篇:document.frames和window.frames在不同浏览器中的使用

下一篇:js直接调用action的一种解决方法

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值