# Module `graphics3d` - A library for programming simple 3D graphics in occam-pi

A library for programming simple 3D graphics in occam-pi.

This library provides for simple 3D graphics in occam-pi, using simple rasters.

Note: the general [serial] techniques/algorithms used in this library are based on code from lightsrc.cpp and glenz.cpp by Marcus Lindblom.

## Index

- Protocol `G3D.ALL.CONTROL` - Overall control for graphics pipeline
  - Tag `reset.all` - Reset all components to default state
- Protocol `G3D.GEN.CONTROL` - Polygon points generator control
  - Tag `add.scale` - Add to the current scale
  - Tag `add.trans` - Add to the current translation
  - Tag `relink` - Reconnect I/O channels
  - Tag `reset` - Reset generator to default state
  - Tag `set.scale` - Absolutely set the scale
  - Tag `set.trans` - Absolutely set the translation
- Constant `G3D.MAX.POLY.POINTS` - Maximum number of points in a polygon (see )
- Constant `G3D.MAX.SCAN.HEIGHT` - Maximum height of any particular polygon
- Protocol `G3D.PGN.CONTROL` - Polygon generator control
  - Tag `reset` - Reset polygon generator to default state
  - Tag `set.backfaces` - Whether back faces of solid objects should be generated
  - Tag `set.face.colour` - Set individual face colour
  - Tag `set.face.colours` - Set all face colours
  - Tag `set.polyid` - Set polygon ID (0-255)
  - Tag `set.trimap` - Generate triangular polygons only
- Record `G3D.POINT2` - Integer point in 2D space
- Record `G3D.POINT2.3` - Integer point in 2D space, original Z multiplied up
- Record `G3D.POINT3` - Real point in 3D space (REAL32s)
- Record `G3D.POLY` - General polygon in 2D space, orignal Z multiplied up
- Record `G3D.POLY.SCAN` - Scan-line converted polygon in 2D space
- Protocol `G3D.PRJ.CONTROL` - Polygon points 3D-to-2D projection control
  - Tag `reset` - Reset projector to default state
  - Tag `set.2dshift` - Set 2D translation
  - Tag `set.3dshift` - Set 3D translation (applied before projection)
  - Tag `set.scaling` - Set 2D scaling
  - Tag `set.zdepth` - Set Z depth offset (pushes scene away from camera)
- Protocol `G3D.PSC.CONTROL` - Polygon scan-line generator control
  - Tag `reset` - Resets scan-line generator to default state
  - Tag `set.zcolour` - Whether the pixel colour used is adjusted for Z depth
- Protocol `G3D.RDR.CONTROL` - Polygon render (shader) control
  - Tag `reset` - Resets shader to default state
  - Tag `set.mode` - Set shader mode (see )
- Protocol `G3D.RENDER.ENGINE.LINK` - Graphics pipeline link protocol
  - Tag `raster` - Raster to render on and forward
  - Tag `set.next` - Set the next renderer in the pipeline
- Group `G3D.RENDER.MODE` - polygon rendering modes
  - Constant `G3D.RENDER.MODE.GLENZ` - Glenz-effect shading
  - Constant `G3D.RENDER.MODE.NONE` - Constant shading
  - Constant `G3D.RENDER.MODE.NORM` - Normal vector based shading
- Protocol `G3D.ROT.CONTROL` - Points rotation control
  - Tag `add.increment` - Add to the increment
  - Tag `reset` - Reset rotation to default state
  - Tag `set.angle` - Absolutely set the angle of rotation
  - Tag `set.increment` - Absolutely set the increment
  - Tag `set.mode` - Set the rotation mode (see )
- Group `G3D.ROTATE.MODE` - point/polygon rotation modes
  - Constant `G3D.ROTATE.MODE.DEMO` - Demo-effect rotations
  - Constant `G3D.ROTATE.MODE.NONE` - No rotation
  - Constant `G3D.ROTATE.MODE.NX` - Negative rotate on X axis
  - Constant `G3D.ROTATE.MODE.NY` - Negative rotate on Y axis
  - Constant `G3D.ROTATE.MODE.NZ` - Negative rotate on Z axis
  - Constant `G3D.ROTATE.MODE.X` - Rotate on X axis
  - Constant `G3D.ROTATE.MODE.Y` - Rotate on Y axis
  - Constant `G3D.ROTATE.MODE.Z` - Rotate on Z axis
- Group `G3D.SCENE.RO` - Scene rotation ordering
  - Constant `G3D.SCENE.RO.NONE` - No rotations applied
  - Constant `G3D.SCENE.RO.X` - Rotate on X axis only
  - Constant `G3D.SCENE.RO.XY` - Rotate on X then Y
  - Constant `G3D.SCENE.RO.XYZ` - Rotate on X then Y then Z
  - Constant `G3D.SCENE.RO.XZ` - Rotate on X then Z
  - Constant `G3D.SCENE.RO.XZY` - Rotate on X then Z then Y
  - Constant `G3D.SCENE.RO.Y` - Rotate on Y axis only
  - Constant `G3D.SCENE.RO.YX` - Rotate on Y then X
  - Constant `G3D.SCENE.RO.YXZ` - Rotate on Y then X then Z
  - Constant `G3D.SCENE.RO.YZ` - Rotate on Y then Z
  - Constant `G3D.SCENE.RO.YZX` - Rotate on Y then Z then X
  - Constant `G3D.SCENE.RO.Z` - Rotate on Z axis only
  - Constant `G3D.SCENE.RO.ZX` - Rotate on Z then X
  - Constant `G3D.SCENE.RO.ZXY` - Rotate on Z then X then Y
  - Constant `G3D.SCENE.RO.ZY` - Rotate on Z then Y
  - Constant `G3D.SCENE.RO.ZYX` - Rotate on Z then Y then X
- Protocol `G3D.SCENE.TRANS.LINK` - Scene rotate pipeline link protocol
  - Tag `reset` - Reset to default settings
  - Tag `set.next` - Set the next scene transformer in a pipeline
  - Tag `set.post.3dshift` - Set 3D shift (after rotation, determines camera position)
  - Tag `set.pre.3dshift` - Set 3D shift (before rotation, determines centre of scene)
  - Tag `set.rot.angles` - Set rotations in X, Y and Z planes
  - Tag `set.rot.diffs` - Set differences for continuous rotation
  - Tag `set.rot.order` - Set rotation order (see )
  - Tag `set.xyscale` - Set X-Y scaling (lens angle)
- Protocol `G3D.SCL.CONTROL` - Points scaler control
  - Tag `reset` - Reset scale to default state (1, 1, 1)
  - Tag `set.3dscale` - Set 3D scaling
- Protocol `G3D.TMR.CONTROL` - Graphics pipeline speed control
  - Tag `faster` - Go faster
  - Tag `pause` - Pause/unpause the rasters flowing through the network
  - Tag `reset` - Resets the timer control
  - Tag `set.fps` - Set frames-per-second absolutely
  - Tag `slower` - Go slower
- Protocol `G3D.TRN.CONTROL` - Points translation control
  - Tag `reset` - Reset translation to default state (0, 0, 0)
  - Tag `set.3dshift` - Set 3D translation
