sixfoldReflectedTile()
Produces a tiled image from a source image by applying a six-way reflected symmetry.
Declaration
class func sixfoldReflectedTile() -> any CIFilter & CISixfoldReflectedTileReturn Value
The tiled image.
Discussion
This filter produces a tiled image from a source image by applying a six-way reflected symmetry.
The six-fold reflected tile filter uses the following properties:
inputImageAn image with the type CIImage.
centerA set of coordinates marking the center of the image as a CGPoint.
angleA
floatrepresenting the direction of distortion , in radians as an NSNumber.widthA
floatrepresenting the set width of each tile as an NSNumber.
The following code creates a filter that results in a six-fold pattern repeated and angled for distortion:
func sixFoldReflected(inputImage: CIImage) -> CIImage {
let sixFoldReflectedTile = CIFilter.sixfoldReflectedTile()
sixFoldReflectedTile.inputImage = inputImage
sixFoldReflectedTile.center = CGPoint(x: 150, y: 150)
sixFoldReflectedTile.angle = 0
sixFoldReflectedTile.width = 100
return sixFoldReflectedTile.outputImage!
}[Image]