如何使用 Maple 增强曲线图的 3D 效果?

问题描述 投票:0回答:1

我试图使用 Maple 构建一个 3d 图来表示空间中的参数化曲线,例如 (x(t), y(t), t)。我可以!但问题是我需要它作为图像,所以读者将无法像我现在这样旋转这个结果,所以我需要选择一个有利的角度,但我不能。我想知道是否可以插入任何类型的背景,就像我们在使用 Python 时通常让它出现的背景一样:

Grid on planes as a background, I think it might help in this sense of representation of a curve in space.

或者随着 t 的变化,曲线上的颜色也会发生变化。

这是我尝试过的:

with(DEtools):
DEplot3d({diff(x(t),t) = y(t),diff(y(t),t) = (1 - x(t)^2)*y(t) - x(t)},[x(t),y(t)],t=0..15,[[x(0)=0,y(0)=0.1]],stepsize=.1,x=-2.5..2.5,linecolor=black,axes=framed,thickness=1,obsrange=FALSE);

这是我可以调整它的最佳方式:

I know it's not that bad at all, but I really think it could get better with something else that emphasizes that sense of a 3d object

curve maple plot3d
1个回答
0
投票

你可以构建这样一个灰线网格。

您还可以向 3D 绘图添加一些视角,以赋予深度感。

您还可以为曲线着色以表达距离或深度。 (下面,我在第一个轴的维度上使用渐变为其着色。)

with(plots): with(plottools):
P := DEtools[DEplot3d]({diff(x(t),t) = y(t),
                    diff(y(t),t) = (1 - x(t)^2)*y(t) - x(t)},
                   [x(t),y(t)],t=0..15,[[x(0)=0,y(0)=0.1]],
                   stepsize=.05,x=-2.5..2.5,
                   linecolor=black,axes=framed,thickness=2,
                   obsrange=false):

rngs := [op(indets(P,specfunc(VIEW))[1])]:

meshlines:=display(
           seq(line([x,op([2,1],rngs),op([3,1],rngs)],
                    [x,op([2,2],rngs),op([3,1],rngs)],
                    color=gray,thickness=0),
               x=[seq(rngs[1], numelems=7)]),
           seq(line([op([1,1],rngs),y,op([3,1],rngs)],
                    [op([1,2],rngs),y,op([3,1],rngs)],
                    color=gray,thickness=0),
               y=[seq(rngs[2], numelems=7)]),
           seq(line([op([1,1],rngs),op([2,1],rngs),z],
                    [op([1,1],rngs),op([2,2],rngs),z],
                    color=gray,thickness=0),
               z=[seq(rngs[3], numelems=7)]),
           seq(line([op([1,1],rngs),y,op([3,1],rngs)],
                    [op([1,1],rngs),y,op([3,2],rngs)],
                    color=gray,thickness=0),
               y=[seq(rngs[2], numelems=7)]),
           seq(line([x,op([2,1],rngs),op([3,1],rngs)],
                    [x,op([2,1],rngs),op([3,2],rngs)],
                    color=gray,thickness=0),
               x=[seq(rngs[1], numelems=7)]),
           seq(line([op([1,1],rngs),op([2,1],rngs),z],
                    [op([1,2],rngs),op([2,1],rngs),z],
                    color=gray,thickness=0),
               z=[seq(rngs[3], numelems=7)])):

newP := spacecurve(op(1,indets(P,specfunc(CURVES))[1]),
               thickness=3,
               colorscheme=["xgradient",["#C0FFFF",black]]):

display(meshlines, newP, axes=framed,
        labels=[t,x(t),y(t)],
        projection=0.76, orientation=[35,73,0]);
© www.soinside.com 2019 - 2024. All rights reserved.