- Data type `ZBUFFER` - Z-buffer is a 2D array of integers, passed around with rasters
- Process `butterfly.network` - Implements a butterfly that flaps around a particular path
- Process `butterfly.network.spawn` - Dynamically spawns a new 'butterfly.network'
- Process `chessboard.network` - Implements a basic chess board (zdepth style)
- Process `chessboard.network.spawn` - Spawns a new 'chessboard.network'
- Process `chessboardify.points` - Turns chessboard points into polygons
- Process `chessboardpoints.generator` - Chess board points generator
- Process `chessify.points` - Generates chess-style polygons from points
- Process `chesspiece.network` - Implements a basic chess piece (zdepth style)
- Process `chesspiece.network.spawn` - Dynamically spawns a new 'chesspiece.network'
- Process `chesspoints.generator` - Chess piece points generator
- Process `cogify.points` - Generates cog polygons from cog-points
- Process `cogpoints.generator` - Cog points generator
- Process `cubepoints.generator` - Cube point generator
- Process `cubify.points` - Generates cube polygons from cube points
- Process `fbypoints.generator` - Inmos butterfly logo generator
- Process `flatpolify.points` - Generates flat polygons from poly-points
- Process `flatpolypoints.generator` - Flat 3D polygon generator
- Process `flutterby.points` - Generates polygons representing the Inmos style butterfly logo
- Process `g3d.gen.control.delta` - Delta for protocol
- Process `g3d.pgn.control.delta` - Delta for protocol
- Process `g3d.point2.3.delta` - Delta for mobile arrays of the type
- Process `g3d.point2.delta` - Delta for mobile arrays of the type
- Process `g3d.point3.delta` - Delta for mobile arrays of the type
- Process `g3d.poly.delta` - Delta for mobile arrays of the type
- Process `g3d.poly.scan.delta` - Delta for mobile arrays of the type
- Process `g3d.prj.control.delta` - Delta for protocol
- Process `g3d.psc.control.delta` - Delta for protocol
- Process `g3d.rdr.control.delta` - Delta for protocol
- Process `g3d.rot.control.delta` - Delta for protocol
- Process `g3d.scene.camera` - Implements a standard camera, controlled by the user
- Process `g3d.scene.head` - Provides a scene "head", for combined rotation/translation/etc
- Process `g3d.scene.spawn` - Dynamically spawns a new scene head
- Process `glenz.cog.network` - Implements a basic "Glenz cog"
- Process `glenz.cog.network.spawn` - Dynamically spawns a new 'glenz.cog.network'
- Process `glenz.flatpoly.network` - Implements a basic regular polygon (glenz style)
- Process `glenz.flatpoly.network.spawn` - Dynamically spawns a new 'glenz.flatpoly.network'
- Process `glenz.network` - Implements a basic "Glenz cube"
- Process `glenz.network.spawn` - Dynamically spawns a new 'glenz.network'
- Process `glenz.network2` - Implements a basic "Glenz cube"
- Process `glenz.network2.spawn` - Dynamically spawns a new 'glenz.network2'
- Variable `link?` - Link channel
- Variable `link?` - Link channel
- Process `normal.network` - Implements a basic "Normal cube"
- Process `normal.network.spawn` - Dynamically spawns a new 'normal.network'
- Process `normal.network2` - Implements a basic "Glenz cube"
- Process `normal.network2.spawn` - Dynamically spawns a new 'normal.network2'
- Process `planar.path` - Moves a 3D object around a plane following an elliptical path
- Process `points.3d.to.2d3` - Projects 3D points into 2D, preserves Z information
- Process `points3d.rotate` - Point rotator
- Process `points3d.scale` - Point scaler
- Process `points3d.translate` - Point translator
- Process `points3d.transrotate` - Performs translation and rotation on 3D points (used in camera/scene handling)
- Process `points3d.transrotate.prj` - Performs translation and rotation on 3D points (used in camera/scene handling)
- Process `poly.scanlines` - Converts polygons to scan-line data
- Process `raster.buffer` - Simple raster buffer
- Process `raster.chain` - Implements raster render chain
- Process `raster.chain.head` - Head of the raster render chain
- Process `raster.chain.tail` - Tail of the raster render chain
- Process `raster.clearer` - Clears rasters
- Process `raster.fader` - Fades rasters
- Process `raster.polyidclick` - Connects into the raster chain and event pipeline to extract IDs (0-255) of polygons
- Process `raster.timed.buffer` - Timed raster buffer
- Process `render.polyframe` - Renders polygons as a series of lines (wireframe)
- Process `render.polyframe.trigger` - Renders polygons as a series of lines (wireframe)
- Process `render.polyscans` - Renders polygon scan-line data onto a raster
- Process `render.polyscans.trigger` - Renders polygon scan-line data onto a raster, sends triggers back to generator process
- Process `rotate.orchestra1` - Orchestrates components
- Process `screen.cube` - Implements an on-screen cube showing the image boundary
- Process `screen.cube.spawn` - Dynamically spawns a new 'screen.cube'
- Process `zdepth.flatpoly.network` - Implements a basic regular polygon (zdepth style)
- Process `zdepth.flatpoly.network.spawn` - Dynamically spawns a new 'zdepth.flatpoly.network'

## Declarations

### `rasterutil.occ`:30Process `raster.buffer`

`PROC raster.buffer (CHAN RASTER in?, out!)`

Simple raster buffer. Basic raster buffer process.

#### Parameters:

`CHAN RASTER` | `in` | Rasters in
`CHAN RASTER` | `out` | Rasters out

### `rasterutil.occ`:46Process `raster.timed.buffer`

`PROC raster.timed.buffer (CHAN RASTER in?, out!, VAL INT fps, CHAN G3D.TMR.CONTROL ctrl?)`

Timed raster buffer. Basic raster buffer process, but limits speed through at specified number of frames-per-second.

#### Parameters:

`CHAN RASTER` | `in` | Rasters in
`CHAN RASTER` | `out` | Rasters out
`VAL INT` | `fps` | Frames per second
`CHAN G3D.TMR.CONTROL` | `ctrl` | Control channel

### `rasterutil.occ`:104Process `raster.fader`

`PROC raster.fader (CHAN RASTER in?, out!)`

Fades rasters. Raster buffer that reduces the colour level of each of the components.

#### Parameters:

`CHAN RASTER` | `in` | Rasters in
`CHAN RASTER` | `out` | Rasters out

### `rasterutil.occ`:126Process `raster.clearer`

`PROC raster.clearer (CHAN RASTER in?, out!)`

Clears rasters. Raster buffer that clears rasters as they go through.

#### Parameters:

`CHAN RASTER` | `in` | Rasters in
`CHAN RASTER` | `out` | Rasters out

### `graphics3d.occ`:95Process `flatpolypoints.generator`

`PROC flatpolypoints.generator (CHAN INT trigger?, VAL INT npoints, VAL REAL32 rad, CHAN MOBILE []G3D.POINT3 out!, CHAN G3D.GEN.CONTROL ctrl?)`

Flat 3D polygon generator. Generates a regular N-sided polygon in 3D space (laying down flat by default).

#### Parameters:

`CHAN INT` | `trigger` | Trigger channel.
`VAL INT` | `npoints` | Number of points.
`VAL REAL32` | `rad` | Radius (of points from centre).
`CHAN MOBILE []G3D.POINT3` | `out` | Generated points.
`CHAN G3D.GEN.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:190Process `cogpoints.generator`

`PROC cogpoints.generator (CHAN INT trigger?, VAL INT nteeth, VAL REAL32 i.rad, o.rad, i.ang, o.ang, CHAN MOBILE []G3D.POINT3 out!, CHAN G3D.GEN.CONTROL ctrl?)`

Cog points generator. Generates a stream of points that represent a cog in 3D space (laying down flat by default).

#### Parameters:

`CHAN INT` | `trigger` | Trigger channel.
`VAL INT` | `nteeth` | Number of teeth on the cog.
`VAL REAL32` | `i.rad` | Inner radius (where teeth start).
`VAL REAL32` | `o.rad` | Outer raduis (where teeth end).
`VAL REAL32` | `i.ang` | Inner tooth angle (between teeth bottoms).
`VAL REAL32` | `o.ang` | Outer tooth angle (of teeth ends).
`CHAN MOBILE []G3D.POINT3` | `out` | Generated points.
`CHAN G3D.GEN.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:295Process `cubepoints.generator`

