# Maple Dynamic Allocation

1. May 16, 2005

### NSX

I'm making a MCML program on Maple, and I want to use the pointplot3d feature in conjunction with connect=true to show photon propagation.

For each photon run , x, y, and z values are generated.

I know how to make a pointplot3d plot given the points.
e.g.
Code (Text):

points:= {[0,1,1],[1,-1,2],[3,0,5],[1,1,1],[1,1,2]}:
pointplot3d(points, labels=[x,y,z], connect=true, axes=BOXED);

However, the (x,y,z) values are being dynamically generated, and there are thousands of values.

Is there any way to put the values being generated into an array, and pointplot3d it?

If so, can you please show me sample code, or head me in the right direction?

Much thanks,
NSX

Nvm, I got it.

My supervisor showed me a cool way to do it:

Code (Text):

ic := ic + 1;
P||ic := [x,y,z];
print(P||ic);
with(plots):
pointplot3d({seq(P||i,i=1..250)},symbol=DIAMOND, symbolsize=10, connect=true, axes=BOXED);

And there's other stuff too, but that's the main idea.

Last edited: May 16, 2005