Next: Polyline sweeps, Previous: Swept objects, Up: Swept objects

#### 2.7.1 Point sweeps

Sweeping a point makes a one-dimensional path, which is a polyline. Since we have swept with a rotation, the result is a circular arc. Here is what it looks like.

This is the first example we have seen of `sketch` arithmetic. The expression `180 / n_segs` causes the eight rotations to add to 180. If you're paying attention, you'll have already noted that there are nine points, producing eight line segments.

You can cause the swept point to generate a single polygon rather than a polyline by using the closure tag `<>` after the number of swept objects. Code and result follow

      def n_segs 8
      sweep { n_segs<>, rotate(180 / n_segs, (0,0,0), [0,0,1]) } (1,0,0)