Need HELP with diagonals in 3D wave
jarzyn
The problem I have is as follow:
I have 3 dimensional wave w3D= [x][y][z] (x=y=z=256, x and y is the base and z is height this is piezoelectric potential in two vertically stacked rings) when I use MatrixOp tmp=sumBeams(w3D) I get 2D wave which is view of the structure from the top (this is great) but the best hides in the diagonals of the matrix. Therefore what I would like to do (and completely don't know how) is cut my cube along height z and diagonal in the xy plane then do the sumBeams to obtain flat contour . I can do this in paraview so if my explanation is too wired I post the picture.
Thanks a lot for any suggestions,
Jarek
diagonal = w3D[p][p][q]
That might not be the correct diagonal, but perhaps you get the idea.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
September 12, 2011 at 09:25 am - Permalink
I suspect that what you are looking for is the ImageTransform operation with the keyword extractSurface. So, for example, if you want an output that is 100 x 200 points interpolated from the origin along a diagonal in a plane that is perpendicular to the XY plane and denoting vertices using the min/max suffix for each coordinate then you could use something like:
ImageTransform /x={100,200,Xmin,Ymin,Zmin,Xmin,Ymin,Zmax,Xmax,Ymax,Zmax} extractSurface your3DWave
I should stress here is that the order of coordinates is clockwise and that you do not skip any vertices while specifying your plane.
I hope this helps,
A.G.
WaveMetrics, Inc.
September 12, 2011 at 11:05 am - Permalink
The method suggested by johnweek is the closest to what I need. I think that these plots from paraview could be misleading a little. So far I used matlab in order to extract most information from my data, for example (I attached script as a picture "script" ):
this script gets data from both diagonals and displays it. The squeeze function in the script works like sumBeams(w) simply flatters z direction.
I used the johnweek's advice but I got the structure upside down and honestly I do not have any clue which diagonal it is. This is quit important as we expect that piezoelectric effects manifests itself in [1-10] cristal direction than in [110] I let myself post the plots resulting from the above procedure and one obtained using:
Make/N diagonal(256,256)
diagonal=wave3d[p][p][q]
Thanks a lot
September 12, 2011 at 02:32 pm - Permalink
The assignment I wrote above gets the principal diagonal, that is, the elements [0,0], [1,1], etc. To get the perpendicular diagonal you need to manipulate the indices on the left hand side. Maybe something like this:
diagonal = w3D[p][255-p][q]
The value 255 is picked because the maximum index in a wave with 256 elements is 255. It is important that the wave on the right side have the correct number of elements. The [q] on the right side assigns successive values from the third dimension on the right side to elements in the second dimension on the left side.
Unfortunately, I was never good at crystallography...
To read more about wave assignments like this, execute these commands on Igor's command line:
DisplayHelpTopic "Waveform Arithmetic and Assignment"
DisplayHelpTopic "Indexing and Subranges"
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
September 12, 2011 at 04:49 pm - Permalink