Scene PT¶
scene.spad line 3994 [edit on github]
PT: SPointCategory
these are the parameters that can be set for nodes of various types
- addArrows2Din2D: (%, PT -> PT, Segment DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
addArrows2Din2D(n, ptFun, uSeg, vSeg, numPts)
is a convenience function which combines createArrows2Din2D with addChild!
- addChild!: (%, %) -> Void
addChild!(n, c)
adds the specified child node'c'
below node'n'
- addPlot1Din2D: (%, DoubleFloat -> DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
addPlot1Din2D(n, f, tRange, numPts)
is a convenience function which combines createPlot1Din2D with addChild!
- addPlot1Din2D: (%, DoubleFloat -> PT, Segment DoubleFloat, NonNegativeInteger) -> %
addPlot1Din2D(n, f, tRange, numPts)
is a convenience function which combines createPlot1Din2D with addChild!
- addPlot1Din2Dparametric: (%, ParametricPlaneCurve(DoubleFloat -> DoubleFloat), Segment DoubleFloat, NonNegativeInteger) -> %
addPlot1Din2Dparametric(n, ppc, tRange, numPts)
is a convenience function which combines createPlot1Din2Dparametric with addChild!
- addPlot1Din3Dparametric: (%, DoubleFloat -> PT, Segment DoubleFloat, NonNegativeInteger) -> %
addPlot1Din3Dparametric(n, pcfun, tRange, numPts)
is a convenience function which combines createPlot1Din3Dparametric with addChild!
- addPlot1Din3Dparametric: (%, ParametricSpaceCurve(DoubleFloat -> DoubleFloat), Segment DoubleFloat, NonNegativeInteger) -> %
addPlot1Din3Dparametric(n, psc, tRange, numPts)
is a convenience function which combines createPlot1Din3Dparametric with addChild!
- addPlot2Din3D: (%, (DoubleFloat, DoubleFloat) -> DoubleFloat, Segment DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
addPlot2Din3D(n, f, uSeg, vSeg, numPts)
is a convenience function which combines createPlot2Din3D with addChild!
- addPlot2Din3Dparametric: (%, (DoubleFloat, DoubleFloat) -> PT, Segment DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
addPlot2Din3Dparametric(n, f, uSeg, vSeg, numPts)
is a convenience function which combines createPlot2Din3Dparametric with addChild!
- addPlot2Din3Dparametric: (%, ParametricSurface((DoubleFloat, DoubleFloat) -> DoubleFloat), Segment DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
addPlot2Din3Dparametric(n, f, uSeg, vSeg, numPts)
is a convenience function which combines createPlot2Din3Dparametric with addChild!
- addSceneArrow: (%, %, %, PT, Symbol, DoubleFloat, DoubleFloat) -> %
addSceneArrow(n, st, en, offset, mode, size, fontScale)
is a convenience function which combines createSceneArrow with addChild!
- addSceneArrow: (%, String, String, PT, Symbol, DoubleFloat) -> %
addSceneArrow(n, st, en, offset, mode, size)
is a convenience function which combines createSceneArrow with addChild!
- addSceneArrows: (%, List List PT, Symbol, DoubleFloat) -> %
addSceneArrows(n, line, mode, size)
is a convenience function which combines createSceneArrows with addChild!
- addSceneBox: (%, DoubleFloat) -> %
addSceneBox(n, size)
is a convenience function which combines createSceneBox with addChild!
- addSceneClip: (%, SBoundary PT) -> %
addSceneClip(n, bb)
is a convenience function which combines createSceneClip with addChild!
- addSceneDef: (%, String, %) -> %
addSceneDef(n, nam, nde)
is a convenience function which combines createSceneDef with addChild!
- addSceneGraph: (%, DirectedGraph String, NonNegativeInteger, NonNegativeInteger, Boolean) -> %
addSceneGraph(n, g, x, y, dispArrowName)
is a convenience function which combines createSceneGraph with addChild!
- addSceneGrid: (%, DoubleFloat, SBoundary PT) -> %
addSceneGrid(n, stepSize, bb)
is a convenience function which combines createSceneGrid with addChild!
- addSceneGrid: (%, SBoundary PT) -> %
addSceneGrid(n, bb)
is a convenience function which combines createSceneGrid with addChild!
- addSceneGroup: % -> %
addSceneGroup(n)
is a convenience function which combines createSceneGroup with addChild!
- addSceneIFS: (%, List List NonNegativeInteger, List PT) -> %
addSceneIFS(n, inx, pts)
is a convenience function which combines createSceneIFS with addChild!
- addSceneIFS: (%, SceneIFS PT) -> %
addSceneIFS(n, in1)
is a convenience function which combines createSceneIFS with addChild!
- addSceneLine: (%, %, %, DoubleFloat) -> %
addSceneLine(n, st, en, fontScale)
is a convenience function which combines createSceneLine with addChild!
- addSceneLine: (%, %, %, DoubleFloat, Boolean) -> %
addSceneLine(n, st, en, fontScale)
is a convenience function which combines createSceneLine with addChild!
- addSceneLine: (%, List PT) -> %
addSceneLine(n, line)
is a convenience function which combines createSceneLine with addChild!
- addSceneLines: (%, List List PT) -> %
addSceneLines(n, line)
is a convenience function which combines createSceneLines with addChild!
- addSceneMaterial: (%, DoubleFloat, String, String) -> %
addSceneMaterial(n, lineW, lineC, fillC)
is a convenience function which combines createSceneMaterial with addChild!
- addSceneMaterial: (%, Record(lineWidth: DoubleFloat, lineCol: String, fillCol: String, matOpacity: DoubleFloat)) -> %
addSceneMaterial(n, mat)
is a convenience function which combines createSceneMaterial with addChild!
- addSceneNamedPoints: (%, SceneNamedPoints PT) -> %
addSceneNamedPoints(n, np)
is a convenience function which combines createSceneNamedPoints with addChild!
- addScenePattern: (%, Symbol, NonNegativeInteger, SBoundary PT) -> %
addScenePattern(n, ptype, step, bb)
is a convenience function which combines createScenePattern with addChild!
- addSceneRuler: (%, Symbol, PT, SBoundary PT) -> %
addSceneRuler(n, ptype, offset, bb)
is a convenience function which combines createSceneRuler with addChild!
- addSceneShape: (%, Record(shptype: Symbol, centre: PT, size: PT, fill: Boolean)) -> %
addSceneShape(n, shape)
is a convenience function which combines createSceneShape with addChild!
- addSceneShape: (%, SBoundary PT) -> %
addSceneShape(n, shape)
is a convenience function which combines createSceneShape with addChild!
- addSceneText: (%, List String, NonNegativeInteger, PT) -> %
addSceneText(n, str, sz, pz)
is a convenience function which combines createSceneText with addChild!
- addSceneText: (%, Record(txt: String, siz: NonNegativeInteger, pos: PT, np: List String)) -> %
addSceneText(n, text)
is a convenience function which combines createSceneText with addChild!
- addSceneText: (%, String, NonNegativeInteger, PT) -> %
addSceneText(n, str, sz, pz)
is a convenience function which combines createSceneText with addChild!
- addSceneTransform: (%, STransform PT) -> %
addSceneTransform(n, tran)
is a convenience function which combines createSceneTransform with addChild!
- addSceneUse: (%, String) -> %
addSceneUse(n, nam)
is a convenience function which combines createSceneUse with addChild!
- boundary: (%, DoubleFloat) -> SBoundary PT
boundary(n, fontScale)
returns the boundary of a given node, so if this is called on the root node, it will return the boundary of the whole scene. There is a difficulty involving text nodes, that is they have a fixed font size. But we want to calculate the boundary in local coordinates, to do this conversion we need to know the total boundary size but that is what we are trying to calculate! To get round this contradiction the parameter fontScale is required since fonts are rendered at a fixed size we need a scaling factor so that we can give the boundary in our coordinate system. fontScale should be set to the full width of the diagram (not just the width of this node). If this is not known then choose an approximate value. This only affects text nodes, if this node, or its subnodes, do not contain a text node then its value is not significant.
- coerce: % -> OutputForm
output a full scenegraph could contain a lot of data and so we have to be careful to restrict the output to what is reasonable on the command line. Therefore we do not display all subnodes or the full information from nodes such as IFS.
- createArrows2Din2D: (PT -> PT, Segment DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
createArrows2Din2D(ptFun, uSeg, vSeg, numPts)
creates arrows to represent output for each input point in other words this represents a two dimensional force field with the arrows showing the direction of the field
- createPlot1Din2D: (DoubleFloat -> DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
createPlot1Din2D(f, tRange, numPts)
creates two dimensional function plot. Draws the graph ofy
=f
(x
) asx
ranges from min(a,b
) to max(a,b
).tRange
is a..b
- createPlot1Din2D: (DoubleFloat -> PT, Segment DoubleFloat, NonNegativeInteger) -> %
createPlot1Din2D(f, tRange, numPts)
creates a two dimensional function plot draws the graph from a mapping of float to point asx
ranges from min(a,b
) to max(a,b
).tRange
is a..b
- createPlot1Din2Dparametric: (ParametricPlaneCurve(DoubleFloat -> DoubleFloat), Segment DoubleFloat, NonNegativeInteger) -> %
createPlot1Din2Dparametric(ppc, tRange, numPts)
creates a node from plot using Parametric Plane Curve. This represents 1 dimension (line - possibly curved) in 2 dimensions (plane) In theory a line has no width but in that case we would not see it so we give it a width given by the material node that is applicable in this part of the scene graphPPC
is ParametricPlaneCurve(DF
->
DF
) which is created with curve(f1
,f2
) wheref1
andf2
are functions of type ComponentFunction, in this caseDF
->
DF
- createPlot1Din3Dparametric: (DoubleFloat -> PT, Segment DoubleFloat, NonNegativeInteger) -> %
createPlot1Din3Dparametric(pcfun, tRange, numPts)
create a line (1D subspace) in 3D space. This represents 1 dimension (line - possibly curved) in 3 dimensions In theory a line has no width but in that case we would not see it so we give it a width given by the material node that is applicable in this part of the scene graph PCFUN is a function from float to point:DF
->
PT
- createPlot1Din3Dparametric: (ParametricSpaceCurve(DoubleFloat -> DoubleFloat), Segment DoubleFloat, NonNegativeInteger) -> %
createPlot1Din3Dparametric(psc, tRange, numPts)
create a line (1D subspace) in 3D space. This represents 1 dimension (line - possibly curved) in 3 dimensions In theory a line has no width but in that case we would not see it so we give it a width given by the material node that is applicable in this part of the scene graphPSC
ParametricSpaceCurve(DF
->
DF
) is created with curve(f1
,f2
,f3
) wheref1
,f2
andf3
are functions of type ComponentFunction, in this caseDF
->
DF
- createPlot2Din3D: ((DoubleFloat, DoubleFloat) -> DoubleFloat, Segment DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
createPlot2Din3D(f, a..b, c..d)
returns a scene node which contains the graph ofz
=f
(x
,y
) asx
ranges from min(a,b
) to max(a,b
) andy
ranges from min(c
,d
) to max(c
,d
). create a surface (2D subspace) in 3D space The surface is approximated by polygons which are represented by in indexed face set (IFS) node
- createPlot2Din3D: ((DoubleFloat, DoubleFloat) -> PT, Segment DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
createPlot2Din3D(ptFun, uSeg, vSeg, numPts)
create a surface (2D subspace) in 3D space. The surface is approximated by polygons which are represented by in indexed face set (IFS) node
- createPlot2Din3Dparametric: ((DoubleFloat, DoubleFloat) -> PT, Segment DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
createPlot2Din3Dparametric(f, a..b, c..d, l)
returns a scene node which contains the graph of the parametric surfacef
(u
,v
) asu
ranges from min(a,b
) to max(a,b
) andv
ranges from min(c
,d
) to max(c
,d
). This creates a surface (2D subspace) in 3D space The surface is approximated by polygons which are represented by in indexed face set (IFS) node
- createPlot2Din3Dparametric: (ParametricSurface((DoubleFloat, DoubleFloat) -> DoubleFloat), Segment DoubleFloat, Segment DoubleFloat, NonNegativeInteger) -> %
createPlot2Din3Dparametric(surface(f, g, h), a..b, c..d, l)
returns a scene node which contains the graph of the parametric surfacex
=f
(u
,v
),y
=g
(u
,v
),z
=h
(u
,v
) asu
ranges from min(a,b
) to max(a,b
) andv
ranges from min(c
,d
) to max(c
,d
). This creates a surface (2D subspace) in 3D space The surface is approximated by polygons which are represented by in indexed face set (IFS) node
- createSceneArrow: (%, %, PT, Symbol, DoubleFloat, DoubleFloat) -> %
createSceneArrow(st, en, offset, mode, size, fontScale)
constructs an arrow node, inn
-dimensional space, going fromst
toen
. ‘st’ and ‘en’ are nodes in the scene and the arrows will be drawn upto their boundary.st
is the node at the start of the arrowen
is the node at the end of the arrow ‘mode’ and ‘size’ parameters determine thesize
of the arrowhead.mode
can have the following values: “fixed”::Symbol--
fixedsize
line width given by ‘size’ parameter “proportional”::Symbol--
size
as a proportion of the overall bounds “variable”::Symbol--
size
as a proportion of the arrow length So “proportional” would typically be used when drawing a graph (in graph theory) where it looks better if each arrow head is the same. “variable” would typically be used when drawing a force field where a bigger arrow head might indicate a stronger force. fontScale should be set to the full width of the diagram (not just the width of this node). If this is not known then choose an approximate value. This only affects text nodes, ifst
oren
, or its subnodes, do not contain a text node then its value is not significant.
- createSceneArrow: (String, String, PT, Symbol, DoubleFloat) -> %
createSceneArrow(st, en, offset, mode, size)
constructs an arrow node, inn
-dimensional space, going fromst
toen
. ‘st’ and ‘en’ are determined from a list of points from named points node.st
is the start of the arrowen
is the end of the arrow ‘mode’ and ‘size’ parameters determine the size of the arrowhead.mode
can have the following values: “fixed”::Symbol--
fixed size line width given by ‘size’ parameter “proportional”::Symbol--
size as a proportion of the overall bounds “variable”::Symbol--
size as a proportion of the arrow length So “proportional” would typically be used when drawing a graph (in graph theory) where it looks better if each arrow head is the same. “variable” would typically be used when drawing a force field where a bigger arrow head might indicate a stronger force.
- createSceneArrows: (List List PT, Symbol, DoubleFloat) -> %
createSceneArrows(line, mode, size)
constructs an arrow node, this contains arrows (represented by a list of points) inn
-dimensional space. The space is implicit in thePT
andTR
parameters supplied when this Scene was created. ‘mode’ and ‘size’ parameters determine the size of the arrowhead.mode
can have the following values: “fixed”::Symbol--
fixed sizeline
width given by ‘size’ parameter “proportional”::Symbol--
size as a proportion of the overall bounds “variable”::Symbol--
size as a proportion of the arrow length So “proportional” would typically be used when drawing a graph (in graph theory) where it looks better if each arrow head is the same. “variable” would typically be used when drawing a force field where a bigger arrow head might indicate a stronger force.
- createSceneBox: DoubleFloat -> %
createSceneBox(size)
constructs an indexed face set node which is a 3D box of a givensize
- createSceneClip: SBoundary PT -> %
createSceneClip(bb)
constructs a clip node, clips its sub nodes in the coordinate system in force at the clip node.
- createSceneDef: (String, %) -> %
createSceneDef(nam, nde)
defines a point in the scenegraph so that it can be used elsewhere.
- createSceneGraph: (DirectedGraph String, NonNegativeInteger, NonNegativeInteger, Boolean) -> %
createSceneGraph(g, x, y, dispArrowName)
creates a graph theory diagram
- createSceneGrid: (DoubleFloat, SBoundary PT) -> %
createSceneGrid(stepSize, bb)
constructs a grid, consists of a group, under which are vertical and horizontal lines. The spacing between lines is given by step.
- createSceneGrid: SBoundary PT -> %
createSceneGrid(bb)
constructs a grid with narrow blue lines every 20 units wide blue lines every 100 units wide red lines every 200 units
- createSceneGroup: () -> %
createSceneGroup()
constructs a group node, this node does not do anything itself but contains other nodes
- createSceneIFS: (List List NonNegativeInteger, List PT) -> %
createSceneIFS(inx, pts)
constructs an indexed face set node, this defines a surface represented by a set of polygons inn
-dimensional space.
- createSceneIFS: SceneIFS PT -> %
createSceneIFS(in1)
constructs an indexed face set node, this defines a surface represented by a set of polygons inn
-dimensional space.
- createSceneLine: (%, %, DoubleFloat) -> %
createSceneLine(st, en, fontScale)
constructs a line node, that contains a line, inn
-dimensions, fromst
toen
. ‘st’ and ‘en’ are nodes in the scene and the line will be drawn upto their boundary.st
is the node at the start of the lineen
is the node at the end of the line fontScale should be set to the full width of the diagram (not just the width of this node). If this is not known then choose an approximate value. This only affects text nodes, ifst
oren
, or its subnodes, do not contain a text node then its value is not significant.
- createSceneLine: (%, %, DoubleFloat, Boolean) -> %
createSceneLine(st, en, fontScale, shortenLine)
constructs a line node, that contains a line, inn
-dimensions, fromst
toen
. ‘st’ and ‘en’ are nodes in the scene and the line will be drawn upto their boundary.st
is the node at the start of the lineen
is the node at the end of the linefontScale
should be set to the full width of the diagram (not just the width of this node). If this is not known then choose an approximate value. This only affects text nodes, ifst
oren
, or its subnodes, do not contain a text node then its value is not significant. shortenLine iftrue
line drawn upto boundary rather than centre of destination.
- createSceneLine: List PT -> %
createSceneLine(line)
constructs aline
node, this contains aline
(represented by a list of points) inn
-dimensional space. The space is implicit in thePT
andTR
parameters supplied when this Scene was created.
- createSceneLines: List List PT -> %
createSceneLines(line)
constructs aline
node, this contains lines (represented by a list of points) inn
-dimensional space. The space is implicit in thePT
andTR
parameters supplied when this Scene was created.
- createSceneMaterial: (DoubleFloat, String, String) -> %
createSceneMaterial(lineW, lineC, fillC)
constructs a material node This sets the lineWidth, lineCol and fillCol for all nodes under this, unless overridden by another material node. That is the material parameters that apply to a given node are those of the closest material node above it in the hierarchy
- createSceneMaterial: Record(lineWidth: DoubleFloat, lineCol: String, fillCol: String, matOpacity: DoubleFloat) -> %
createSceneMaterial(mat)
constructs a material node This sets the lineWidth, lineCol and fillCol for all nodes under this, unless overridden by another material node. That is the material parameters that apply to a given node are those of the closest material node above it in the hierarchy line width is expressed relative to the width of current boundary
- createSceneNamedPoints: SceneNamedPoints PT -> %
createSceneNamedPoints(np)
constructs a named points node, this allows us to define a set of points which can be used multiple times in the scenegraph.
- createScenePattern: (Symbol, NonNegativeInteger, SBoundary PT) -> %
createScenePattern(ptype, step, bb)
creates a test pattern suitable for showing the effect of transforms. The pattern depends onptype
parameter as follows: ptype=”GRID”::Symbol : construct a set of horizontal and vertical lines in the current clip boundary and current material with a spacing between lines given by thestep
parameter. ptype=”SIERPINSKI”::Symbol: constructs a Sierpinski fractal.step
parameter gives the level of subdivision. ptype=”HOUSE”::Symbol: constructs a house shape.
- createSceneRoot: () -> %
createSceneRoot()
constructs the root node, all other nodes are contained in a tree structure under this node
- createSceneRoot: (Integer, Integer, Integer, Integer) -> %
createSceneRoot(minx, miny, maxx, maxy)
constructs the root node, all other nodes are contained in a tree structure under this node
- createSceneRoot: SBoundary PT -> %
createSceneRoot(bb)
constructs the root node, all other nodes are contained in a tree structure under this node
- createSceneRuler: (Symbol, PT, SBoundary PT) -> %
createSceneRuler(ptype, offset, bb)
creates a scale that can be used to provide numeric values for an axis: ptype= “HORIZONTAL”::Symbol : horizontal axis. ptype= “VERTICAL”::Symbol: vertical axis. ptype= “DEBTH”::Symbol: depth axis.
- createSceneShape: Record(shptype: Symbol, centre: PT, size: PT, fill: Boolean) -> %
createSceneShape(shape)
constructs ashape
node, this contains ashape
such as a rectangle or an ellipse.
- createSceneShape: SBoundary PT -> %
createSceneShape(shape)
constructs ashape
node from a boundary, this contains ashape
such as a rectangle or an ellipse.
- createSceneText: (List String, NonNegativeInteger, PT) -> %
createSceneText(str, sz, pz)
constructs a text node using information from named points node.
- createSceneText: (String, NonNegativeInteger, PT) -> %
createSceneText(str, sz, pz)
constructs a text node, text can be used for labelling anything such as graphs, axes and so on.
- createSceneText: Record(txt: String, siz: NonNegativeInteger, pos: PT, np: List String) -> %
createSceneText(text)
constructs atext
node,text
can be used for labelling anything such as graphs, axes and so on.
- createSceneTransform: STransform PT -> %
createSceneTransform(tran)
constructs a transform node This transforms the points and vectors below this node If a given node has more than one transform node above it in the hierarchy then the transforms are compound
- createSceneUse: String -> %
createSceneUse(nam)
uses another point in the scenegraph.
- removeChild!: (%, %) -> Void
removeChild!(n, c)
removes the specified child node'c'
below node'n'
- setTransform!: (%, STransform PT) -> Void
setTransform!(n, tran)
changes the transform without altering the scene hierarchy
- toObj: (%, Reference List PT, Reference List List NonNegativeInteger, Reference NonNegativeInteger, STransform PT, SBoundary PT) -> Void
toObj(n, ptLst, indexLst, indexNxt, tran, bb)
creates an .OBJ (Wavefront) file from scenegraph tree structure called recursively for each node, so when called on root node in scenegraph all other nodes in the scenegraph will get called.n
is the scene to be output toptLst
andindexLst
ptLst
is the points. This will be set to ref([]) at the start and will be built up as this function is called recursivelyindexLst
is list of faces, where faces are list of points indexed byptLst
This will be set to ref([]) at the start and will be built up as this function is called recursivelytran
is the default transform which may be overridden by subnodesbb
is the default boundary which may be overridden by subnodes
- toSVG: (%, Record(lineWidth: DoubleFloat, lineCol: String, fillCol: String, matOpacity: DoubleFloat), STransform PT, SBoundary PT, DoubleFloat, Boolean, Boolean, SceneNamedPoints PT) -> XmlElement
toSVG(n, mat, tran, bb, scale, clipEn, useInteger, npt)
creates an XmlElement containing a ‘SVG’ representation of node'n'
and the nodes below it.n
is the scene to be output toXML
elementsmat
is the default material which may be overridden by subnodestran
is the default transform which may be overridden by subnodesbb
is the default boundary which may be overridden by subnodesscale
is thescale
used toscale
into canvas, it would be better to merge this into trans.clipEn
iftrue
this clips the output to the boundaryuseInteger
iftrue
truncate to integer values.npt
names points can be provided. If not required then set to namedBranch([], [])
- toX3D: (%, Record(lineWidth: DoubleFloat, lineCol: String, fillCol: String, matOpacity: DoubleFloat), STransform PT, SBoundary PT) -> XmlElement
toX3D(n, mat, tran, bb)
creates an XmlElement containing a ‘X3D’ representation of node'n'
and the nodes below it.n
is the scene to be output toXML
elementsmat
is the default material which may be overridden by subnodestran
is the default transform which may be overridden by subnodesbb
is the default boundary which may be overridden by subnodes
- writeObj: (%, String) -> Void
writeObj(n, filename)
writes an ‘OBJ’ (Wavefront) representation of node'n'
to the filename supplied.
- writeSvg: (%, String) -> Void
writeSvg(n, filename)
writes an ‘SVG’ representation of node'n'
to the filename supplied.
- writeSvgQuantised: (%, String) -> Void
writeSvgQuantised(n, filename)
writes an ‘SVG’ representation of node'n'
to the filename supplied.