Three Dimensional Graphics Commands

Introduction and simple ball example.

device/open "xw" 5.0 5.0
eye=dimensions(3);eye[1]=0.0;eye[2]=0.0;eye[3]=20.0
light=dimensions(3);fill light -1.0
win_threed 0.1 0.9 0.1 0.9 -10.0 10.0 -10.0 10.0 $green eye light
centre=dimensions(3);centre[1]=-3.0;centre[2]=0.0;centre[3]=-4.0
r=dimensions(1);r[1]=1.0
g=dimensions(1);g[1]=0.0
b=dimensions(1);b[1]=0.0
table=colourtable:rgb(70,r,g,b,1.0,1,0.0,1.0,1.0)
ball/draw centre 2.0 table
redraw
Win_ThreeD Controls and creates a pre-scaled three dimensional window
ThreeD_Line Draws a straight line between two points
Rod Plots a diffusively shaded coloured rod
Cone Plots a diffusively shaded coloured right-angular cone
Ellipsoid Plots a shiny or matt coloured elliptical ball
Ball Plots an optionally semi transparent, shiny or matt coloured ball
ThreeD_Text Writes a text string in 3d perspective
Plane Plots a diffusively-lit coloured plane
IsoSurface Plots an optionally semi transparent, iso-surface through a unit-cell of density
LatticePlane Plots a diffusively-lit, semi transparent, coloured plane through a unit-cell
LatticeSlice Plots a "grey scale" slice through a unit cell of density
Surface Plots a 3d surface given a 2d unit cell of density

Win_ThreeD()

Controls and creates pre-scaled three dimensional windows for displaying 3d objects.

WIN_SCALED xmin=Real xmax=Real ymin=Real ymax=Real lxmin=Real lxmax=Real lymin=Real lymax=Real [colour=Colour] [eye=Realarray] [light=Realarray] Creates a scaled 3d window.

example:

	# Creating and displaying a scaled
	# 3d window
	>> win_threed 0.1 0.9 0.1 0.9 -100.0 10.0
	>> 0.0 10.0

Note: l means the logical (world) co-ordinate, and all other co-ordinates refer to device co-ordinates.

Win_ThreeD

Creates and displays a scaled 3d window. A scaled window is an area in which it is possible to specify any range of data or window co-ordinates to map onto an area of the display device (specified in device co-ordinates). Many 3d objects can be displayed in a single window, sharing the same eye and light setting unless these are specifically set for an object. The viewing screen is fixed at z=0 for all 3d objects.

Parameters:

xmin (Real)

Sets the minimum x device co-ordinate.

xmax (Real)

Sets the maximum x device co-ordinate.

ymin (Real)

Sets the minimum y device co-ordinate.

ymax (Real)

Sets the maximum y device co-ordinate.

lxmin (Real)

Sets the minimum x world co-ordinate.

lxmax (Real)

Sets the maximum x world co-ordinate.

lymin (Real)

Sets the minimum y world co-ordinate.

lymax (Real)

Sets the maximum y world co-ordinate.

Colour (Colour)

Sets the colour of the window. By default the colour of the window is black.

eye (Realarray)

(x,y,z) coordinate of the eye position - the z component of this should always be positive. The eye position given to the window is also assigned to objects displayed within the window (where appropriate) if no specific value is given to the objects when created. By default the eye position of the window is (0,0,1).

light (Realarray)

(x,y,z) direction of the flood-light. The light direction given to the window is also assigned to objects displayed within the window (where appropriate) if no specific value is given to the objects when created. By default the light direction of the windows is (0,0,1).

RESULT = (WindowScaled)

Returns all of the properties of the newly created window.

ThreeD_Line()

Draws a straight line between two points inside a three dimensional window

ThreeD_Linet/DRAW end1=Realarray end2=Realarray colour=Colour [dash=Integer] [eye=Realarray] Draws a line, in a 3d window.
ThreeD_Text/ALTER [end1=Realarray] [end2=Realarray] [colour=Colour] [dash=Integer] [eye=Realarray] object=Gobject Alters a previously drawn line.

example:

	#Draw a line
	>> l=ThreeD_Line:draw(end1,end2,$red)
	#Alter the colour of the line
	>> ThreeD_Line/alter colour=$green object=l

ThreeD_Line/Draw

