Mat3d User's Guide
Mat3d Invocation
- mat3d - invokes mat3d from the matlab command console.
format: mat3d inputfilenmae example: mat3d xyz.m3d
- m3ver - displays the mat3d version number.
format: m3ver example: m3ver
Viewing
- axis - use this command to zoom in and zoom out on the plot.
(Matlab command)
format: axis ([x-lower x-upper y-lower y-upper z-lower z-upper]) example: axis ([-100 100 -100 100 0 100])
- view - use to set different perspective on the plot.
(Matlab Command)
format: view (azimuth-angle, elevation-angle) example: view (45, 90)
- revolv360 - revolve the plot 360 degree in the specified steps
format: revolve360 (number-of-steps-to-revolve) example: revolve360 (5)
Structure Identification & Selection
- cycle - sequentially high-lights all the structures in the plot. it is useful in associating structures with their respective structure ID.
format: cycle [1|2]
no parameter, requires user input
1, automatically sequentially high-light all structures
2, automatically sequentially high-light all non-anchor structures
example: cycle (2)
- hilite - set the high-light mode accordingly. When high-light mode is on, all subsequently selected structures will be high-lighted until the high-light mode is turned off.
format: hilite <on|off> example: hilite on
- unhilite - if an structure is currently high-lighted, this command turns high-light off. The end result is no structure is high-lighted.
format: unhilite example: unhilite
- sel - select the specified structure for manipulation.
format: sel (structure-id-to-be-selected) example: sel (1)
- unsel - if an structure is currently selected, this command de-selects it. The end result is nothing is selected.
format: unsel example: unsel
Structure Manipulation
All structure manipulation commands operate on the currently selected structure. i.e. the structure affected by the last sel() command.
- m3rotate - rotate the previously selected structure by the specified amount. If only one parameter is specified, the "structure rotate" information specified in the input file will dictate the rotate direction and the pivot point.
format 1: m3rotate (amount-of-rotation) format 2: m3rotate (amount-of-rotation, rotate-direction, pivot-point, ) example: m3rotate(45)
m3rotate(45, [1 0 0], [20 10 2])
- m3trans - translate the previously selected structure by the specified amount.
format: m3trans (amount-of-translation) example: m3trans ([10 0 0])
- setlink - sets the linkage information for the structures being plotted. The specified linkage information will overwrite the linkage information read from the input file
format: setlink [start m|memberof n|notmemberof k] example: setlink start 2
setink memberof 3
setlink notmemberof 5
- showlinkage - prints out the linkage information, with no parameter specified, it will return the linkage information for the last structure selected. If 'all' is specified, linkage information for all strucures are returned.
format: showlinkage
showlinkage allexample: showlinkage
showlinkage all
- setpivot - sets the rotation direction as well as the pivot point of the previously selected structure. It over-write in memory the "structure rotate" read from the input file
format: setpivot (axis, pivot-point) example: setpivot ('x', [10 10 2])
- showpivot - shows the rotation direction and the pivot point of the structure selected.
format: showpivot example: [rotdir pivpt]=showpivot
- showstructures - make all currently defined reflectors in the plot visible.
format: showstructures <on|off> example: showstructures off
- animate - sets the animation mode accordingly. In animation mode, translation and rotation of a structure will be done in 5 continuous increments to give the appearance that the plot is in animation, each increment being 1/5 of the specified amount for rotation or translation.
format: animate <on|off> example: animate on
Collision Detection
- detectcontact - turns the mat3d collision detection mode on. Subsequent rotational and transitional movements by structures will test whether the structures in movemnt is in contact with other structures.
format: detectcontact <on|off> example: detectcontact off
Ray Tracing Commands
- raysource - specifies the location and the direction of the ray.
format: raysource (ray-source-number, ray-origination-point, ray-direction-vector)
for now, ray-source-number is always 1.example: raysource (1, [200 100 100], [1 1 -1])
- raytracing - if raysource is already specified, 'raytracing on' initiates drawing of the ray.
format: raytracing <on|off> example: raytracing on
- setreflector - sets the reflector box geometry of the currently selected structure. If previously set, this command over-writes the reflector geometry information in memory read from the input file.
format: setreflector (box)
where box is specified as [width lenght width xcenter ycenter zcenter]example: setreflector ( [10 10 1 -50 20 2] )
- showreflectors - make all currently defined reflectors in the plot visible. Note: since reflector are initially defined to be located within strucures, it will be necessary to make structures invisible in order to see the reflecting geometries (see showstructures).
format: showrelectors <on|off> example: showreflectors on
Examples
Within the package, there are several example matlab scripts. Examine and excute them to gain experience on how mat3d works.Execute the following m-files in the matlab command console.
- demohinge
- demotall
- demofddi
- democcr
- demomatt
- demoxyz_quick
- demoxyz (caution: complex plot)
- democollide
- demotallcollide
Known Problem
- Experienced problem with matlab function "daspect" during invokation of Mat3d with Matlab 5 on a SunOS machine. A quick solution to this problem is to comment out that command in mat3d.m. This will only effect the apparence of the plot.
modified on September 14, 1999