On Friday 26 September 2003 06:02, Info Account wrote:
> Can someone point me to a simple explanation of the native DX file format
> for a scatter plot?  Nothing elaborate, just 3-4 points in 3 dimensions,
> from X,Y,Z coordinates on a scatter plot.  Also, what is the syntax for
> attributes assigned to individual points, for example color?
>
> Thanks in advance.
>
> Greg

 Hello Greg,

maybe the following file may help you a bit. i have calculated the motion of a 
bunch of particles, this is, the positions of some ions/electrons as fucntion 
of time. i wanted dx to display some blue (ele) and red  (ion) bubbles on the 
positions so that i can see cool snapshots of the system at some time. heres 
the file, some explanations follow.

object "elepos" class array type float rank 1 shape 3 items 125 data follows
0.152262 -0.239303 0.0977253
0.0366536 -0.173698 0.758162
0.148264 -0.0919525 2.24405
-0.101867 0.171698 2.77607
-0.0513418 0.291207 3.94938
... (125 lines all in all with (x,y,z)-positions for electrons
object "ionpos" class array type float rank 1 shape 3 items 125 data follows
0 0 0
0 0 1
0 0 2
0 0 3
0 0 4
0 1 0
0 1 1
...(125 lines of ion position data)
object "ele" class field
component "positions" value "elepos"
object "ion" class field
component "positions" value "ionpos"
end

first, i have created an array object named "elepos". this is in the first 
line: 
object "name" class array                 , because i want an array object
type float                                              it is floating-point 
data, 
rank 1                                          its a vector (rank 0 ist 
scalar, rank 2 is 2xcontravariant                                      
                                                        tensor, rank 3 is 
higher order tensor and so on)
shape 3                                                 in 3d-space for the 
first tensor index (for higher ranks, more  
                                                        numbers here, eg rank 2 
shape 3 3 for stress tensor of rank 2)
items 125                                               there are 125 array 
entries
data follows                                    the values follow immediately 
after this definition. you may            
                                                        also specify another 
file which contains them. (data "filename")

then ive done the same for the ions. since dx can only display "fields", one 
has to make the two arrays the "positions" component in to new objects (one 
ele, one ion), in the last-but-5 line:
object "ele" class field                        i want a new field object 
called ele
component "postions" value "elepos"     the "positions" component of the field 
                                                        "ele" becomes the  
array "elepos".

the same for the ions. you may also specify some "data" component (i didnt 
need it here.) eg, 

component "data" value "velocity_array"

to show the speed (saved in an array "velocity_array" created similar to 
"elepos" array above) of the particles as arrows attached to the points on 
the screen. to read this file with dx, ive chosen a "FileSelector" module for 
the filename, whose output is connected to 2 "Import" modules (one for ele, 
one for ion). the "variable" attribute of these modules (in the configuration 
dialog)  must be "ele" and "ion", that is, the names of the 2 fields. after 
adding some glyphs (and colors etc), this displays my system of particles.

ive found some useful docs on this in the dx users guide, in the chapter 
"understanding ( 8*[ ) the data model" and some examples in app. b, 
"importing data: file formats". theres something about attributes too.

good luck,
Ludwig

ps if you want, i can give you the data file and the network file.

Reply via email to