space.spad line 1 [edit on github]
The category ThreeSpaceCategory is used for creating three dimensional objects using functions for defining points, curves, polygons, constructs and the subspaces containing them.
check(s)
returns lllpt, list of lists of lists of point information about the ThreeSpace s
.
closedCurve(s, [[lr0], [lr1], ..., [lrn], [lr0]])
adds a closed curve component defined by a list of points lr0
through lrn
, which are lists of elements from the domain PointDomain(m, R)
, where R
is the Ring over which the point elements are defined and m
is the dimension of the points, in which the last element of the list of points contains a copy of the first element list, lr0
. The closed curve is added to the ThreeSpace, s
.
closedCurve(s, [p0, p1, ..., pn, p0])
adds a closed curve component which is a list of points defined by the first element p0
through the last element pn
and back to the first element p0
again, to the ThreeSpace s
.
closedCurve(lp)
sets a list of points defined by the first element of lp
through the last element of lp
and back to the first element again and returns a ThreeSpace whose component is the closed curve defined by lp
.
closedCurve(s)
checks to see if the ThreeSpace, s
, is composed of a single closed curve component defined by a list of points in which the first point is also the last point, all of which are from the domain PointDomain(m, R)
and if so, returns the list of points. An error is signaled otherwise.
closedCurve?(s)
returns true
if the ThreeSpace s
contains a single closed curve component, i.e. the first element of the curve is also the last element, or false
otherwise.
coerce(s)
returns the ThreeSpace s
to Output format.
components(s)
takes the ThreeSpace s
, and creates a list containing a unique ThreeSpace for each single component of s
. If s
has no components defined, the list returned is empty.
composite([s1, s2, ..., sn])
will create a new ThreeSpace that is a union of all the components from each ThreeSpace in the parameter list, grouped as a composite.
composites(s)
takes the ThreeSpace s
, and creates a list containing a unique ThreeSpace for each single composite of s
. If s
has no composites defined (composites need to be explicitly created), the list returned is empty. Note that not all the components need to be part of a composite.
copy(s)
returns a new ThreeSpace that is an exact copy of s
.
create3Space()
creates a ThreeSpace object capable of holding point, curve, mesh components and any combination.
create3Space(s)
creates a ThreeSpace object containing objects pre-defined within some SubSpace s
.
curve(s, [[p0], [p1], ..., [pn]])
adds a space curve which is a list of points p0
through pn
defined by lists of elements from the domain PointDomain(m, R)
, where R
is the Ring over which the point elements are defined and m
is the dimension of the points, to the ThreeSpace s
.
curve(s, [p0, p1, ..., pn])
adds a space curve component defined by a list of points p0
through pn
, to the ThreeSpace s
.
curve([p0, p1, p2, ..., pn])
creates a space curve defined by the list of points p0
through pn
, and returns the ThreeSpace whose component is the curve.
curve(s)
checks to see if the ThreeSpace, s
, is composed of a single curve defined by a list of points and if so, returns the curve, i.e. list of points. An error is signaled otherwise.
curve?(s)
queries whether the ThreeSpace, s
, is a curve, i.e. has one component, a list of list of points, and returns true
if it is, or false
otherwise.
enterPointData(s, [p0, p1, ..., pn])
adds a list of points from p0
through pn
to the ThreeSpace, s
, and returns the index, to the starting point of the list.
lllip(s)
checks to see if the ThreeSpace, s
, is composed of a list of components, which are lists of curves, which are lists of indices to points, and if so, returns the list of lists of lists; An error is signaled otherwise.
lllp(s)
checks to see if the ThreeSpace, s
, is composed of a list of components, which are lists of curves, which are lists of points, and if so, returns the list of lists of lists; An error is signaled otherwise.
llprop(s)
checks to see if the ThreeSpace, s
, is composed of a list of curves which are lists of the subspace component properties of the curves, and if so, returns the list of lists; An error is signaled otherwise.
lp(s)
returns the list of points component which the ThreeSpace, s
, contains; these points are used by reference, i.e. the component holds indices referring to the points rather than the points themselves. This allows for sharing of the points.
lprop(s)
checks to see if the ThreeSpace, s
, is composed of a list of subspace component properties, and if so, returns the list; An error is signaled otherwise.
merge(s1, s2)
will create a new ThreeSpace that has the components of s1
and s2
; Groupings of components into composites are maintained.
merge([s1, s2, ..., sn])
will create a new ThreeSpace that has the components of all the ones in the list; Groupings of components into composites are maintained.
mesh(s, [ [[r10]..., [r1m]], [[r20]..., [r2m]], ..., [[rn0]..., [rnm]] ], close1, close2)
adds a surface component to the ThreeSpace s
, which is defined over a rectangular domain of size WxH
where W
is the number of lists of points from the domain PointDomain(R)
and H
is the number of elements in each of those lists; the booleans close1
and close2
indicate how the surface is to be closed: if close1
is true
this means that each individual list (a curve) is to be closed (i.e. the last point of the list is to be connected to the first point); if close2
is true
, this means that the boundary at one end of the surface is to be connected to the boundary at the other end (the boundaries are defined as the first list of points (curve) and the last list of points (curve)).
mesh(s, [ [[r10]..., [r1m]], [[r20]..., [r2m]], ..., [[rn0]..., [rnm]] ], [props], prop)
adds a surface component to the ThreeSpace s
, which is defined over a rectangular domain of size WxH
where W
is the number of lists of points from the domain PointDomain(R)
and H
is the number of elements in each of those lists; lprops is the list of the subspace component properties for each curve list, and prop is the subspace component property by which the points are defined.
mesh(s, [[p0], [p1], ..., [pn]], close1, close2)
adds a surface component to the ThreeSpace, which is defined over a list of curves, in which each of these curves is a list of points. The boolean arguments close1
and close2
indicate how the surface is to be closed. Argument close1
equal true
means that each individual list (a curve) is to be closed, i.e. the last point of the list is to be connected to the first point. Argument close2
equal true
means that the boundary at one end of the surface is to be connected to the boundary at the other end, i.e. the boundaries are defined as the first list of points (curve) and the last list of points (curve).
mesh(s, [[p0], [p1], ..., [pn]], [props], prop)
adds a surface component, defined over a list curves which contains lists of points, to the ThreeSpace s
; props is a list which contains the subspace component properties for each surface parameter, and prop is the subspace component property by which the points are defined.
mesh([[p0], [p1], ..., [pn]])
creates a surface defined by a list of curves which are lists, p0
through pn
, of points, and returns a ThreeSpace whose component is the surface.
mesh([[p0], [p1], ..., [pn]], close1, close2)
creates a surface defined over a list of curves, p0
through pn
, which are lists of points; the booleans close1
and close2
indicate how the surface is to be closed: close1
set to true
means that each individual list (a curve) is to be closed (that is, the last point of the list is to be connected to the first point); close2
set to true
means that the boundary at one end of the surface is to be connected to the boundary at the other end (the boundaries are defined as the first list of points (curve) and the last list of points (curve)); the ThreeSpace containing this surface is returned.
mesh(s)
checks to see if the ThreeSpace, s
, is composed of a single surface component defined by a list curves which contain lists of points, and if so, returns the list of lists of points; An error is signaled otherwise.
mesh?(s)
returns true
if the ThreeSpace s
is composed of one component, a mesh comprising a list of curves which are lists of points, or returns false
if otherwise
modifyPointData(s, i, p)
changes the point at the indexed location i
in the ThreeSpace, s
, to that of point p
. This is useful for making changes to a point which has been transformed.
numberOfComponents(s)
returns the number of distinct object components in the indicated ThreeSpace, s
, such as points, curves, polygons, and constructs.
numberOfComposites(s)
returns the number of supercomponents, or composites, in the ThreeSpace, s
; Composites are arbitrary groupings of otherwise distinct and unrelated components; A ThreeSpace need not have any composites defined at all and, outside of the requirement that no component can belong to more than one composite at a time, the definition and interpretation of composites are unrestricted.
objects(s)
returns the ThreeSpace, s
, in the form of a 3D object record containing information on the number of points, curves, polygons and constructs comprising the ThreeSpace..
point(s, [x, y, z])
adds a point component defined by a list of elements which are from the PointDomain(R)
to the ThreeSpace, s
, where R
is the Ring over which the point elements are defined.
point(s, i)
adds a point component which is placed into a component list of the ThreeSpace, s
, at the index given by i
.
point(s, p)
adds a point component defined by the point, p
, specified as a list from List(R)
, to the ThreeSpace, s
, where R
is the Ring over which the point is defined.
point(p)
returns a ThreeSpace object which is composed of one component, the point p
.
point(s)
checks to see if the ThreeSpace, s
, is composed of only a single point and if so, returns the point. An error is signaled otherwise.
point?(s)
queries whether the ThreeSpace, s
, is composed of a single component which is a point and returns the boolean result.
polygon(s, [[r0], [r1], ..., [rn]])
adds a polygon component defined by a list of points r0
through rn
, which are lists of elements from the domain PointDomain(m, R)
to the ThreeSpace s
, where m
is the dimension of the points and R
is the Ring over which the points are defined.
polygon(s, [p0, p1, ..., pn])
adds a polygon component defined by a list of points, p0
through pn
, to the ThreeSpace s
.
polygon([p0, p1, ..., pn])
creates a polygon defined by a list of points, p0
through pn
, and returns a ThreeSpace whose component is the polygon.
polygon(s)
checks to see if the ThreeSpace, s
, is composed of a single polygon component defined by a list of points, and if so, returns the list of points; An error is signaled otherwise.
polygon?(s)
returns true
if the ThreeSpace s
contains a single polygon component, or false
otherwise.
subspace(s)
returns the SubSpace which holds all the point information in the ThreeSpace, s
.