# Equations Filter in Affinity Photo Tutorial

By Andrew Buckle, Updated : 2021

Please check out our youtube channel for 1000s of great graphics related video tutorials / online classes

The equations filter can be found in the filters menu and distort. The Affinity Photo equation filter is a powerful tool to distort and warp images as well as layers etc. ## 1. Where is the equations filter in Affinity Photo

You can find the Affinity Photo equations filter in the filters menu and distort. ## 2. Basic quick equation for equations filter

Goto filter menu and distort (to find the Equations filter editor in Affinity Photo and access the settings and extend modes etc for the filter) and set x = x*5 and set y=y*5 and set extend mode to wrap and click apply. ## 3. Coordination systems and parameters and extend modes

You can currently use Cartesian (x,y) and polar (r,t) as well as three parameters, a and b and c as well as extend modes of zero, full, repeat, wrap, mirror. The initial factors for the equations in Affinity Photo are the a / b / c / x / y / r / t. If you are using Cartesian then use the x and y and if using the polar then use the r and t (sadly there appears to be no conversion tools to work with both coordinates though I stand to be corrected on that). Instead of using 5 or 0.2 etc just use a or b in the equation. You should add whatever factor you need to make the a and b parameter etc work for you and set an equation up with 5 * x * a etc ## 4. Quick scaling.

OK, a quick equation to start with the equations filter editor in Affinity Photo. Perhaps you want your image to fill the screen 16 times in a grid 4 x 4 then you can do this by using the Cartesian and x*4 and y*4 for the x= and y= values, so if you have a document sized 1000 x 1000 then the image is reduced into a size 250 x 250 and then this is placed into the 16 sections of the original image. To get the images all up the right way then use the wrap extended mode. If you use the mirror then you will see the images mirrored. Repeat just places it in the corner. Full reduces it to the corner but with the background color and the zero the image in the corner with transparency background. The equations filter can be applied again and can also be used with layers to create interesting combinations of wrap and mirror etc Say you want to do the same to create 144 copies of the image then use 12 * x and 12 * y. Of course, you don't have to use the same for both of the x and y, you can use 12 * x and 6 * y etc ## 5. Equations' functions

Will add to this list as I find out more and I am using p1, p2 etc for the parameter 1 etc but please note, p1 cannot be actually be used. In some cases, the value is definitely for x and y or a etc

noise (p1)

abs (p1)

sin (p1)

max (p1,p2)

lerp (x,y,a)

sqrt (p1)

oscsin (p1, p2)

etc ## 6. Equations filter examples

The examples generate a variety of different visual effects but the results will depend on the image and the layer. All the ones below are for a full image and no selection etc. You can also replace the values such as 5000 with a or b etc but you should also remember to apply a suitable factor to the a and b to allow it to actually reach 5000. Please feel free to use any of the below in your projects. All are for the wrap extend mode. First column, Polar or Cartesian. Second column is for x and third column is for y. Polar r t*12 Cart x*sin(x) y*cos(y) Cart x+150 y+150 Cart x+5000/x y+5000/y Polar r/sin(r/2) t Polar 4*r/t t Polar r*average(r,t)/20 t Polar r*sin(r/4) t Polar 500*noise3(r/30,5*t) t Cart x-30*sin(200*noise3(x/10,y/10) y Cart x+y y Cart x+y y-x Cart y-x y-x*2 Cart 3*x + 10*min(x,y/2) 3*y + 10*min(x,y/2) Cart x*sin(y)*cos(x)-x y Cart x*sin(y)*cos(x)-x y*sin(x)*cos(y)-y Cart 4*y-x*sin(y)*cos(x)-x 4*x-y*sin(x)*cos(y)-y Polar r*sin(t*r-t)*cos(5*r)-r t*sin(t*r-r)*cos(t)-t Polar r-300*Tan(r/3) t+200*Tan(2*sin(t*2) Cart x+Tan(x*2) y+Tan(y*2) Cart x+x*sin(y-x/2/2) y Cart x*sin(sqrt(x*x+y*y)) y

## 7. Grid ripple equations filter

This uses one of the more obscure functions, oscsin. The oscsin is an oscillator and combines with a sine wave to create all kinds of amazing imagery. The input includes two parameters, x and y or in this case, a relative x and a relative y. I prefer to use the relative option as you can move the layer and re-position the image. The filter, like all the equations, uses the underlying image. Create an image layer, fill it with color, noise, gradients etc and then apply the equations filter. The oscsin input can be varied, it does not need to be just rx or ry, you can divide the rx and ry by a constant as well as a custom input (a, b, or c). The oscsin can be used on its own but to create more interesting combinations, use the oscsin (factor) minus oscsin (another factor) or perhaps instead of minus, use multiply. To create the grid ripple effect, use

X = 1000*a*(oscsin(rx/(b*1000),ry/(b*1000))-oscsin(rx/(c*1000),ry/(c*1000)))
Y = 1000*a*(oscsin(rx/(b*1000),ry/(b*1000))-oscsin(rx/(c*1000),ry/(c*1000))) in the two fields. You will need to use the a, b, and c. Set extend mode to mirror. ## 8. Fade the equations filter

You can use the filter as is. You can also fade the result. Go to the layer menu and fade command. The opacity as well as the blending mode for effect can be added. Use difference, darken, lighten etc and create even more amazing imagery. ## 9. Use equations with shapes

Shapes can be distorted in infinite ways using the equations filter. Select any shape via the shape tools or use the pen tool to create your own vector layer. Go to the filter via the distort category. Copy the formula into the field for the x and y and set the extend method, mirror works well. If you have been using the filter with a normal layer, the a, b, and c settings may need a little tweaking and experimentation. You can also vary the constants in the formula so if 1000 is used, 2000 may be even better with the shape. Once you are happy with the design, press apply. The layer should have transparency and you can add layer effects to the design such as adding an outer shadow or bevel. Other filters can be used. The equations filter and other steps can be recorded in a macro and saved to the library.

## 10. Wobbly effect

You can use a variation of oscsin(a*rx/100,c*50)*ry in your equations filed and create all kinds of unusual sin wave themed transformations of an image and especially helpful to use the extend mode to mirror. You cannot store the effect as a presets sadly but a workaround is the macro panel where the steps can be saved to a macro and then played back at any time. You can import and export macros so the files can be sent to others. You can also change the parameters of the equation when using macros so the a and b and c can be modified (if used)