Home ] Parametric Equation Lesson ] MATH ] T ] SAM easy ] SAM ] [ Maple Input & Equations for the Tubeplots ]

# Parametric Equations and Tubeplots
# by
# Louis Feicht
# Copyright 1997
# Include the Plots Library
> with(plots);

[animate, animate3d, changecoords, complexplot, complexplot3d,

conformal, contourplot, contourplot3d, coordplot, coordplot3d,

cylinderplot, densityplot, display, display3d, fieldplot,

fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d,

inequal, listcontplot, listcontplot3d, listdensityplot, listplot,

listplot3d, loglogplot, logplot, matrixplot, odeplot, pareto,

pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d,

polyhedraplot, replot, rootlocus, semilogplot, setoptions,

setoptions3d, spacecurve, sparsematrixplot, sphereplot, surfdata,

textplot, textplot3d, tubeplot]

# Introduction
# A vertical line. Keep the number of points low until you are ready for
# the finished product.
#
> tubeplot([0,0,t,t=0..10],style=patch,numpoints=5,radius=1,axes=normal)
> ;
>

# Setting the range on the axes using "view" and "orientation" of the
# graph .
> tubeplot([0,0,t,t=0..10],style=patch,numpoints=15,radius=1,axes=normal
> ,view=[-10..10,-10..10,-10..10], orientation=[16,80]);
>

# A Horizontal Line
> tubeplot([0,t,0,t=0..4],style=patch,numpoints=15,radius=1,axes=normal,
> view=[-5..5,-5..5,-1..5], orientation=[16,80]);
>

# Combining Plots
# The letter "L"
> tubeplot({[0,0,t,t=0..10],[0,t,0,t=0..4]}, style
> =patch,numpoints=5,radius=1,axes=normal, orientation=[22,78]);
# The letter "S"
> tubeplot({[0,t,10,t=10..14],[0,10,t,t=5..10],
> [0,t,5,t=10..14],[0,14,t,t=0..5],[0,t,0,t=10..14]},numpoints=5,
> radius=1, axes=normal, scaling=constrained,
> style=patch,orientation=[44, 68]);
# My Name Using Stick Letters
>
> tubeplot({[0,0,t,t=0..10], [0,t,0,t=0..4],[0,6,t,t=0..10],[0,t, 0,
> t=6..10],[0,t,10,t=6..10],[0,10,t,t=0..10],[0,12,t,t=0..10],[0,t, 0,
> t=12..18],[0,18,t,t=0..10],[0,20,t,t=0..10],[0,t,0,t=22..27],[0,27,t,t
> =0..5],[0,t,5,t=22..27],[0,22,t,t=5..10],[0,t, 10,
> t=22..27]},numpoints=5,radius=1,axes=normal, orientation=[22,78]);
>

# "SAM" using stick letters
> tubeplot({[0,t,10,t=10..14],[0,10,t,t=5..10],
> [0,t,5,t=10..14],[0,14,t,t=0..5],[0,t,0,t=10..14], [0,20,t,t=0..10],
> [0,25,t,t=0..10], [0,t,10,t=20..25],
> [0,t,5,t=20..25],[0,t,10,t=20..25],
> [0,31,t,t=0..10],[0,40,t,t=0..10],[0,t,10,t=31..40],[0,35.5,t,t=6..10]
> }, numpoints=5, radius=1, axes=normal, scaling=constrained,
> style=patch,orientation=[44, 68]);

# The Letter "S" using a sine function
#
> tubeplot([0,2*sin(t),t,t=-1..2*Pi+1],style=patch,numpoints=20,radius=1
> ,axes=normal,scaling=constrained);

# "SAM" using more sophisticated functions
> tubeplot({[0,3*sin(2*Pi/10*t),t,t=0..10],[0, t, -2*abs(t-10)+10,
> t=5..15],[0, t, 5, t=8..12], [0,t, -.5*(t-24)*(t-18)*(t-21)^2, t
> =18..24]},
> numpoints=20,radius=1,axes=normal,sytyle=patch,scaling=constrained,ori
> entation=[44, 86]);
>

# "We"
> tubeplot({[-10,.5*(t-11.5)^2-10,t+15, t=10.75..13.5],
> [-10,t-10,20+5*sqrt(t^2-1), t=1..2],[-10,t-10,20-5*sqrt(t^2-1),
> t=1..1.5],[-10,t-10,6*t+6,t=1.5..3.85],[-10,t-10,1.75*ln(t-3.5)+31,t=3
> .5001..3.9],[-10,t-10,28+5*sqrt((t-6.5)^2-1),
> t=4.8..5.5],[-10,t-10,28-5*sqrt((t-6.5)^2-1),
> t=3.75..5.5],[-10,t-10,exp(t-7)+19,t=6..8.15000],[-10,t-10,22+sqrt(1-(
> t-7)^2),t=6.0000..8.0],[-10,t-10,3*exp(t-8)+13,t=8..8.45],[-10,1.5*cos
> (t)-2.8, 4*sin(t)+19.5, t=0.75*Pi...1.7*Pi]}, numpoints=10,radius=.5,
> axes=normal, style=PATCH, orientation=[1,89]);
>