`PROC cubepoints.generator (CHAN INT trigger?, CHAN MOBILE []G3D.POINT3 out!, CHAN G3D.GEN.CONTROL ctrl?)`

Cube point generator. Generates a constant stream of points that represent a cube in 3D space.

#### Parameters:

`CHAN INT` | `trigger` | Trigger channel.
`CHAN MOBILE []G3D.POINT3` | `out` | Points generated.
`CHAN G3D.GEN.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:379Process `fbypoints.generator`

`PROC fbypoints.generator (CHAN INT trigger?, CHAN MOBILE []G3D.POINT3 out!, CHAN G3D.GEN.CONTROL ctrl?)`

Inmos butterfly logo generator. The pixel positions were generated by tracing from an Inmos promotional video showing the butterflies running on a Transputer network.

#### Parameters:

`CHAN INT` | `trigger` | Trigger channel.
`CHAN MOBILE []G3D.POINT3` | `out` | Points generated.
`CHAN G3D.GEN.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:570Process `points3d.rotate`

`PROC points3d.rotate (CHAN MOBILE []G3D.POINT3 in?, out!, CHAN G3D.ROT.CONTROL ctrl?)`

Point rotator. Rotates an arbitrary set of points around the origin, such that it passes through the same sequence of moves repeatedly (e.g. for a spinning cube). Can also be used for static rotation when set with a zero increment.

#### Parameters:

`CHAN MOBILE []G3D.POINT3` | `in` | 3D points in.
`CHAN MOBILE []G3D.POINT3` | `out` | 3D points out.
`CHAN G3D.ROT.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:703Process `points3d.translate`

`PROC points3d.translate (CHAN MOBILE []G3D.POINT3 in?, out!, CHAN G3D.TRN.CONTROL ctrl?)`

Point translator. Translates an arbitrary set of points in 3D space.

#### Parameters:

`CHAN MOBILE []G3D.POINT3` | `in` | 3D points in.
`CHAN MOBILE []G3D.POINT3` | `out` | 3D points out.
`CHAN G3D.TRN.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:742Process `points3d.scale`

`PROC points3d.scale (CHAN MOBILE []G3D.POINT3 in?, out!, CHAN G3D.SCL.CONTROL ctrl?)`

Point scaler. Scales an arbitrary set of points in 3D space.

#### Parameters:

`CHAN MOBILE []G3D.POINT3` | `in` | 3D points in.
`CHAN MOBILE []G3D.POINT3` | `out` | 3D points out.
`CHAN G3D.SCL.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:1041Process `points3d.transrotate`

`PROC points3d.transrotate (CHAN MOBILE []G3D.POINT3 in?, out!, G3D.SCENE.TRANS? ctrl)`

Performs translation and rotation on 3D points (used in camera/scene handling).

#### Parameters:

`CHAN MOBILE []G3D.POINT3` | `in` | 3D points in.
`CHAN MOBILE []G3D.POINT3` | `out` | 3D points out.
`G3D.SCENE.TRANS?` | `ctrl` | Control channel-bundle end.

### `graphics3d.occ`:1055Process `points3d.transrotate.prj`

`PROC points3d.transrotate.prj (CHAN MOBILE []G3D.POINT3 in?, out!, G3D.SCENE.TRANS? ctrl, CHAN G3D.PRJ.CONTROL prj.in?, prj.out!)`

Performs translation and rotation on 3D points (used in camera/scene handling).

#### Parameters:

`CHAN MOBILE []G3D.POINT3` | `in` | 3D points in.
`CHAN MOBILE []G3D.POINT3` | `out` | 3D points out.
`G3D.SCENE.TRANS?` | `ctrl` | Control channel-bundle end.
`CHAN G3D.PRJ.CONTROL` | `prj.in` | Projector control in.
`CHAN G3D.PRJ.CONTROL` | `prj.out` | Projector control out.

### `graphics3d.occ`:1064Process `g3d.scene.head`

`PROC g3d.scene.head (G3D.SCENE.TRANS? ctrl)`

Provides a scene "head", for combined rotation/translation/etc.

#### Parameters:

`G3D.SCENE.TRANS?` | `ctrl` | Control channel-end.

### `graphics3d.occ`:1190Process `g3d.scene.spawn`

`PROC g3d.scene.spawn (RESULT G3D.SCENE.TRANS! rctl)`

Dynamically spawns a new scene head.

#### Parameters:

`RESULT G3D.SCENE.TRANS!` | `rctl` | Returned control channel-end.

### `graphics3d.occ`:1205Process `g3d.scene.camera`

`PROC g3d.scene.camera (CHAN RASTER.EVENT ev.in?, CHAN G3D.SCENE.TRANS! sc.in?, G3D.SCENE.TRANS! sc.ctl)`

Implements a standard camera, controlled by the user.

#### Parameters:

`CHAN RASTER.EVENT` | `ev.in` | Raster events.
`CHAN G3D.SCENE.TRANS!` | `sc.in` | Scene control channel-ends in (added to chain).
`G3D.SCENE.TRANS!` | `sc.ctl` | Scene control channel-end.

### `graphics3d.occ`:1361Process `points.3d.to.2d3`

`PROC points.3d.to.2d3 (CHAN MOBILE []G3D.POINT3 in?, CHAN MOBILE []G3D.POINT2.3 out!, CHAN G3D.PRJ.CONTROL ctrl?, VAL INT width, height)`

Projects 3D points into 2D, preserves Z information. Maps a set of 3D points down into a set of 2D points, preserving the Z depth information for later operations.

#### Parameters:

`CHAN MOBILE []G3D.POINT3` | `in` | 3D points in.
`CHAN MOBILE []G3D.POINT2.3` | `out` | 2D3 points out.
`CHAN G3D.PRJ.CONTROL` | `ctrl` | Control channel.
`VAL INT` | `width`, `height` | Display dimensions.

### `graphics3d.occ`:1443Process `flatpolify.points`

`PROC flatpolify.points (CHAN MOBILE []G3D.POINT2.3 in?, VAL INT npoints, CHAN MOBILE []G3D.POLY out!, CHAN G3D.PGN.CONTROL ctrl?)`

Generates flat polygons from poly-points. Expects to receive ((npoints * 2) + 2) points at a time, and from these generates a set of polygons that represents a flat 3D regular polygon.

#### Parameters:

`CHAN MOBILE []G3D.POINT2.3` | `in` | Points in.
`VAL INT` | `npoints` | Number of polygon points.
`CHAN MOBILE []G3D.POLY` | `out` | Polygons out.
`CHAN G3D.PGN.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:1600Process `cogify.points`

`PROC cogify.points (CHAN MOBILE []G3D.POINT2.3 in?, VAL INT nteeth, CHAN MOBILE []G3D.POLY out!, CHAN G3D.PGN.CONTROL ctrl?)`

Generates cog polygons from cog-points. Expects to receive ((nteeth * 8) + 2) points at a time, and from these generates a set of polygons that represent a solid cog.

#### Parameters:

`CHAN MOBILE []G3D.POINT2.3` | `in` | Points in.
`VAL INT` | `nteeth` | Number of cog teeth.
`CHAN MOBILE []G3D.POLY` | `out` | Polygons out.
`CHAN G3D.PGN.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:1959Process `cubify.points`

`PROC cubify.points (CHAN MOBILE []G3D.POINT2.3 in?, CHAN MOBILE []G3D.POLY out!, CHAN G3D.PGN.CONTROL ctrl?)`

Generates cube polygons from cube points. Expects to receive 8 points at a time, and from these generates a set of polygons that represent a cube. Characteristics are controllable through the control channel (e.g. skip hidden surfaces).

#### Parameters:

`CHAN MOBILE []G3D.POINT2.3` | `in` | Points in (2D with Z-depth).
`CHAN MOBILE []G3D.POLY` | `out` | Polygons out.
`CHAN G3D.PGN.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:1979Process `flutterby.points`

