Search code examples
curvemapleplot3d

How to intensify the 3d aspect of a curve plot with Maple?


I was trying to built a 3d plot to represent a parametrized curve in space using Maple, something like (x(t), y(t), t). I could! But the thing is that I need it as an image, so the reader will not be able to rotate this result as I am now, so I need to choice a favorable angle, and I just can't. I was wondering if it's possible to insert any type of a background like this one we usually make it appear when using Python:

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

or maybe a color varying over the curve as t changes.

Here's what I tried:

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);

And this is the best manner I could adjust it:

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


Solution

  • You could construct such a mesh of gray lines.

    You could also add some perspective to the 3D plot, to give a sense of depth.

    You could also color the curve is some way that conveyed distance or depth. (Below, I color it with a gradient in the first axis's dimension.)

    enter image description here

    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);