---
title: twirlDistortion()
framework: coreimage
role: symbol
role_heading: Type Method
path: coreimage/cifilter-swift.class/twirldistortion()
---

# twirlDistortion()

Distorts an image by rotating pixels around a center point.

## Declaration

```swift
class func twirlDistortion() -> any CIFilter & CITwirlDistortion
```

## Return Value

Return Value The distorted image.

## Discussion

Discussion This method applies the twirl distortion filter to an image. This effect distorts an image by rotating pixels around the defined center to create a twirling effect. You can specify the number of rotations to control the strength of the effect. The twirl distortion filter uses the following properties: The following code creates a filter that results in the center of the image becoming twirled: func twirlDistort(inputImage: CIImage) -> CIImage {     let filter = CIFilter.twirlDistortion()     filter.inputImage = inputImage     filter.radius = 600     filter.angle = 3.141592653589793     filter.center = CGPoint(x: 1791, y: 1344)     return filter.outputImage! }

## See Also

### Filters

- [bumpDistortion()](coreimage/cifilter-swift.class/bumpdistortion().md)
- [bumpDistortionLinear()](coreimage/cifilter-swift.class/bumpdistortionlinear().md)
- [circleSplashDistortion()](coreimage/cifilter-swift.class/circlesplashdistortion().md)
- [circularWrap()](coreimage/cifilter-swift.class/circularwrap().md)
- [displacementDistortion()](coreimage/cifilter-swift.class/displacementdistortion().md)
- [droste()](coreimage/cifilter-swift.class/droste().md)
- [glassDistortion()](coreimage/cifilter-swift.class/glassdistortion().md)
- [glassLozenge()](coreimage/cifilter-swift.class/glasslozenge().md)
- [holeDistortion()](coreimage/cifilter-swift.class/holedistortion().md)
- [lightTunnel()](coreimage/cifilter-swift.class/lighttunnel().md)
- [ninePartStretched()](coreimage/cifilter-swift.class/ninepartstretched().md)
- [ninePartTiled()](coreimage/cifilter-swift.class/nineparttiled().md)
- [pinchDistortion()](coreimage/cifilter-swift.class/pinchdistortion().md)
- [stretchCrop()](coreimage/cifilter-swift.class/stretchcrop().md)
- [torusLensDistortion()](coreimage/cifilter-swift.class/toruslensdistortion().md)