Draws a straight line between two points inside a 3d window. The z component of both the ends should be negative..

Parameters:

end1 (Realarray)

(x,y,z) coordinate of end-1.

end2 (Realarray)

(x,y,z) coordinate of end-2.

colour (Colour)

The colour index for the line.

dash (Integer)

If equal to 1 then the line is dashed otherwise it is continuous(default).

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created line.

ThreeD_Line/Alter

Alters a line inside a 3d window.

Parameters:

end1 (Realarray)

(x,y,z) coordinate of end-1.

end2 (Realarray)

(x,y,z) coordinate of end-2.

colour (Colour)

The colour index for the line.

dash (Integer)

If equal to 1 then the line is dashed otherwise it is continuous.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

object (Gobject)

The ThreeDLine object to be altered.

RESULT = (Gobject)

Returns the properties of the altered line.

Rod()

Plots a diffusively shaded coloured rod inside a three dimensional window

Rod/DRAW end1=Realarray end2=Realarray radius=Real nsides=Integer table=Colourtable [lend=Integer] [eye=Realarray] [light=Realarray] Plots a coloured rod, in a 3d window.
Rod/ALTER [end1=Realarray] [end2=Realarray] [radius=Real] [nsides=Integer] [table=Colourtable] [lend=Integer] [eye=Realarray] [light=Realarray] object=Gobject Alters a previously plotted rod.

example:

	# Plot a rod
	>> r=Rod:draw(centre,end1,end2,2.0,8,table)
	# Alter the radius of the rod
	>> Rod/alter radius=3.0 object=r

Rod/Draw

Plots a diffusively shaded coloured rod inside a 3d window. All (x,y,z) values are taken to be given in world coordinates. The z components of the rod ends should be negative (< -radius).

Parameters:

end1 (Realarray)

(x,y,z) coordinate of rod end 1.

end2 (Realarray)

(x,y,z) coordinate of rod end 2.

radius (Real)

Radius of the cylindrical rod.

nsides (Integer)

The order of the polygon to be used for the cross-section of the rod.

table (Colourtable)

The colour table to be used, see ColourTable for details.

lend (Integer)

If 1(default) the end of the rod is plotted.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created rod.

Rod/Alter

Alters a rod plotted inside a 3d window.

Parameters:

end1 (Realarray)

(x,y,z) coordinate of rod end 1.

end2 (Realarray)

(x,y,z) coordinate of rod end 2.

radius (Real)

Radius of the cylindrical rod.

nsides (Integer)

The order of the polygon to be used for the cross-section of the rod.

table (Colourtable)

The colour table to be used, see ColourTable for details.

lend (Integer)

If 1(default) the end of the rod is plotted.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

object (Gobject)

The rod object to be altered.

RESULT = (Gobject)

Returns the properties of the altered rod.

Cone()

Plots a diffusively shaded coloured right-angular cone inside a three dimensional window

Cone/DRAW base=Realarray apex=Realarray radius=Real nsides=Integer table=Colourtable [eye=Realarray] [light=Realarray] Plots a coloured cone, in a 3d window.
Cone/ALTER [base=Realarray] [apex=Realarray] [radius=Real] [nsides=Integer] [table=Colourtable] [eye=Realarray] [light=Realarray] object=Gobject Alters a previously plotted cone.

example:

	#Plot a cone
	>> c=Cone:draw(base,apex,2.0,8,table)
	#Alter the radius of the cone
	>> Cone/alter radius=1.5 object=c

Cone/Draw

Plots a diffusively shaded coloured right-angular cone inside a 3d window. All (x,y,z) values are taken to be given in world coordinates. The z components of the base and apex should be negative (< -radius).

Parameters:

base (Realarray)

(x,y,z) coordinate of the centre of the base of the cone.

apex (Realarray)

(x,y,z) coordinate of the apex.

radius (Real)

Radius of the base of the cone.

nsides (Integer)

The order of the polygon to be used for the cross-section of the cone.

table (Colourtable)

The colour table to be used, see ColourTable for details.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created cone.

Cone/Alter

Alters a cone plotted inside a 3d window.

Parameters:

base (Realarray)

(x,y,z) coordinate of the centre of the base of the cone.

apex (Realarray)

(x,y,z) coordinate of the apex.

radius (Real)

Radius of the base of the cone.

nsides (Integer)