`PROC flutterby.points (CHAN MOBILE []G3D.POINT2.3 in?, CHAN MOBILE []G3D.POLY out!, CHAN G3D.PGN.CONTROL ctrl?)`

Generates polygons representing the Inmos style butterfly logo. Expects to receive 30 points at a time, and from these generates a set of polygons that represent the butterfly. Only the colour is controllable through the `ctrl?` channel.

#### Parameters:

`CHAN MOBILE []G3D.POINT2.3` | `in` | Points in (2D with Z-depth).
`CHAN MOBILE []G3D.POLY` | `out` | Polygons out.
`CHAN G3D.PGN.CONTROL` | `ctrl` | Control channel.

### `graphics3d.occ`:2317Process `poly.scanlines`

`PROC poly.scanlines (CHAN MOBILE []G3D.POLY in?, CHAN MOBILE []G3D.POLY.SCAN out!, CHAN G3D.PSC.CONTROL ctrl?, VAL INT width, height)`

Converts polygons to scan-line data. Expects to receive sets of polygons on its input, which it then transforms into a set of G3D.POLY.SCAN structures.

#### Parameters:

`CHAN MOBILE []G3D.POLY` | `in` | Polygons input.
`CHAN MOBILE []G3D.POLY.SCAN` | `out` | Scan-line data output.
`CHAN G3D.PSC.CONTROL` | `ctrl` | Control channel.
`VAL INT` | `width`, `height` | Display dimensions.

### `graphics3d.occ`:2656Process `render.polyscans`

`PROC render.polyscans (CHAN MOBILE []G3D.POLY.SCAN data?, G3D.RENDER.ENGINE? rlink.in, CHAN G3D.RDR.CONTROL ctrl?, VAL INT width, height)`

Renders polygon scan-line data onto a raster.

#### Parameters:

`CHAN MOBILE []G3D.POLY.SCAN` | `data` | Polygon scan-line data input.
`G3D.RENDER.ENGINE?` | `rlink.in` | Raster I/O.
`CHAN G3D.RDR.CONTROL` | `ctrl` | Control channel.
`VAL INT` | `width`, `height` | Display dimensions.

### `graphics3d.occ`:2676Process `render.polyscans.trigger`

`PROC render.polyscans.trigger (CHAN MOBILE []G3D.POLY.SCAN data?, G3D.RENDER.ENGINE? rlink.in, CHAN G3D.RDR.CONTROL ctrl?, CHAN INT trigger!, VAL INT width, height)`

Renders polygon scan-line data onto a raster, sends triggers back to generator process.

#### Parameters:

`CHAN MOBILE []G3D.POLY.SCAN` | `data` | Polygon scan-line data input.
`G3D.RENDER.ENGINE?` | `rlink.in` | Raster I/O.
`CHAN G3D.RDR.CONTROL` | `ctrl` | Control channel.
`CHAN INT` | `trigger` | Triggers for generator.
`VAL INT` | `width`, `height` | Display dimensions.

### `graphics3d.occ`:2965Process `render.polyframe`

`PROC render.polyframe (CHAN MOBILE []G3D.POLY data?, G3D.RENDER.ENGINE? rlink.in, CHAN G3D.RDR.CONTROL ctrl?, VAL INT width, height)`

Renders polygons as a series of lines (wireframe).

#### Parameters:

`CHAN MOBILE []G3D.POLY` | `data` | Polygons input.
`G3D.RENDER.ENGINE?` | `rlink.in` | Raster I/O.
`CHAN G3D.RDR.CONTROL` | `ctrl` | Control channel.
`VAL INT` | `width`, `height` | Display dimensions.

### `graphics3d.occ`:2980Process `render.polyframe.trigger`

`PROC render.polyframe.trigger (CHAN MOBILE []G3D.POLY data?, G3D.RENDER.ENGINE? rlink.in, CHAN G3D.RDR.CONTROL ctrl?, CHAN INT trigger!, VAL INT width, height)`

Renders polygons as a series of lines (wireframe).

#### Parameters:

`CHAN MOBILE []G3D.POLY` | `data` | Polygons input.
`G3D.RENDER.ENGINE?` | `rlink.in` | Raster I/O.
`CHAN G3D.RDR.CONTROL` | `ctrl` | Control channel.
`CHAN INT` | `trigger` | Generator trigger channel.
`VAL INT` | `width`, `height` | Display dimensions.

### `graphics3d.occ`:2994Process `raster.chain.head`

`PROC raster.chain.head (CHAN RASTER in?, G3D.RENDER.ENGINE! head, CHAN G3D.RENDER.ENGINE! new.link?, VAL BOOL fade)`

Head of the raster render chain.

#### Parameters:

`CHAN RASTER` | `in` | Rasters in.
`G3D.RENDER.ENGINE!` | `head` | Head of raster render chain.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel on which new rendering engines are added.
`VAL BOOL` | `fade` | Whether to fade (TRUE) or clear (FALSE) rasters.

### `graphics3d.occ`:3048Process `raster.chain.tail`

`PROC raster.chain.tail (CHAN RASTER out!, G3D.RENDER.ENGINE? tail)`

Tail of the raster render chain.

#### Parameters:

`CHAN RASTER` | `out` | Rasters out.
`G3D.RENDER.ENGINE?` | `tail` | Tail of raster render chain.

### `graphics3d.occ`:3070Process `raster.chain`

`PROC raster.chain (CHAN RASTER in?, out!, CHAN G3D.RENDER.ENGINE! new.link?, VAL BOOL fade)`

Implements raster render chain.

#### Parameters:

`CHAN RASTER` | `in` | Rasters in.
`CHAN RASTER` | `out` | Rasters out.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel on which new rendering engines are added.
`VAL BOOL` | `fade` | Whether to fade (TRUE) or clear (FALSE) rasters.

### `graphics3d.occ`:3093Process `raster.polyidclick`

`PROC raster.polyidclick (CHAN RASTER in?, out!, CHAN RASTER.EVENT ev.in?, ev.out!, CHAN INT ids.out!, VAL INT dclk)`

Connects into the raster chain and event pipeline to extract IDs (0-255) of polygons. Responds to single or double click.

#### Parameters:

`CHAN RASTER` | `in` | Rasters in.
`CHAN RASTER` | `out` | Rasters out.
`CHAN RASTER.EVENT` | `ev.in` | Events in.
`CHAN RASTER.EVENT` | `ev.out` | Events out.
`CHAN INT` | `ids.out` | Polygon IDs out (extracted from high 8 bits of the rendered pixel).
`VAL INT` | `dclk` | Double click time (0 = single click).

### `graphics3d.inc`:41Constant `G3D.MAX.POLY.POINTS`

`VAL INT G3D.MAX.POLY.POINTS`

Maximum number of points in a polygon (see `G3D.POLY`).

### `graphics3d.inc`:44Constant `G3D.MAX.SCAN.HEIGHT`

`VAL INT G3D.MAX.SCAN.HEIGHT`

Maximum height of any particular polygon.

### `graphics3d.inc`:46Group `G3D.RENDER.MODE`

``

polygon rendering modes.

### `graphics3d.inc`:47Constant `G3D.RENDER.MODE.NONE`

`VAL INT G3D.RENDER.MODE.NONE`

Constant shading.

### `graphics3d.inc`:48Constant `G3D.RENDER.MODE.GLENZ`

`VAL INT G3D.RENDER.MODE.GLENZ`

Glenz-effect shading.

### `graphics3d.inc`:49Constant `G3D.RENDER.MODE.NORM`

`VAL INT G3D.RENDER.MODE.NORM`