# "Love"
# The "L"
#
> tubeplot({[0,t,.01*(t+8)^3*t*(t-10),t=-8..-5.600],[0,t,-2*(t+4.65)^2+1
> 4,t=-5.6500..-4], [0,t,cos(2*(t+3))+.5,t=-8..-4]},
> numpoints=10,radius=.5, axes=normal, style=PATCH, orientation=[1,89]);
>
#
# The "O"
#
> tubeplot({[0,cos(t)-2, 4*sin(t)+3, t=0..2*Pi]},
> numpoints=10,radius=.5, axes=normal, style=PATCH,orientation=[1,89]);

#

# The "V"
#
#
> tubeplot({[0,cos(t)+3, 5*sin(t)+4, t=.8*Pi..1.4*Pi],
> [0,-2*cos(t)+2,5*sin(t)+4,t=.8*Pi..1.4*Pi],[0,2*sin(t-6.5)+2.25,t,t=4.
> ..6.5]}, numpoints=10,radius=.5, axes=normal, style=PATCH,
> orientation=[1,89]);
# The "E"
#
#
> tubeplot({[0,0,t,t=0..14],[0,0,t,t=0..15],[0,t,exp(t-7)+4,t=6..8.15000
> ],[0,t,7+sqrt(1-(t-7)^2),t=6.0000..8.0],
> [0,t,3*exp(t-8)-2,t=8..8.45],[0,1.5*cos(t)+7.2, 4*sin(t)+4.5,
> t=0.75*Pi...1.7*Pi]}, numpoints=20, radius=.5, axes=normal,
> style=PATCH, orientation=[1,89]);
>
>
>
>

#
# "We Love"
> tubeplot({[0,t,.01*(t+8)^3*t*(t-10),t=-8..-5.600],[0,t,-2*(t+4.65)^2+1
> 4,t=-5.6500..-4], [0,t,cos(2*(t+3))+.5,t=-8..-4],[0,cos(t)-2,
> 4*sin(t)+3, t=0..2*Pi],[0,cos(t)+3, 5*sin(t)+4, t=.8*Pi..1.4*Pi],
> [0,-2*cos(t)+2,5*sin(t)+4,t=.8*Pi..1.4*Pi],
> [0,2*sin(t-6.5)+2.25,t,t=4...6.5],[0,t,exp(t-7)+4,t=6..8.15000],[0,t,7
> +sqrt(1-(t-7)^2),t=6.0000..8.0],
> [0,t,3*exp(t-8)-2,t=8..8.45],[0,1.5*cos(t)+7.2, 4*sin(t)+4.5,
> t=0.75*Pi...1.7*Pi],[-10,.5*(t-11.5)^2-10,t+15, t=10.75..13.5],
> [-10,t-10,20+5*sqrt(t^2-1), t=1..2],[-10,t-10,20-5*sqrt(t^2-1),
> t=1..1.5],[-10,t-10,6*t+6,t=1.5..3.85],[-10,t-10,1.75*ln(t-3.5)+31,t=3
> .5001..3.9],[-10,t-10,28+5*sqrt((t-6.5)^2-1),
> t=4.8..5.5],[-10,t-10,28-5*sqrt((t-6.5)^2-1),
> t=3.75..5.5],[-10,t-10,exp(t-7)+19,t=6..8.15000],[-10,t-10,22+sqrt(1-(
> t-7)^2),t=6.0000..8.0],[-10,t-10,3*exp(t-8)+13,t=8..8.45],[-10,1.5*cos
> (t)-2.8, 4*sin(t)+19.5, t=0.75*Pi...1.7*Pi]}, numpoints=10,radius=.5,
> axes=normal, style=PATCH, orientation=[3,87], labels=[x,y,z]);
>

# The word "Math" using a mixture of functions.
> tubeplot({[0,.5*(t-11.5)^2-12,t, t=10.75..13.825],[0, t-12,
> 6*(t-.5)^2,t=.65..2], [0,2*cos(t)-12.65,2.75*sin(t)+2.35,t=1.2*Pi..
> 1.77*Pi],[0,t,-2.75*t-13.75,t=-10..-5],
> [0,t-8,2.5*sqrt((t-2)^2-1),t=3..7.7],[0,t-5,1.75*ln(t-4.5)+16,t=4.5001
> ..4.9], [0,2.2*cos(t)+4.75,4.32*sin(t)+4.5,t=.9..1.7*Pi],
> [0,t-3,-log(t-9),t=9.00025..9.85], [0,t-2,13*t-156, t=12.075..13],
> [0,t-2,8,t=11..14],[0,t-2,2*(t-13)^2,t=12..14],
> [0,t,-.01*(t-18.3)^8+14, t=15.82..18], [0,t,-2*(t-18)^2+8.458,
> t=16..19.15],[0,t,22*(t-18.34)*(t-19.7)^2, t=19.1..19.9]},
> numpoints=15,radius=.75, axes=normal, orientation=[-3,85],
> labels=['x','y','z'],style=patch,thickness=1,linestyle=1,labelfont=[TI
> MES,BOLDITALIC,12]);