The order of the polygon to be used for the cross-section of the cone.

table (Colourtable)

The colour table to be used, see ColourTable for details.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

object (Gobject)

The cone object to be altered.

RESULT = (Gobject)

Returns the properties of the altered cone.

Ellipsoid()

Plots a shiny or matt coloured elliptical ball inside a three dimensional window

Ellipsoid/DRAW centre=Realarray paxes=Realarray icline=Integer anglin=Real table=Colourtable [eye=Realarray] [light=Realarray] Plots an elliptical ball, in a 3d window.
Ellipsoid/ALTER [centre=Realarray] [paxes=Realarray] [icline=Integer] [anglin=Real] [table=Colourtable] [eye=Realarray] [light=Realarray] object=Gobject Alters a previously plotted ellipsoid.

example:

	#Plot an ellipsoid
	>> e=Ellipsoid:draw(centre,paxes,4,5.0,table)
	#Alter the anglin value
	>> Ellipsoid/alter anglin=2.5 object=e

Ellipsoid/Draw

Plots a shiny or matt coloured elliptical ball inside a 3d window. All (x,y,z) values are taken to be given in world coordinates. The z component of the ball-centre should be negative (< -radius).

Parameters:

centre (Realarray)

(x,y,z) coordinate of the balls centre..

paxes (Realarray)

The principal axes of the ellipsoid. The array should be allocated by DIMENSIONS(3,3).

icline (Integer)

If >=0 then icline is the colour index for lines on the ellipsoids surface.

anglin (Real)

Width of lines: +/- degrees.

table (Colourtable)

The colour table to be used, see ColourTable for details.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created ellipsoid.

Ellipsoid/Alter

Alters an ellipsoid drawn inside a 3d window.

Parameters:

centre (Realarray)

(x,y,z) coordinate of the balls centre..

paxes (Realarray)

The principal axes of the ellipsoid. The array should be allocated by DIMENSIONS(3,3).

icline (Integer)

If >=0 then icline is the colour index for lines on the ellipsoids surface.

anglin (Real)

Width of lines: +/- degrees.

table (Colourtable)

The colour table to be used, see ColourTable for details.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

object (Gobject)

The ellipsoid object to be altered.

RESULT = (Gobject)

Returns the properties of the altered ellipsoid.

Ball()

Plots an optionally semi transparent, shiny or matt coloured ball inside a three dimensional window

Ball/DRAW centre=Realarray radius=Real table=Colourtable [transparency=Integer] [eye=Realarray] [light=Realarray] Plots a coloured ball, in a 3d window.
Ball/ALTER [centre=Realarray] [radius=Real] [table=Colourtable] [transparency=Integer] [eye=Realarray] [light=Realarray] object=Gobject Alters a previously plotted ball.

example:

	#Plot a ball
	>> b=Ball:draw(centre,2.0,table)
	#alter the radius of the ball
	>> Ball/alter radius=1.5 object=b

Ball/Draw

Plots an optionally semi transparent, shiny or matt coloured ball inside a 3d window. All (x,y,z) values are taken to be given in world coordinates. The z component of the balls centre should be negative (< -radius).

Parameters:

centre (Realarray)

(x,y,z) coordinate of the balls centre.

radius (Real)

The radius of the ball.

table (Colourtable)

The colour table to be used, see ColourTable for details.

transparency (Integer)

The level of transparency expressed as a percentage. By default this is zero.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created ball.

Ball/Alter

Alters a ball plotted inside a 3d window.

Parameters:

centre (Realarray)

(x,y,z) coordinate of the balls centre.

radius (Real)

The radius of the ball.

table (Colourtable)

The colour table to be used, see ColourTable for details.

transparency (Integer)

The level of transparency expressed as a percentage.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

object (Gobject)

The ball object to be altered.

RESULT = (Gobject)

Returns the properties of the altered ball.

ThreeD_Text()

Writes a text string in 3d perspective in a three dimensional window

ThreeD_Text/DRAW text=String colour=Colour pivot=Realarray orient=Realarray [justify=Real] [size=Real] [eye=Realarray] Writes a text in perspective, in a 3d window.
ThreeD_Text/ALTER [text=String] [colour=Colour] [pivot=Realarray] [orient=Realarray] [justify=Real] [size=Real] [eye=Realarray] object=Gobject Alters a previously written piece of 3d text.

