Question: Assigning points on a plot [i,j] values

Hello,

I have a plot of a cylinder with points singled out.

Firstly, the points are currently given by (x,y,z) but I would like them in terms of (r,θ,z), how can I do this?

Secondly, I was wondering how to assign to each point an [i,j] value? So you could have r[i,j], θ[i,j] and z[i,j] as matrices of the points?

Points_on_the_initia.mwPoints_on_the_initia.mwPoints_on_the_initia.mw

 

 

restart

with(plots)

with(plottools); plots[interactive]; with(ArrayTools)

PP := polarplot([2, theta, theta = 0 .. 2*Pi], scaling = constrained, numpoints = 50); PP

slices := [seq(polarplot([2, theta, theta = 0 .. 2*Pi], numpoints = 50), z = 0 .. 2, .1)]

slices[10]

op(slices[10]); CURVES(Vector(4, {1 = ` 1..143 x 1..2 `*Array, 2 = `Data Type: `*float[8], 3 = `Storage: `*rectangular, 4 = `Order: `*C_order}), Vector(4, {1 = ` 1..33 x 1..2 `*Array, 2 = `Data Type: `*float[8], 3 = `Storage:  `*rectangular, 4 = `Order: `*C_order}), Vector(4, {1 = ` 1..33 x 1..2 `*Array, 2 = `Data Type: `*float[8], 3 = `Storage:  `*rectangular, 4 = `Order: `*C_order}), COLOUR(RGB, 1., 0., 0.)), AXESLABELS(x, y)

a := op([1, 1], slices[10])

pointplot(convert(a, listlist))

data := Array(1 .. 1, 1 .. 3); Matrix(1, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0})

for j to nops(slices) do if nops(op(1, slices[j])) > 1 then data := Concatenate(1, data, seq(Concatenate(2, op([1, k], slices[j]), Vector[column]([seq(-.1+.1*j, s = 1 .. op(2, Dimensions(op([1, k], slices[j]))[1]))])), k = 1 .. nops(op(1, slices[j]))-1)) end if end do; data; Vector(4, {1 = ` 1342 x 3 `*Matrix, 2 = `Data Type: `*anything, 3 = `Storage: `*rectangular, 4 = `Order: `*Fortran_order})

points := pointplot3d(data, axes = framed, colour = black)``

points

getdata(points)

ThePoints := convert(data, list, nested = true)

T2 := [seq(ThePoints[i], i = 2 .. 51)]``

BC1 := pointplot3d(T2, axes = framed, colour = black)

BC1

T3 := [seq(ThePoints[i], i = 1002 .. 1051)]

BC2 := pointplot3d(T3, axes = framed, colour = black)

BC2

cylinderpic := plot3d(2, theta = 0 .. 2*Pi, z = 0 .. 2, coords = cylindrical, axes = framed, color = white, transparency = .75); cylinderpic

T := [seq(ThePoints[i], i = 52 .. 1001)]NULL

Nodes := pointplot3d(T, axes = framed, colour = cyan)

Nodes

display(BC1, BC2, cylinderpic, Nodes)

 

``

``

 



Download Points_on_the_initia.mw

 

I've uploaded the file that gives all of the points!

Thank you :)

Rach

Please Wait...