The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Previous: Repeated objects, Up: Introduction by example



2.7 Swept objects

Many familiar shapes can be generated by sweeping simpler ones through space and considering the resulting path, surface, or volume. Sketch implements this idea in the sweep command.

  def n_segs 8
  sweep { n_segs, rotate(180 / n_segs, (0,0,0), [0,0,1]) } (1,0,0)
This code sweeps the point (1,0,0) eight times by rotating it 180/8 = 22.5 degrees each time and connecting the resulting points with line segments. The def used here is a scalar definition. References to scalars have no enclosing brackets at all.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.