> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ntop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Spatially-Varying Stretching and Shifting with Ramps

Now, let's return to stretching and shifting by multiplying the axes by factors. However, we will now perform these operations in a spatially varying manner.

Let's look at a diamond TPMS geometry:

<Frame>
  <img src="https://files.learn.ntop.com/lessons/spatially-varying-stretching-and-shifting-using-ramps/321_14_1.jpg" />
</Frame>

## Variably Stretching

Using a **Plane from Normal**, let's ramp from 0mm to 10mm and create a field that goes from 2 to 1. View the resulting field by pressing 'F'.

<Frame>
  <img src="https://files.learn.ntop.com/lessons/spatially-varying-stretching-and-shifting-using-ramps/321_14_2.gif" />
</Frame>

Now, let's multiply the x-axis by this resulting field.

<Frame>
  <img src="https://files.learn.ntop.com/lessons/spatially-varying-stretching-and-shifting-using-ramps/321_14_3.jpg" />
</Frame>

This remap is going to stretch/pull out/extend this geometry in the x-axis.

<Frame>
  <img src="https://files.learn.ntop.com/lessons/spatially-varying-stretching-and-shifting-using-ramps/321_14_4.gif" />
</Frame>

You can also play around with the spreading factors to see how they affect the output.

We can do a similar stretch field in the y-axis, and it will result in a 3D pyramid structure like this:

<Frame>
  <img src="https://files.learn.ntop.com/lessons/spatially-varying-stretching-and-shifting-using-ramps/321_14_5.gif" />
</Frame>

***

## Variably Shifting

Similar to *stretching*using the **Divide**block, you can *shift*using the **Add**or **Subtract**blocks in a spatially varying way. Here, we shift on both the x-axis and y-axis at once.

<Frame>
  <img src="https://files.learn.ntop.com/lessons/spatially-varying-stretching-and-shifting-using-ramps/321_14_6.gif" />
</Frame>