Normal vector based shading.

### `graphics3d.inc`:51Group `G3D.ROTATE.MODE`

``

point/polygon rotation modes.

### `graphics3d.inc`:52Constant `G3D.ROTATE.MODE.NONE`

`VAL INT G3D.ROTATE.MODE.NONE`

No rotation.

### `graphics3d.inc`:53Constant `G3D.ROTATE.MODE.DEMO`

`VAL INT G3D.ROTATE.MODE.DEMO`

Demo-effect rotations.

### `graphics3d.inc`:54Constant `G3D.ROTATE.MODE.X`

`VAL INT G3D.ROTATE.MODE.X`

Rotate on X axis.

### `graphics3d.inc`:55Constant `G3D.ROTATE.MODE.NX`

`VAL INT G3D.ROTATE.MODE.NX`

Negative rotate on X axis.

### `graphics3d.inc`:56Constant `G3D.ROTATE.MODE.Y`

`VAL INT G3D.ROTATE.MODE.Y`

Rotate on Y axis.

### `graphics3d.inc`:57Constant `G3D.ROTATE.MODE.NY`

`VAL INT G3D.ROTATE.MODE.NY`

Negative rotate on Y axis.

### `graphics3d.inc`:58Constant `G3D.ROTATE.MODE.Z`

`VAL INT G3D.ROTATE.MODE.Z`

Rotate on Z axis.

### `graphics3d.inc`:59Constant `G3D.ROTATE.MODE.NZ`

`VAL INT G3D.ROTATE.MODE.NZ`

Negative rotate on Z axis.

### `graphics3d.inc`:65Record `G3D.POINT3`

`DATA TYPE G3D.POINT3`

Real point in 3D space (REAL32s).

### `graphics3d.inc`:71Record `G3D.POINT2.3`

`DATA TYPE G3D.POINT2.3`

Integer point in 2D space, original Z multiplied up.

### `graphics3d.inc`:77Record `G3D.POINT2`

`DATA TYPE G3D.POINT2`

Integer point in 2D space.

### `graphics3d.inc`:84Record `G3D.POLY`

`DATA TYPE G3D.POLY`

General polygon in 2D space, orignal Z multiplied up.

### `graphics3d.inc`:96Record `G3D.POLY.SCAN`

`DATA TYPE G3D.POLY.SCAN`

Scan-line converted polygon in 2D space.

### `graphics3d.inc`:112Data type `ZBUFFER`

`DATA TYPE ZBUFFER`

Z-buffer is a 2D array of integers, passed around with rasters.

### `graphics3d.inc`:120Protocol `G3D.GEN.CONTROL`

`PROTOCOL G3D.GEN.CONTROL`

Polygon points generator control.

### `graphics3d.inc`:122Tag `reset`

`reset`

Reset generator to default state.

### `graphics3d.inc`:123Tag `add.scale`

`add.scale; [3]REAL32`

Add to the current scale.

### `graphics3d.inc`:124Tag `set.scale`

`set.scale; [3]REAL32`

Absolutely set the scale.

### `graphics3d.inc`:125Tag `add.trans`

`add.trans; [3]REAL32`

Add to the current translation.

### `graphics3d.inc`:126Tag `set.trans`

`set.trans; [3]REAL32`

Absolutely set the translation.

### `graphics3d.inc`:127Tag `relink`

`relink; G3D.GEN.LINK?`

Reconnect I/O channels.

### `graphics3d.inc`:131Protocol `G3D.ROT.CONTROL`

`PROTOCOL G3D.ROT.CONTROL`

Points rotation control.

### `graphics3d.inc`:133Tag `reset`

`reset`

Reset rotation to default state.

### `graphics3d.inc`:134Tag `add.increment`

`add.increment; REAL32`

Add to the increment.

### `graphics3d.inc`:135Tag `set.increment`

`set.increment; REAL32`

Absolutely set the increment.

### `graphics3d.inc`:136Tag `set.angle`

`set.angle; REAL32`

Absolutely set the angle of rotation.

### `graphics3d.inc`:137Tag `set.mode`

`set.mode; INT`

Set the rotation mode (see `G3D.ROTATE.MODE`).

### `graphics3d.inc`:141Protocol `G3D.TRN.CONTROL`

`PROTOCOL G3D.TRN.CONTROL`

Points translation control.

### `graphics3d.inc`:143Tag `reset`

`reset`

Reset translation to default state (0, 0, 0).

### `graphics3d.inc`:144Tag `set.3dshift`

`set.3dshift; [3]REAL32`

Set 3D translation.

### `graphics3d.inc`:148Protocol `G3D.SCL.CONTROL`

`PROTOCOL G3D.SCL.CONTROL`

Points scaler control.

### `graphics3d.inc`:150Tag `reset`

`reset`

Reset scale to default state (1, 1, 1)

### `graphics3d.inc`:151Tag `set.3dscale`

`set.3dscale; [3]REAL32`

Set 3D scaling.

### `graphics3d.inc`:155Protocol `G3D.PRJ.CONTROL`

`PROTOCOL G3D.PRJ.CONTROL`

Polygon points 3D-to-2D projection control.

### `graphics3d.inc`:157Tag `reset`

`reset`

Reset projector to default state.

### `graphics3d.inc`:158Tag `set.scaling`

`set.scaling; [2]REAL32`

Set 2D scaling.

### `graphics3d.inc`:159Tag `set.zdepth`

`set.zdepth; REAL32`

Set Z depth offset (pushes scene away from camera).

### `graphics3d.inc`:160Tag `set.2dshift`

`set.2dshift; [2]INT`

Set 2D translation.

### `graphics3d.inc`:161Tag `set.3dshift`

`set.3dshift; [3]REAL32`

Set 3D translation (applied before projection).

### `graphics3d.inc`:165Protocol `G3D.PGN.CONTROL`

`PROTOCOL G3D.PGN.CONTROL`

Polygon generator control.

### `graphics3d.inc`:167Tag `reset`

`reset`

Reset polygon generator to default state.

### `graphics3d.inc`:168Tag `set.trimap`

`set.trimap; BOOL`

Generate triangular polygons only.

### `graphics3d.inc`:169Tag `set.backfaces`

`set.backfaces; BOOL`

Whether back faces of solid objects should be generated.

### `graphics3d.inc`:170Tag `set.face.colour`

`set.face.colour; INT; INT`

Set individual face colour.

### `graphics3d.inc`:171Tag `set.face.colours`

`set.face.colours; MOBILE []INT`

Set all face colours.

### `graphics3d.inc`:172Tag `set.polyid`

`set.polyid; INT`

Set polygon ID (0-255).

### `graphics3d.inc`:176Protocol `G3D.PSC.CONTROL`

`PROTOCOL G3D.PSC.CONTROL`

Polygon scan-line generator control.

### `graphics3d.inc`:178Tag `reset`

`reset`

Resets scan-line generator to default state.

### `graphics3d.inc`:179Tag `set.zcolour`

`set.zcolour; BOOL`

Whether the pixel colour used is adjusted for Z depth.

### `graphics3d.inc`:183Protocol `G3D.RDR.CONTROL`

`PROTOCOL G3D.RDR.CONTROL`

Polygon render (shader) control.

### `graphics3d.inc`:185Tag `reset`

`reset`

Resets shader to default state.

### `graphics3d.inc`:186Tag `set.mode`

`set.mode; INT`

Set shader mode (see `G3D.RENDER.MODE`).

### `graphics3d.inc`:190Protocol `G3D.ALL.CONTROL`

`PROTOCOL G3D.ALL.CONTROL`

Overall control for graphics pipeline.

### `graphics3d.inc`:192Tag `reset.all`

`reset.all`

Reset all components to default state.

### `graphics3d.inc`:196Protocol `G3D.TMR.CONTROL`