example:

	#Display a simple message
	>> t=ThreeD_Text:draw("Hello World!",$red,pivot,orient)
	#Alter the colour of the message
	>> ThreeD_Text/alter colour=$blue object=t

ThreeD_Text/Draw

Writes a text string in 3d perspective inside a 3d window. All (x,y,z) values are taken to be in world coordinates.

Parameters:

text (String)

The text string to be written.

colour (Colour)

The colour index for the text.

pivot (Realarray)

(x,y,z) coordinate of the pivot point.

orient (Realarray)

(x,y,z) for X-length and Y-height directions of the text. The array should be allocated by DIMENSIONS(2,3).

justify (Real)

Position of pivot along the text: 0.0=left, 0.5=centre (default), 1.0=right.

size (Real)

The height of the reference symbol "A". By default this is 1.0.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created text.

ThreeD_Text/Alter

Alters text inside a 3d window.

Parameters:

text (String)

The text string to be written.

colour (Colour)

The colour index for the text.

pivot (Realarray)

(x,y,z) coordinate of the pivot point.

orient (Realarray)

(x,y,z) for X-length and Y-height directions of the text. The array should be allocated by DIMENSIONS(2,3).

justify (Real)

Position of pivot along the text: 0.0=left, 0.5=centre, 1.0=right.

size (Real)

The height of the reference symbol "A".

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

object (Gobject)

The ThreeDText object to be altered.

RESULT = (Gobject)

Returns the properties of the altered text.

Plane()

Plots a diffusively-lit coloured plane in a three dimensional window

PLANE/DRAW vertices=Realarray table=Colourtable [transparency=Integer] [eye=Realarray] [light=Realarray] Plots a plane in a 3d window.
PLANE/ALTER [table=Colourtable] [transparency=Integer] [eye=Realarray] [light=Realarray] object=Gobject Alters a previously drawn plane.

example:

	#Plot a non transparent plane
	>> p=Plane:draw(vertices,table)
	#Alter the transparency of the plane
	>> Plane/alter transparency=25 object=p

Plane/Draw

Plots a diffusively-lit, optionaly semi-transparent coloured plane in a 3d window. All the verticies must lie in a flat plane, and the bounding polygon should be convex (so that the angle at any vertex <= 180 degres). All (x,y,z) values are taken to be given in world coordinates.

Parameters:

vertices (Realarray)

(x,y,z) coordinates of the vertices. The array should be allocated by DIMENSIONS(NV,3), where NV is the number of vertices.

table (Colourtable)

The colour table to be used, see ColourTable for details.

transparency (Integer)

The level of transparency expressed as a percentage. By default this is zero.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created plane.

Plane/Alter

Alters a Plane in a 3d window.

Parameters:

table (Colourtable)

The colour table to be used, see ColourTable for details.

transparency (Integer)

The level of transparency expressed as a percentage.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

object (Gobject)

The plane object to be altered.

RESULT = (Gobject)

Returns the properties of the altered plane.

IsoSurface()

Plots an optionally semi transparent, iso-surface through a unit-cell of density inside a three dimensional window

IsoSurface/DRAW lattice=Realarray density=Realarray dsurf=Real table=Colourtable [transparency=Integer] [eye=Realarray] [light=Realarray] Plots an iso-surface, in a 3d window.
IsoSurface/ALTER [lattice=Realarray] [dsurf=Real] [table=Colourtable] [transparency=Integer] [eye=Realarray] [light=Realarray] object=Gobject Alters a previously plotted iso-surface.

example:

	#Plot an iso-surface
	>> is=IsoSurface:draw(lattice,density,5.0,table)
	#Alter the transparency of the iso-surface
	>> IsoSurface/alter transparency=25 object=is

IsoSurface/Draw

Plots an optionally semi transparent, iso-surface through a unit-cell of density inside a 3d window. All (x,y,z) values are taken to be given in world coordinates. The z component of all lattice vertices should be negative.

Parameters:

lattice (Realarray)

(x,y,z) coordinates of the origin and the a, b, & c lattice vertices. The array should be allocated by DIMENSIONS(4,3).

density (Realarray)

The density at regular points within the unit cell. The array is of size (N1+1)x(N2+1)x(N3+1), where N1, N2, N3 are the dimensions of the unit cell grid. It should be allocated by DIMENSIONS(N3+1,N2+1,N1+1). The density is wrapped around so that DENSITY(0,J,K)=DENSITY(N1,J,K) etc.

