<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/triangleKaleidoscope()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)triangleKaleidoscopeFilter"
  },
  "title" : "triangleKaleidoscope()"
}
-->

# triangleKaleidoscope()

Create a triangular kaleidoscope effect and then tiles the result.

```
class func triangleKaleidoscope() -> any CIFilter & CITriangleKaleidoscope
```

## Return Value

The tiled image.

## Discussion

This method applies the triangle kaleidoscope filter to an image. The effect produces a complex tiled pattern from a triangular area input image.

The triangle kaleidoscope tile filter uses the following properties:

- `inputImage`: An image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `decay`: A `float` representing the intensity of the color fade from the center of the triangle as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `point`: A set of coordinates marking the center of the triangular area of the input image as a [`CIVector`](/documentation/CoreImage/CIVector).
- `rotation`: A `float` representing the angle of rotation of the triangle as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `size`: A `float` representing the size in pixels of the triangle as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.

The following code creates a filter that produces a triangle tile of the input image, creating an optical illusion:

```swift
func triangleKaleidoscope(inputImage: CIImage) -> CIImage {
    let triangleKaleidoscopeTile = CIFilter.triangleKaleidoscope()
    triangleKaleidoscopeTile.inputImage = inputImage
    triangleKaleidoscopeTile.point = CGPoint(x: 150, y: 150)
    triangleKaleidoscopeTile.size = 700
    triangleKaleidoscopeTile.rotation = -0.36
    triangleKaleidoscopeTile.decay = 0.85
    return triangleKaleidoscopeTile.outputImage!
}
```

![Two photographs of a bouquet of multiple colorful flowers. The photo on the left is up close with good lighting and focus. In the photo on the right, a triangle kaleidoscope filter is applied, resulting in a triangular portion of the image being angled and repeated throughout the entire image.](images/com.apple.coreimage/media-3599889@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)