`PROTOCOL G3D.TMR.CONTROL`

Graphics pipeline speed control.

### `graphics3d.inc`:198Tag `reset`

`reset`

Resets the timer control.

### `graphics3d.inc`:199Tag `pause`

`pause`

Pause/unpause the rasters flowing through the network.

### `graphics3d.inc`:200Tag `faster`

`faster`

Go faster.

### `graphics3d.inc`:201Tag `slower`

`slower`

Go slower.

### `graphics3d.inc`:202Tag `set.fps`

`set.fps; INT`

Set frames-per-second absolutely.

### `graphics3d.inc`:220Protocol `G3D.RENDER.ENGINE.LINK`

`PROTOCOL G3D.RENDER.ENGINE.LINK`

Graphics pipeline link protocol.

### `graphics3d.inc`:222Tag `raster`

`raster; RASTER; ZBUFFER`

Raster to render on and forward.

### `graphics3d.inc`:223Tag `set.next`

`set.next; INT; G3D.RENDER.ENGINE!`

Set the next renderer in the pipeline.

### `graphics3d.inc`:230Variable `link?`

`CHAN G3D.RENDER.ENGINE.LINK`

Link channel.

### `graphics3d.inc`:236Group `G3D.SCENE.RO`

``

Scene rotation ordering.

### `graphics3d.inc`:237Constant `G3D.SCENE.RO.NONE`

`VAL INT G3D.SCENE.RO.NONE`

No rotations applied

### `graphics3d.inc`:238Constant `G3D.SCENE.RO.X`

`VAL INT G3D.SCENE.RO.X`

Rotate on X axis only.

### `graphics3d.inc`:239Constant `G3D.SCENE.RO.Y`

`VAL INT G3D.SCENE.RO.Y`

Rotate on Y axis only.

### `graphics3d.inc`:240Constant `G3D.SCENE.RO.Z`

`VAL INT G3D.SCENE.RO.Z`

Rotate on Z axis only.

### `graphics3d.inc`:241Constant `G3D.SCENE.RO.YX`

`VAL INT G3D.SCENE.RO.YX`

Rotate on Y then X.

### `graphics3d.inc`:242Constant `G3D.SCENE.RO.ZX`

`VAL INT G3D.SCENE.RO.ZX`

Rotate on Z then X.

### `graphics3d.inc`:243Constant `G3D.SCENE.RO.XY`

`VAL INT G3D.SCENE.RO.XY`

Rotate on X then Y.

### `graphics3d.inc`:244Constant `G3D.SCENE.RO.ZY`

`VAL INT G3D.SCENE.RO.ZY`

Rotate on Z then Y.

### `graphics3d.inc`:245Constant `G3D.SCENE.RO.XZ`

`VAL INT G3D.SCENE.RO.XZ`

Rotate on X then Z.

### `graphics3d.inc`:246Constant `G3D.SCENE.RO.YZ`

`VAL INT G3D.SCENE.RO.YZ`

Rotate on Y then Z.

### `graphics3d.inc`:247Constant `G3D.SCENE.RO.ZYX`

`VAL INT G3D.SCENE.RO.ZYX`

Rotate on Z then Y then X.

### `graphics3d.inc`:248Constant `G3D.SCENE.RO.YZX`

`VAL INT G3D.SCENE.RO.YZX`

Rotate on Y then Z then X.

### `graphics3d.inc`:249Constant `G3D.SCENE.RO.ZXY`

`VAL INT G3D.SCENE.RO.ZXY`

Rotate on Z then X then Y.

### `graphics3d.inc`:250Constant `G3D.SCENE.RO.XZY`

`VAL INT G3D.SCENE.RO.XZY`

Rotate on X then Z then Y.

### `graphics3d.inc`:251Constant `G3D.SCENE.RO.YXZ`

`VAL INT G3D.SCENE.RO.YXZ`

Rotate on Y then X then Z.

### `graphics3d.inc`:252Constant `G3D.SCENE.RO.XYZ`

`VAL INT G3D.SCENE.RO.XYZ`

Rotate on X then Y then Z.

### `graphics3d.inc`:262Protocol `G3D.SCENE.TRANS.LINK`

`PROTOCOL G3D.SCENE.TRANS.LINK`

Scene rotate pipeline link protocol.

### `graphics3d.inc`:264Tag `reset`

`reset`

Reset to default settings.

### `graphics3d.inc`:265Tag `set.pre.3dshift`

`set.pre.3dshift; [3]REAL32`

Set 3D shift (before rotation, determines centre of scene).

### `graphics3d.inc`:266Tag `set.rot.angles`

`set.rot.angles; [3]REAL32`

Set rotations in X, Y and Z planes.

### `graphics3d.inc`:267Tag `set.rot.order`

`set.rot.order; INT`

Set rotation order (see `G3D.SCENE.RO`).

### `graphics3d.inc`:268Tag `set.rot.diffs`

`set.rot.diffs; [3]REAL32`

Set differences for continuous rotation.

### `graphics3d.inc`:269Tag `set.post.3dshift`

`set.post.3dshift; [3]REAL32`

Set 3D shift (after rotation, determines camera position).

### `graphics3d.inc`:270Tag `set.xyscale`

`set.xyscale; [2]REAL32`

Set X-Y scaling (lens angle).

### `graphics3d.inc`:272Tag `set.next`

`set.next; INT; G3D.SCENE.TRANS!`

Set the next scene transformer in a pipeline.

### `graphics3d.inc`:279Variable `link?`

`CHAN G3D.SCENE.TRANS.LINK`

Link channel.

### `g3dutil.occ`:32Process `g3d.point3.delta`

`PROC g3d.point3.delta (CHAN MOBILE []G3D.POINT3 in?, out.0!, out.1!)`

Delta for mobile arrays of the `G3D.POINT3` type.

#### Parameters:

`CHAN MOBILE []G3D.POINT3` | `in` | Points in.
`CHAN MOBILE []G3D.POINT3` | `out.0` | Points out.
`CHAN MOBILE []G3D.POINT3` | `out.1` | Points out.

### `g3dutil.occ`:49Process `g3d.point2.3.delta`

`PROC g3d.point2.3.delta (CHAN MOBILE []G3D.POINT2.3 in?, out.0!, out.1!)`

Delta for mobile arrays of the `G3D.POINT2.3` type.

#### Parameters:

`CHAN MOBILE []G3D.POINT2.3` | `in` | Points in.
`CHAN MOBILE []G3D.POINT2.3` | `out.0` | Points out.
`CHAN MOBILE []G3D.POINT2.3` | `out.1` | Points out.

### `g3dutil.occ`:65Process `g3d.point2.delta`

`PROC g3d.point2.delta (CHAN MOBILE []G3D.POINT2 in?, out.0!, out.1!)`

Delta for mobile arrays of the `G3D.POINT2` type.

#### Parameters:

`CHAN MOBILE []G3D.POINT2` | `in` | Points in.
`CHAN MOBILE []G3D.POINT2` | `out.0` | Points out.
`CHAN MOBILE []G3D.POINT2` | `out.1` | Points out.

### `g3dutil.occ`:81Process `g3d.poly.delta`

`PROC g3d.poly.delta (CHAN MOBILE []G3D.POLY in?, out.0!, out.1!)`

Delta for mobile arrays of the `G3D.POLY` type.

#### Parameters:

`CHAN MOBILE []G3D.POLY` | `in` | Polygons in.
`CHAN MOBILE []G3D.POLY` | `out.0` | Polygons out.
`CHAN MOBILE []G3D.POLY` | `out.1` | Polygons out.

### `g3dutil.occ`:97Process `g3d.poly.scan.delta`

`PROC g3d.poly.scan.delta (CHAN MOBILE []G3D.POLY.SCAN in?, out.0!, out.1!)`

