> For the complete documentation index, see [llms.txt](https://docs.sevenpens.com/drawtab/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sevenpens.com/drawtab/core/pressure/pressure-curves/pressure-curve-constrain-output.md).

# Constraining pressure curve output

## Overview

Typically, a pressure curve function takes input logical pressure values in the range of \[0,1] and maps it to values in an output range of \[0,1]. This means that the full output range is used.

Some curves can limit their output range to achieve better control over brush strokes.

## Visual interpretation

The easy way to tell that a pressure curve constrains the output range is to notice that the curve shape does not reach the bottom or the top of the pressure curve graph. Two examples are below.

<figure><img src="https://1457921496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNde0PQIvNcFZNVxuTO0G%2Fuploads%2FQzdxQu29vJ8PsOcVIRQZ%2Fimage.png?alt=media&amp;token=3e87abe2-aa0e-482c-be39-3259e0bd036f" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://1457921496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNde0PQIvNcFZNVxuTO0G%2Fuploads%2FGiwnaQErnmTc1KZ8cBV8%2Fimage.png?alt=media&amp;token=1da9742e-34ca-464d-ae45-bfb569c44acc" alt="" width="375"><figcaption></figcaption></figure>

Even though the shapes look a little different, they both effectively take the input logical pressure values between \[0,1] and map them to an output region close to \[0.3, 0.6].

<figure><img src="https://1457921496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNde0PQIvNcFZNVxuTO0G%2Fuploads%2FjG3DqWaB8hkgLVn4L982%2FSlide_20240724_235922.png?alt=media&amp;token=c51afe06-31c3-4e88-8592-c66210c792b1" alt=""><figcaption></figcaption></figure>

## Impact on brush strokes

Imagine the user's brush setting is 100px and the brush is set to change its size in response to pressure. Then suppose the user draws a stroke that goes from the IAF value to the MAX physical pressure.

The stroke size is computed like this:

```
pressure = apply_curve( pressure )
brush_size = max( 1, 100 * pressure )
```

* With a null pressure curve, the stroke width will go from a size of 1 px to 100 px.
* With the curves shown above, the stroke width will go from 30 px to 60 px. So the width of the stroke does not vary as much.

<figure><img src="https://1457921496-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNde0PQIvNcFZNVxuTO0G%2Fuploads%2FaV1UoxFXRHm3fBNuG4Ru%2Fimage.png?alt=media&amp;token=89c50617-5b39-4307-b34b-67ddb824f2b1" alt=""><figcaption></figcaption></figure>

## Use cases

* Helps give you more consistent brush strokes while still allowing some variability
* By avoiding the lower end of output logical pressure, you can have your strokes start off a little thicker than normal. (Though some apps have other ways of accomplishing this goal.)