>
# "We Love Math" using a function for color
> F := (x,y) ->.1*sin(.7*x)+.1*sin(.1*x);

F := (x, y) -> .1 sin(.7 x) + .1 sin(.1 x)

#
> tubeplot({[0,t,.01*(t+8)^3*t*(t-10),t=-8..-5.600],[0,t,-2*(t+4.65)^2+1
> 4,t=-5.6500..-4], [0,t,cos(2*(t+3))+.5,t=-8..-4],[0,cos(t)-2,
> 4*sin(t)+3, t=0..2*Pi],[0,cos(t)+3, 5*sin(t)+4, t=.8*Pi..1.4*Pi],
> [0,-2*cos(t)+2,5*sin(t)+4,t=.8*Pi..1.4*Pi],
> [0,2*sin(t-6.5)+2.25,t,t=4...6.5],[0,t,exp(t-7)+4,t=6..8.15000],[0,t,7
> +sqrt(1-(t-7)^2),t=6.0000..8.0],
> [0,t,3*exp(t-8)-2,t=8..8.45],[0,1.5*cos(t)+7.2, 4*sin(t)+4.5,
> t=0.75*Pi...1.7*Pi],[-10,.5*(t-11.5)^2-10-2,t+15, t=10.75..13.5],
> [-10,t-10-2,20+5*sqrt(t^2-1), t=1..2],[-10,t-10-2,20-5*sqrt(t^2-1),
> t=1..1.5],[-10,t-10-2,6*t+6,t=1.5..3.85],[-10,t-10-2,1.75*ln(t-3.5)+31
> ,t=3.5001..3.9],[-10,2*t-10-2-4,28+5*sqrt((t-6.5)^2-1),
> t=4.8..5.5],[-10,2*t-10-2-4,28-5*sqrt((t-6.5)^2-1),
> t=3.75..5.5],[-10,t-10,exp(t-7)+19,t=6..8.15000],[-10,t-10,22+sqrt(1-(
> t-7)^2),t=6.0000..8.0],[-10,t-10,3*exp(t-8)+13,t=8..8.45],[-10,1.5*cos
> (t)-2.8, 4*sin(t)+19.5, t=0.75*Pi...1.7*Pi],[10,.5*(t-11.5)^2,t-15,
> t=10.75..13.65],[10, t, 6*(t-.5)^2-15,t=-.2..2],
> [10,t,-14*t+42-15,t=2..3],
> [10,t,5.65*sqrt((t-2)^2-1)-15,t=3..4.75],[10,t,1.75*ln(t-4.5)+16-15,t=
> 4.5001..4.9], [10,t,6.2+2*sqrt(1-((t-8.25)^2)/4)-15,t=5.600..9], [10,
> .05*(t-4)^2+6,t-15,t=2..7],
> [10,t,-log(t-9)-15,t=9.00025..9.5],[10,t,7-sqrt(40-11*(t-7.3)^2)-15,t=
> 6.1..9.1], [10,t,13*t-156-15, t=12.075..13],
> [10,t,8-15,t=11..14],[10,t,2*(t-13)^2-15,t=12..14],
> [10,t,-.01*(t-18.3)^8+14-15, t=15.82..18], [10,t,-2*(t-18)^2+8.458-15,
> t=16..19.15],[10,t,22*(t-18.34)*(t-19.7)^2-15, t=19.1..19.9]},
> numpoints=15,radius=.75, axes=normal, orientation=[-19,74],
> labels=['x','y','z'],style=patch,
> color=F,lightmodel=light2,thickness=1,linestyle=1,labelfont=[TIMES,BOL
> DITALIC,12]);
>

>
# Math using a funtion for color
# Parameters for color arrived at by guess and check
> F := (x,y) ->.1*sin(.7*x)+.1*sin(.1*x);

F := (x, y) -> .1 sin(.7 x) + .1 sin(.1 x)

#
> tubeplot({[0,.5*(t-11.5)^2,t, t=10.75..13.65],[0, t,
> 6*(t-.5)^2,t=-.2..2], [0,t,-14*t+42,t=2..3],
> [0,t,5.65*sqrt((t-2)^2-1),t=3..4.75],[0,t,1.75*ln(t-4.5)+16,t=4.5001..
> 4.9], [0,t,6.2+2*sqrt(1-((t-8.25)^2)/4),t=5.600..9], [0,
> .05*(t-4)^2+6,t,t=2..7],
> [0,t,-log(t-9),t=9.00025..9.5],[0,t,7-sqrt(40-11*(t-7.3)^2),t=6.1..9.1
> ], [0,t,13*t-156, t=12.075..13],
> [0,t,8,t=11..14],[0,t,2*(t-13)^2,t=12..14], [0,t,-.01*(t-18.3)^8+14,
> t=15.82..18], [0,t,-2*(t-18)^2+8.458,
> t=16..19.15],[0,t,22*(t-18.34)*(t-19.7)^2, t=19.1..19.9]},
> color=F,numpoints=10,radius=.5, axes=normal, style=PATCH,
> orientation=[1,89]);
>
>