Delta for mobile arrays of the `G3D.POLY.SCAN` type.

#### Parameters:

`CHAN MOBILE []G3D.POLY.SCAN` | `in` | Polygon scans in.
`CHAN MOBILE []G3D.POLY.SCAN` | `out.0` | Polygon scans out.
`CHAN MOBILE []G3D.POLY.SCAN` | `out.1` | Polygon scans out.

### `g3dutil.occ`:114Process `g3d.gen.control.delta`

`PROC g3d.gen.control.delta (CHAN G3D.GEN.CONTROL in?, out.0!, out.1!)`

Delta for `G3D.GEN.CONTROL` protocol.

#### Parameters:

`CHAN G3D.GEN.CONTROL` | `in` | Commands in.
`CHAN G3D.GEN.CONTROL` | `out.0` | Commands out.
`CHAN G3D.GEN.CONTROL` | `out.1` | Commands out.

### `g3dutil.occ`:150Process `g3d.rot.control.delta`

`PROC g3d.rot.control.delta (CHAN G3D.ROT.CONTROL in?, out.0!, out.1!)`

Delta for `G3D.ROT.CONTROL` protocol.

#### Parameters:

`CHAN G3D.ROT.CONTROL` | `in` | Commands in.
`CHAN G3D.ROT.CONTROL` | `out.0` | Commands out.
`CHAN G3D.ROT.CONTROL` | `out.1` | Commands out.

### `g3dutil.occ`:186Process `g3d.prj.control.delta`

`PROC g3d.prj.control.delta (CHAN G3D.PRJ.CONTROL in?, out.0!, out.1!)`

Delta for `G3D.PRJ.CONTROL` protocol.

#### Parameters:

`CHAN G3D.PRJ.CONTROL` | `in` | Commands in.
`CHAN G3D.PRJ.CONTROL` | `out.0` | Commands out.
`CHAN G3D.PRJ.CONTROL` | `out.1` | Commands out.

### `g3dutil.occ`:222Process `g3d.pgn.control.delta`

`PROC g3d.pgn.control.delta (CHAN G3D.PGN.CONTROL in?, out.0!, out.1!)`

Delta for `G3D.PGN.CONTROL` protocol.

#### Parameters:

`CHAN G3D.PGN.CONTROL` | `in` | Commands in.
`CHAN G3D.PGN.CONTROL` | `out.0` | Commands out.
`CHAN G3D.PGN.CONTROL` | `out.1` | Commands out.

### `g3dutil.occ`:258Process `g3d.psc.control.delta`

`PROC g3d.psc.control.delta (CHAN G3D.PSC.CONTROL in?, out.0!, out.1!)`

Delta for `G3D.PSC.CONTROL` protocol.

#### Parameters:

`CHAN G3D.PSC.CONTROL` | `in` | Commands in.
`CHAN G3D.PSC.CONTROL` | `out.0` | Commands out.
`CHAN G3D.PSC.CONTROL` | `out.1` | Commands out.

### `g3dutil.occ`:274Process `g3d.rdr.control.delta`

`PROC g3d.rdr.control.delta (CHAN G3D.RDR.CONTROL in?, out.0!, out.1!)`

Delta for `G3D.RDR.CONTROL` protocol.

#### Parameters:

`CHAN G3D.RDR.CONTROL` | `in` | Commands in.
`CHAN G3D.RDR.CONTROL` | `out.0` | Commands out.
`CHAN G3D.RDR.CONTROL` | `out.1` | Commands out.

### `g3dnets.occ`:35Process `rotate.orchestra1`

`PROC rotate.orchestra1 (CHAN G3D.ROT.CONTROL rot.out!)`

Orchestrates components.

#### Parameters:

`CHAN G3D.ROT.CONTROL` | `rot.out` | Rotation control out.

### `g3dnets.occ`:71Process `planar.path`

`PROC planar.path (CHAN G3D.PRJ.CONTROL out!, VAL REAL32 xrad, zrad, pangle, iangle, VAL INT islow, VAL [3]REAL32 pos)`

Moves a 3D object around a plane following an elliptical path.

#### Parameters:

`CHAN G3D.PRJ.CONTROL` | `out` | Projection control.
`VAL REAL32` | `xrad` | X-radius of path.
`VAL REAL32` | `zrad` | Z-radius of path.
`VAL REAL32` | `pangle` | Tilt in XY plane of the path.
`VAL REAL32` | `iangle` | Tilt in XZ plane of the path.
`VAL INT` | `islow` | Slow-down setting
`VAL [3]REAL32` | `pos` | Initial position.

### `g3dnets.occ`:101Process `glenz.network`

`PROC glenz.network (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height)`

Implements a basic "Glenz cube".

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.

### `g3dnets.occ`:139Process `glenz.network.spawn`

`PROC glenz.network.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!)`

Dynamically spawns a new 'glenz.network'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.

### `g3dnets.occ`:155Process `normal.network`

`PROC normal.network (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height)`

Implements a basic "Normal cube".

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.

### `g3dnets.occ`:193Process `normal.network.spawn`

`PROC normal.network.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!)`

Dynamically spawns a new 'normal.network'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.

### `g3dnets.occ`:209Process `glenz.network2`

`PROC glenz.network2 (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height)`

Implements a basic "Glenz cube".

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.

### `g3dnets.occ`:252Process `glenz.network2.spawn`

`PROC glenz.network2.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!)`

Dynamically spawns a new 'glenz.network2'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.

### `g3dnets.occ`:268Process `normal.network2`

`PROC normal.network2 (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height)`

Implements a basic "Glenz cube".

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.

### `g3dnets.occ`:309Process `normal.network2.spawn`

`PROC normal.network2.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!)`

Dynamically spawns a new 'normal.network2'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.

### `g3dnets.occ`:325Process `screen.cube`

`PROC screen.cube (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height)`

Implements an on-screen cube showing the image boundary

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.

### `g3dnets.occ`:358Process `screen.cube.spawn`

`PROC screen.cube.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!)`

Dynamically spawns a new 'screen.cube'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.

### `g3dnets.occ`:375Process `butterfly.network`

`PROC butterfly.network (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height, VAL BOOL rpix)`

Implements a butterfly that flaps around a particular path.

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.
`VAL BOOL` | `rpix` | Random initial placement.

### `g3dnets.occ`:476Process `butterfly.network.spawn`

`PROC butterfly.network.spawn (VAL INT width, height, VAL BOOL rpix, CHAN G3D.RENDER.ENGINE! new.link!)`

Dynamically spawns a new 'butterfly.network'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`VAL BOOL` | `rpix` | Random initial placement.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.

### `g3dnets.occ`:497Process `glenz.cog.network`

`PROC glenz.cog.network (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height, nteeth, VAL REAL32 i.rad, o.rad, i.ang, o.ang)`

Implements a basic "Glenz cog".

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.
`VAL INT` | `nteeth` | Number of teeth.
`VAL REAL32` | `i.rad` | Inner radius.
`VAL REAL32` | `o.rad` | Outer radius.
`VAL REAL32` | `i.ang` | Inner angle.
`VAL REAL32` | `o.ang` | Outer angle.

### `g3dnets.occ`:541Process `glenz.cog.network.spawn`

`PROC glenz.cog.network.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!, VAL INT nteeth, VAL REAL32 i.rad, o.rad, i.ang, o.ang)`

Dynamically spawns a new 'glenz.cog.network'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.
`VAL INT` | `nteeth` | Number of teeth.
`VAL REAL32` | `i.rad` | Inner radius.
`VAL REAL32` | `o.rad` | Outer radius.
`VAL REAL32` | `i.ang` | Inner angle.
`VAL REAL32` | `o.ang` | Outer angle.

