Skip to content

Instantly share code, notes, and snippets.

View raphaeltraviss's full-sized avatar

Raphael Traviss raphaeltraviss

View GitHub Profile
@raphaeltraviss
raphaeltraviss / Hexagon Ripple.swift
Created November 20, 2017 16:38 — forked from d-ronnqvist/Hexagon Ripple.swift
Hexagon Ripple in a Swift Playground (Swift 4)
import AppKit
import QuartzCore
import PlaygroundSupport
// Parameters that define the style
let hexSideLength: CGFloat = 15.0
let hexLineWidth: CGFloat = 3.0
let colors = [NSColor.red, NSColor.cyan, NSColor.green, NSColor.yellow, NSColor.red].map { $0.cgColor }