dsurf (Real)

The density for the iso-surface.

table (Colourtable)

The colour table to be used, see ColourTable for details.

transparency (Integer)

The level of transparency expressed as a percentage. By default this is zero.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created iso-surface.

IsoSurface/Alter

Alters an iso-surface plotted inside a 3d window.

Parameters:

lattice (Realarray)

(x,y,z) coordinates of the origin and the a, b, & c lattice vertices. The array should be allocated by DIMENSIONS(4,3).

dsurf (Real)

The density for the iso-surface.

table (Colourtable)

The colour table to be used, see ColourTable for details.

transparency (Integer)

The level of transparency expressed as a percentage.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

object (Gobject)

The IsoSurface object to be altered.

RESULT = (Gobject)

Returns the properties of the altered iso-surface.

LatticePlane()

Plots a diffusively-lit, semi transparent, coloured plane through a unit-cell, inside a three dimensional window

LatticePlane/DRAW lattice=Realarray normal=Realarray apoint=Realarray edge=Integer table=Colourtable [transparency=Integer] [eye=Realarray] [light=Realarray] Plots a plane through a unit-cell, in a 3d window.
LatticePlane/ALTER [lattice=Realarray] [normal=Realarray] [apoint=Realarray] [edge=Integer] [table=Colourtable] [transparency=Integer] [eye=Realarray] [light=Realarray] object=Gobject Alters a previously plotted plane.

example:

	#Plot a plane through a unit-cell
	>> lp=LatticePlane:draw(lattice,normal,apoint,4,table)
	#Alter the transparency of the plane
	>> LatticePlane/alter transparency=25 object=lp

LatticePlane/Draw

Plots a diffusively-lit, semi transparent, coloured plane through a unit-cell, inside a 3d window. All (x,y,z) values are taken to be given in world coordinates. The z component of all lattice vertices should be negative.

Parameters:

lattice (Realarray)

(x,y,z) coordinates of the origin and the a, b, & c lattice vertices. The array should be allocated by DIMENSIONS(4,3).

normal (Realarray)

(x,y,z) direction of the normal to the plane.

apoint (Realarray)

(x,y,z) coordinate of a point within the plane.

edge (Integer)

If >=0 then the colour index for the boundary of the plane.

table (Colourtable)

The colour table to be used, see ColourTable for details.

transparency (Integer)

The level of transparency expressed as a percentage. By default this is zero.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created plane.

LatticePlane/Alter

Alters a plane plotted inside a 3d window.

Parameters:

lattice (Realarray)

(x,y,z) coordinates of the origin and the a, b, & c lattice vertices. The array should be allocated by DIMENSIONS(4,3).

normal (Realarray)

(x,y,z) direction of the normal to the plane.

apoint (Realarray)

(x,y,z) coordinate of a point within the plane.

edge (Integer)

If >=0 then the colour index for the boundary of the plane.

table (Colourtable)

The colour table to be used, see ColourTable for details.

transparency (Integer)

The level of transparency expressed as a percentage.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

object (Gobject)

The LatticePlane object to be altered.

RESULT = (Gobject)

Returns the properties of the altered plane.

LatticeSlice()

Plots a "grey scale" slice through a unit cell of density, inside a three dimensional window

LatticeSlice/DRAW lattice=Realarray density=Realarray dlow=Real dhigh=Real normal=Realarray apoint=Realarray edge=Integer table=Colourtable [eye=Realarray] Plots a slice through a unit-cell, in a 3d window.
LatticeSlice/ALTER [lattice=Realarray] [dlow=Real] [dhigh=Real] [normal=Realarray] [apoint=Realarray] [edge=Integer] [table=Colourtable] [eye=Realarray] object=Gobject Alters a previously plotted slice.

example:

	#Plot a slice through a unit-cell of density
	>> ls=LatticeSlice:draw(lattice,density,0.0,30.0,normal,apoint,4,table)
	#Alter the density of the low colour index
	>> LatticeSlice/alter dlow=10.0 object=ls

LatticeSlice/Draw

Plots a "grey scale" slice through a unit cell of density, inside a 3d window. All (x,y,z) values are taken to be given in world coordinates. The z component of all lattice vertices should be negative.

