---
title: "vesica"
description: "A vesica: the lens where two equal circles overlap."
group: "space"
groupTitle: "Shapes, frames & warps"
categoryId: "shape"
categorySlug: "shape"
categoryTitle: "Shapes"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/shape.ts#L172"
---

# vesica

A vesica: the lens where two equal circles overlap.

```ts
vesica(x: Val, y: Val, radius: Val, spread: Val): Expr
```

Import `shape` from `shaders/std` and use `shape.vesica`.

`radius` is each circle's radius, in uv. `spread` (0–1) is how far apart the circles sit as a fraction of the radius. 0 is a full circle, 1 an infinitely thin lens.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `x` | `Val` |  |
| `y` | `Val` |  |
| `radius` | `Val` |  |
| `spread` | `Val` |  |

## Example

```ts
shape: {distance: ({x, y}, u) => vesica(x, y, u('radius'), u('spread')), …}
```

## See also

- [`ellipse`](/docs/primitives/shape/ellipse) — An ellipse with separate horizontal and vertical radii.
- [`crescent`](/docs/primitives/shape/crescent) — A crescent: a disc with a smaller disc bitten out of it.

## Used by

[Vesica](/docs/components/vesica)