### `g3dnets.occ`:559Process `glenz.flatpoly.network`

`PROC glenz.flatpoly.network (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height, npoints, VAL REAL32 rad)`

Implements a basic regular polygon (glenz style).

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.
`VAL INT` | `npoints` | Number of points.
`VAL REAL32` | `rad` | Radius.

### `g3dnets.occ`:600Process `glenz.flatpoly.network.spawn`

`PROC glenz.flatpoly.network.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!, VAL INT npoints, VAL REAL32 rad)`

Dynamically spawns a new 'glenz.flatpoly.network'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.
`VAL INT` | `npoints` | Number of points
`VAL REAL32` | `rad` | Radius.

### `g3dnets.occ`:618Process `zdepth.flatpoly.network`

`PROC zdepth.flatpoly.network (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height, npoints, VAL REAL32 rad)`

Implements a basic regular polygon (zdepth style).

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.
`VAL INT` | `npoints` | Number of points.
`VAL REAL32` | `rad` | Radius.

### `g3dnets.occ`:660Process `zdepth.flatpoly.network.spawn`

`PROC zdepth.flatpoly.network.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!, VAL INT npoints, VAL REAL32 rad)`

Dynamically spawns a new 'zdepth.flatpoly.network'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.
`VAL INT` | `npoints` | Number of points
`VAL REAL32` | `rad` | Radius.

### `g3dchess.occ`:197Process `chesspoints.generator`

`PROC chesspoints.generator (CHAN INT trigger?, VAL INT npoints, piece, VAL [][2]REAL32 profile, CHAN MOBILE []G3D.POINT3 out!, CHAN G3D.GEN.CONTROL ctrl?)`

Chess piece points generator.

#### Parameters:

`CHAN INT` | `trigger` | Trigger channel.
`VAL INT` | `npoints` | Number of points around the outside.
`VAL INT` | `piece` | Particular piece (defines how the topping is handled, see `G3D.CP`).
`VAL [][2]REAL32` | `profile` | Y/rad pairs for the piece.
`CHAN MOBILE []G3D.POINT3` | `out` | Generated points.
`CHAN G3D.GEN.CONTROL` | `ctrl` | Control channel.

### `g3dchess.occ`:322Process `chessboardpoints.generator`

`PROC chessboardpoints.generator (CHAN INT trigger?, VAL INT dim, VAL REAL32 width, height, CHAN MOBILE []G3D.POINT3 out!, CHAN G3D.GEN.CONTROL ctrl?)`

Chess board points generator.

#### Parameters:

`CHAN INT` | `trigger` | Trigger channel.
`VAL INT` | `dim` | Number of squares along one edge.
`VAL REAL32` | `width` | Width of each square.
`VAL REAL32` | `height` | Height of the board.
`CHAN MOBILE []G3D.POINT3` | `out` | Generated points.
`CHAN G3D.GEN.CONTROL` | `ctrl` | Control channel.

### `g3dchess.occ`:343Process `chessify.points`

`PROC chessify.points (CHAN MOBILE []G3D.POINT2.3 in?, VAL INT npoints, piece, VAL [][2]REAL32 profile, CHAN MOBILE []G3D.POLY out!, CHAN G3D.PGN.CONTROL ctrl?, CHAN BOOL hide?)`

Generates chess-style polygons from points.

#### Parameters:

`CHAN MOBILE []G3D.POINT2.3` | `in` | Points in.
`VAL INT` | `npoints` | Number of points around the base of the object.
`VAL INT` | `piece` | Particular piece (defines how the topping is handled, see `G3D.CP`).
`VAL [][2]REAL32` | `profile` | Profile for the piece.
`CHAN MOBILE []G3D.POLY` | `out` | Polygons out.
`CHAN G3D.PGN.CONTROL` | `ctrl` | Control channel.
`CHAN BOOL` | `hide` | Hide control channel.

### `g3dchess.occ`:739Process `chessboardify.points`

`PROC chessboardify.points (CHAN MOBILE []G3D.POINT2.3 in?, VAL INT dim, CHAN MOBILE []G3D.POLY out!, CHAN G3D.PGN.CONTROL ctrl?)`

Turns chessboard points into polygons.

#### Parameters:

`CHAN MOBILE []G3D.POINT2.3` | `in` | Points in.
`VAL INT` | `dim` | Number of squares along one edge.
`CHAN MOBILE []G3D.POLY` | `out` | Generated points.
`CHAN G3D.PGN.CONTROL` | `ctrl` | Control channel.

### `g3dchess.occ`:764Process `chesspiece.network`

`PROC chesspiece.network (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height, piece, npoints, bdim, VAL REAL32 sqw, bh, G3DC.PIECE.CTL? svr, G3D.SCENE.TRANS? sct)`

Implements a basic chess piece (zdepth style).

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.
`VAL INT` | `piece` | Particular piece (see `G3D.CP`).
`VAL INT` | `npoints` | Number of points around the circumference.
`VAL INT` | `bdim` | Board dimension.
`VAL REAL32` | `sqw` | Board square width.
`VAL REAL32` | `bh` | Board height.
`G3DC.PIECE.CTL?` | `svr` | Piece control channel-end.
`G3D.SCENE.TRANS?` | `sct` | Scene transform control channel-end.

### `g3dchess.occ`:915Process `chesspiece.network.spawn`

`PROC chesspiece.network.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!, VAL INT piece, npoints, bdim, VAL REAL32 sqw, bh, RESULT G3DC.PIECE.CTL! pctl, RESULT G3D.SCENE.TRANS! sti)`

Dynamically spawns a new 'chesspiece.network'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.
`VAL INT` | `piece` | Particular piece (see `G3D.CP`).
`VAL INT` | `npoints` | Number of points around the circumference.
`VAL INT` | `bdim` | Board dimension.
`VAL REAL32` | `sqw` | Board square width.
`VAL REAL32` | `bh` | Board height.
`RESULT G3DC.PIECE.CTL!` | `pctl` | Piece control channel-end (returned).
`RESULT G3D.SCENE.TRANS!` | `sti` | Returned scene transform client channel-end.

### `g3dchess.occ`:941Process `chessboard.network`

`PROC chessboard.network (G3D.RENDER.ENGINE? rlink.in, VAL INT width, height, dim, polyid, VAL REAL32 sqw, bh, G3D.SCENE.TRANS? sct)`

Implements a basic chess board (zdepth style).

#### Parameters:

`G3D.RENDER.ENGINE?` | `rlink.in` | Render link.
`VAL INT` | `width` | Width of raster.
`VAL INT` | `height` | Height of raster.
`VAL INT` | `dim` | Board dimension.
`VAL INT` | `polyid` | Polygon id (0-255 or +256 for incrementing).
`VAL REAL32` | `sqw` | Width of each square.
`VAL REAL32` | `bh` | Board height.
`G3D.SCENE.TRANS?` | `sct` | Scene transform control.

### `g3dchess.occ`:981Process `chessboard.network.spawn`

`PROC chessboard.network.spawn (VAL INT width, height, CHAN G3D.RENDER.ENGINE! new.link!, VAL INT dim, polyid, VAL REAL32 sqw, bh, RESULT G3D.SCENE.TRANS! sti)`

Spawns a new 'chessboard.network'.

#### Parameters:

`VAL INT` | `width` | Raster width.
`VAL INT` | `height` | Raster height.
`CHAN G3D.RENDER.ENGINE!` | `new.link` | Channel to communicate new object link.
`VAL INT` | `dim` | Board dimension.
`VAL INT` | `polyid` | Polygon id (0-255 or +256 for incrementing).
`VAL REAL32` | `sqw` | Size of each square.
`VAL REAL32` | `bh` | Board height.
`RESULT G3D.SCENE.TRANS!` | `sti` | Returned scene-transform client channel-end.