Question: How to diplay lots of curves

Using Maple-18 on Window 11...

I have a set of curves in a Maple 'vector.' I want to plot them all on the same figure, but if call 'display' with the vector it makes separate plots for each one. I have to all it with each plot individual to get them on the same plot:

lc is a 'vector' of curves (I use 'vector' because I want to append and that doesn't work for 'list')

display(lc) -- plots a separate plot for each element of lc

display(lc[1], lc[2], lc[3],...) puts them all on one plot as needed, but as there will be a large numbe of curvesr it's extremely tedious.

It is a Huygens principle based simulation of diffraction.

restart

estart; with(Physics); with(LinearAlgebra); with(VectorCalculus); with(Optimization); with(Statistics); with(ArrayTools); with(plots); with(plottools); with(Threads); with(MmaTranslator[Mma]), with(StringTools); with(CodeGeneration); with(ImageTools); with(ImageTools:-Draw); VectorCalculus:-`*`(Setup(mathematicalnotation = true), Setup(coordinatesystems = cartesian))

estart

 

[annulus, arc, arrow, circle, cone, cuboid, curve, cutin, cutout, cylinder, disk, dodecahedron, ellipse, ellipticArc, exportplot, extrude, getdata, hemisphere, hexahedron, homothety, hyperbola, icosahedron, importplot, line, octahedron, parallelepiped, pieslice, point, polygon, prism, project, rectangle, reflect, rotate, scale, sector, semitorus, sphere, stellate, tetrahedron, torus, transform, translate]

 

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x, y, z, t)}

 

`Systems of spacetime Coordinates are:`*{X = (x, y, z, t)}

(1)

NULL

NULL

 

radius := 1.0

1.0

(2)

NULL

NULL

``

NULL

alpha := sin((1/4)*Pi)

(1/2)*2^(1/2)

(3)

step := .2

.2

(4)

radius := 100.0

100.0

(5)

l1 := line([0, 0], [100, 100])

CURVES([[0., 0.], [100., 100.]])

(6)

loAng := 0.

0.

(7)

hiAng := (1/2)*Pi

(1/2)*Pi

(8)

c1 := arc([0, 0.], radius, loAng .. Pi, color = "red")

c2 := arc([step, 0.], -alpha*step+radius, loAng .. hiAng, color = "blue")

c3 := arc([2*step, 0.], -2*alpha*step+radius, loAng .. Pi, color = "purple")

c4 := arc([3*step, 0.], -3*alpha*step+radius, loAng .. Pi, color = "black")

plots[display](l1, c1, c2, c3, c4, view = [0. .. radius, 0 .. radius])

 

`cir≔arc`([x, 0.], radius-step, loAng .. hiAng, i, color = "red")

`cir≔arc`([x, 0.], 99.8, 0. .. (1/2)*Pi, i, color = "red")

(9)

``

xLimitWall := 500.0; nScatter := 20; step := xLimitWall/(nScatter+1); x := 0.; for i from 0 to nScatter do x := x+step; cir := arc([x, 0.], radius-step, 0 .. Pi, color = "red"); if i = 0 then lc := Vector([cir]) else i; cir; Append(lc, cir) end if end do; lc

xLimitWall := 500.0

 

nScatter := 20

 

step := 23.80952381

 

x := 0.

 

x := 23.80952381

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 47.61904762

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 71.42857143

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 95.23809524

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 119.0476190

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 142.8571428

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 166.6666666

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 190.4761904

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 214.2857142

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 238.0952380

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 261.9047618

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 285.7142856

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 309.5238094

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 333.3333332

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 357.1428570

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 380.9523808

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 404.7619046

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 428.5714284

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 452.3809522

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 476.1904760

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 499.9999998

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

Vector[column](%id = 4400555778)

(10)

lc[1]

CURVES(Matrix(%id = 4400554242), COLOUR(RGB, 1.00000000, 0., 0.))

(11)

lc(2)

``

lc

lc[1]

``

Download JFKWEdgeDifractionDirection.mwJFKWEdgeDifractionDirection.mwen.

Please Wait...