Parameters:

lattice (Realarray)

(x,y,z) coordinates of the origin and the a, b, & c lattice vertices. The array should be allocated by DIMENSIONS(4,3).

density (Realarray)

The density at regular points within the unit cell. The array is of size (N1+1)x(N2+1)x(N3+1), where N1, N2, N3 are the dimensions of the unit cell grid. It should be allocated by DIMENSIONS(N3+1,N2+1,N1+1). The density is wrapped around so that DENSITY(0,J,K)=DENSITY(N1,J,K) etc.

dlow (Real)

The density for the lowest colour index.

dhigh (Real)

The density for the highest colour index.

normal (Realarray)

(x,y,z) direction of the normal to the slice to be "grey scaled".

apoint (Realarray)

(x,y,z) coordinate of a point within the slice to be "grey scaled".

edge (Integer)

If >=0 then the colour index for the boundary of the "grey scaled" slice.

table (Colourtable)

The colour table to be used, see ColourTable for details.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created slice.

LatticeSlice/Alter

Alters a slice plotted inside a 3d window.

Parameters:

lattice (Realarray)

(x,y,z) coordinates of the origin and the a, b, & c lattice vertices. The array should be allocated by DIMENSIONS(4,3).

dlow (Real)

The density for the lowest colour index.

dhigh (Real)

The density for the highest colour index.

normal (Realarray)

(x,y,z) direction of the normal to the slice to be "grey scaled".

apoint (Realarray)

(x,y,z) coordinate of a point within the slice to be "grey scaled".

edge (Integer)

If >=0 then the colour index for the boundary of the "grey scaled" slice.

table (Colourtable)

The colour table to be used, see ColourTable for details.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

object (Gobject)

The LatticeSlice object to be altered.

RESULT = (Gobject)

Returns the properties of the altered slice.

Surface()

Plots a 3d surface given a 2d unit cell of density, inside a three dimensional window

Surface/DRAW lattice=Realarray density=Realarray dlow=Real dhigh=Real devert=Real table=Colourtable [eye=Realarray] [light=Realarray] Plots a 3d surface, in a 3d window.
Surface/ALTER [lattice=Realarray] [dlow=Real] [dhigh=Real] [devert=Real] [table=Colourtable] [eye=Realarray] [light=Realarray] object=Gobject Alters a previously plotted surface.

example:

	#Plot a 3d surface
	>> s=surface:draw(lattice,density,0.0,30.0,30.0,table)
	#Alter the lowest density to be plotted
	>> surface/alter dlow=10.0 object=s

Surface/Draw

Plots a 3d surface given a 2d unit cell of density, inside a 3d window. All (x,y,z) values are taken to be given in world coordinates. The z component of all lattice vertices should be negative.

Parameters:

lattice (Realarray)

(x,y,z) coordinates of the origin and the a, & b lattice vertices. The array should be allocated by DIMENSIONS(3,3).

density (Realarray)

The density at regular points within the unit cell. The array is of size (N1+1)x(N2+1), where N1, N2 are the dimensions of the unit cell grid. It should be allocated by DIMENSIONS(N2+1,N1+1). The density is wrapped around so that DENSITY(0,J)=DENSITY(N1,J) etc.

dlow (Real)

The lowest density to be plotted.

dhigh (Real)

The highest density to be plotted.

dvert (Real)

A "vertical" world coordinate length corresponding to density range.

table (Colourtable)

The colour table to be used, see ColourTable for details.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

RESULT = (Gobject)

Returns the properties of the newly created surface.

Surface/Alter

Alters a surface plotted inside a 3d window.

Parameters:

lattice (Realarray)

(x,y,z) coordinates of the origin and the a, & b lattice vertices. The array should be allocated by DIMENSIONS(3,3).

dlow (Real)

The lowest density to be plotted.

dhigh (Real)

The highest density to be plotted.

dvert (Real)

A "vertical" world coordinate length corresponding to density range.

table (Colourtable)

The colour table to be used, see ColourTable for details.

eye (Realarray)

(x,y,z) coordinate of the eye position, see Win_ThreeD for details.

light (Realarray)

(x,y,z) direction of the flood-light, see Win_ThreeD for details.

object (Gobject)

The surface object to be altered.

RESULT = (Gobject)

Returns the properties of the altered surface.