Alex Does Things Poorly

Alex does a variety of things poorly - swift, data science, datavis, ML, drawing, AR, unity, etc, etc.

25 August 2021

Meishi with MapKit

by alex

Another day of 100 Days of SwiftUI done. We had to integrate MapKit into the visiting card app that I named Meishi yesterday. I think the only tricky bit was handling optional locations in Core Data. 0, 0 is a legal location in the world, so the default value for a double in Core Data of zero won’t work. Instead, I set a custom default value of -180 for latitude and longitude in the model, which is what’s in the latitude & longitude values in kCLLocationCoordinate2DInvalid so it’s easy to check against at runtime.

Today’s image is a riff on the Dumb Agents sketch in the Generative Design book. I changed the color & density to feel like a blood clot, which is a thought that’s always in the back of my mind.

Clot, dumb agents

tags: swift - swiftui - generative-art