ThreeSpaceCategory RΒΆ
space.spad line 1 [edit on github]
R: Ring
The category ThreeSpaceCategory is used for creating three dimensional objects using functions for defining points, curves, polygons, constructs and the subspaces containing them.
- check: % -> %
check(s)
returns lllpt, list of lists of lists of point information about the ThreeSpaces
.
- closedCurve?: % -> Boolean
closedCurve?(s)
returnstrue
if the ThreeSpaces
contains a single closed curve component, i.e. the first element of the curve is also the last element, orfalse
otherwise.
- closedCurve: % -> List Point R
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 domainPointDomain(m, R)
and if so, returns the list of points. An error is signaled otherwise.
- closedCurve: (%, List List R) -> %
closedCurve(s, [[lr0], [lr1], ..., [lrn], [lr0]])
adds a closed curve component defined by a list of pointslr0
throughlrn
, which are lists of elements from the domainPointDomain(m, R)
, whereR
is the Ring over which the point elements are defined andm
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: (%, List Point R) -> %
closedCurve(s, [p0, p1, ..., pn, p0])
adds a closed curve component which is a list of points defined by the first elementp0
through the last elementpn
and back to the first elementp0
again, to the ThreeSpaces
.
- closedCurve: List Point R -> %
closedCurve(lp)
sets a list of points defined by the first element oflp
through the last element oflp
and back to the first element again and returns a ThreeSpace whose component is the closed curve defined bylp
.
- coerce: % -> OutputForm
coerce(s)
returns the ThreeSpaces
to Output format.
- components: % -> List %
components(s)
takes the ThreeSpaces
, and creates a list containing a unique ThreeSpace for each single component ofs
. Ifs
has no components defined, the list returned is empty.
- composite: List % -> %
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: % -> List %
composites(s)
takes the ThreeSpaces
, and creates a list containing a unique ThreeSpace for each single composite ofs
. Ifs
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: % -> %
copy(s)
returns a new ThreeSpace that is an exact copy ofs
.
- create3Space: () -> %
create3Space()
creates a ThreeSpace object capable of holding point, curve, mesh components and any combination.
- create3Space: SubSpace(3, R) -> %
create3Space(s)
creates a ThreeSpace object containing objects pre-defined within some SubSpaces
.
- curve?: % -> Boolean
curve?(s)
queries whether the ThreeSpace,s
, is a curve, i.e. has one component, a list of list of points, and returnstrue
if it is, orfalse
otherwise.
- curve: % -> List Point R
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: (%, List List R) -> %
curve(s, [[p0], [p1], ..., [pn]])
adds a space curve which is a list of pointsp0
throughpn
defined by lists of elements from the domainPointDomain(m, R)
, whereR
is the Ring over which the point elements are defined andm
is the dimension of the points, to the ThreeSpaces
.
- curve: (%, List Point R) -> %
curve(s, [p0, p1, ..., pn])
adds a space curve component defined by a list of pointsp0
throughpn
, to the ThreeSpaces
.
- curve: List Point R -> %
curve([p0, p1, p2, ..., pn])
creates a space curve defined by the list of pointsp0
throughpn
, and returns the ThreeSpace whose component is the curve.
- enterPointData: (%, List Point R) -> NonNegativeInteger
enterPointData(s, [p0, p1, ..., pn])
adds a list of points fromp0
throughpn
to the ThreeSpace,s
, and returns the index, to the starting point of the list.
- latex: % -> String
from SetCategory
- lllip: % -> List List List NonNegativeInteger
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: % -> List List List Point R
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: % -> List List SubSpaceComponentProperty
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: % -> List Point R
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: % -> List SubSpaceComponentProperty
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: (%, %) -> %
merge(s1, s2)
will create a new ThreeSpace that has the components ofs1
ands2
; Groupings of components into composites are maintained.
- merge: List % -> %
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?: % -> Boolean
mesh?(s)
returnstrue
if the ThreeSpaces
is composed of one component, a mesh comprising a list of curves which are lists of points, or returnsfalse
if otherwise
- mesh: % -> List List Point R
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: (%, List List List R, Boolean, Boolean) -> %
mesh(s, [ [[r10]..., [r1m]], [[r20]..., [r2m]], ..., [[rn0]..., [rnm]] ], close1, close2)
adds a surface component to the ThreeSpaces
, which is defined over a rectangular domain of sizeWxH
whereW
is the number of lists of points from the domainPointDomain(R)
andH
is the number of elements in each of those lists; the booleansclose1
andclose2
indicate how the surface is to be closed: ifclose1
istrue
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); ifclose2
istrue
, 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: (%, List List List R, List SubSpaceComponentProperty, SubSpaceComponentProperty) -> %
mesh(s, [ [[r10]..., [r1m]], [[r20]..., [r2m]], ..., [[rn0]..., [rnm]] ], [props], prop)
adds a surface component to the ThreeSpaces
, which is defined over a rectangular domain of sizeWxH
whereW
is the number of lists of points from the domainPointDomain(R)
andH
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: (%, List List Point R, Boolean, Boolean) -> %
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 argumentsclose1
andclose2
indicate how the surface is to be closed. Argumentclose1
equaltrue
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. Argumentclose2
equaltrue
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: (%, List List Point R, List SubSpaceComponentProperty, SubSpaceComponentProperty) -> %
mesh(s, [[p0], [p1], ..., [pn]], [props], prop)
adds a surface component, defined over a list curves which contains lists of points, to the ThreeSpaces
; 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: (List List Point R, Boolean, Boolean) -> %
mesh([[p0], [p1], ..., [pn]], close1, close2)
creates a surface defined over a list of curves,p0
throughpn
, which are lists of points; the booleansclose1
andclose2
indicate how the surface is to be closed:close1
set totrue
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 totrue
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: List List Point R -> %
mesh([[p0], [p1], ..., [pn]])
creates a surface defined by a list of curves which are lists,p0
throughpn
, of points, and returns a ThreeSpace whose component is the surface.
- modifyPointData: (%, NonNegativeInteger, Point R) -> %
modifyPointData(s, i, p)
changes the point at the indexed locationi
in the ThreeSpace,s
, to that of pointp
. This is useful for making changes to a point which has been transformed.
- numberOfComponents: % -> NonNegativeInteger
numberOfComponents(s)
returns the number of distinct object components in the indicated ThreeSpace,s
, such as points, curves, polygons, and constructs.
- numberOfComposites: % -> NonNegativeInteger
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: % -> Record(points: NonNegativeInteger, curves: NonNegativeInteger, polygons: NonNegativeInteger, constructs: NonNegativeInteger)
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?: % -> Boolean
point?(s)
queries whether the ThreeSpace,s
, is composed of a single component which is a point and returns the boolean result.
- point: % -> Point R
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: (%, List R) -> %
point(s, [x, y, z])
adds a point component defined by a list of elements which are from thePointDomain(R)
to the ThreeSpace,s
, whereR
is the Ring over which the point elements are defined.
- point: (%, NonNegativeInteger) -> %
point(s, i)
adds a point component which is placed into a component list of the ThreeSpace,s
, at the index given byi
.
- point: (%, Point R) -> %
point(s, p)
adds a point component defined by the point,p
, specified as a list fromList(R)
, to the ThreeSpace,s
, whereR
is the Ring over which the point is defined.
- point: Point R -> %
point(p)
returns a ThreeSpace object which is composed of one component, the pointp
.
- polygon?: % -> Boolean
polygon?(s)
returnstrue
if the ThreeSpaces
contains a single polygon component, orfalse
otherwise.
- polygon: % -> List Point R
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: (%, List List R) -> %
polygon(s, [[r0], [r1], ..., [rn]])
adds a polygon component defined by a list of pointsr0
throughrn
, which are lists of elements from the domainPointDomain(m, R)
to the ThreeSpaces
, wherem
is the dimension of the points andR
is the Ring over which the points are defined.
- polygon: (%, List Point R) -> %
polygon(s, [p0, p1, ..., pn])
adds a polygon component defined by a list of points,p0
throughpn
, to the ThreeSpaces
.
- polygon: List Point R -> %
polygon([p0, p1, ..., pn])
creates a polygon defined by a list of points,p0
throughpn
, and returns a ThreeSpace whose component is the polygon.
- subspace: % -> SubSpace(3, R)
subspace(s)
returns the SubSpace which holds all the point information in the ThreeSpace,s
.