.php xmlns="http://www.w3.org/1999/.php"> - k-Wave MATLAB Toolbox

# makeCartArc

Create evenly distributed Cartesian points covering an arc.

## Syntax

```arc = makeCartArc(arc_pos, radius, diameter, focus_pos, num_points, plot_arc)
```

## Description

`makeCartArc` creates a 2 x `num_points` array of the Cartesian coordinates of points evenly distributed over an arc. The midpoint of the arc is set by `arc_pos`. The orientation of the arc is set by `focus_pos`, which corresponds to any point on the axis of the arc (note, this must not be equal to `arc_pos`). It is assumed that the arc angle is equal to or less than pi radians. If the radius is set to inf, a line is generated.

Note, the first and last points do not lie on the end-points of the underlying canonical arc, but are offset by half the angular spacing between the points. The plot that is displayed after calling `makeCartArc([0, 0], 60e-3, 60e-3, [1, 0], 30, true);` is given below.

## Inputs

 `arc_pos` Centre of the rear surface (midpoint) of the arc given as a two element vector `[bx, by]` [m] `radius` Radius of curvature of the arc [m] `diameter` Diameter of the opening of the arc (length of line connecting arc endpoints) [m] `focus_pos` Any point on the beam axis of the arc given as a two element vector `[fx, fy]` [m] `num_points` number of points on the arc

## Optional Inputs

 `plot_arc` Boolean controlling whether the Cartesian points are plotted (default = false)

## Outputs

 `points` 2 x `num_points` array of Cartesian points

`makeArc`, `makeCartDisc`