Io Astrology Software For Mac -
/// Approximate heliocentric longitude (for demo). Replace with Swiss Ephemeris. static func approximatePosition(planet: Planet, date: Date) -> Double let julianDay = date.timeIntervalSince1970 / 86400 + 2440587.5 let centuries = (julianDay - 2451545.0) / 36525.0 switch planet case .sun: return (280.46646 + 36000.76983 * centuries + 0.0003032 * centuries * centuries) .truncatingRemainder(dividingBy: 360) case .moon: return (218.316 + 13.176396 * (julianDay - 2451545)) .truncatingRemainder(dividingBy: 360) default: return Double.random(in: 0...360) // placeholder
func updateMenubarText() let now = Date() let moonPhase = getMoonPhase(date: now) statusItem?.button?.title = "🌙 \(moonPhase) ☉ Io"
static func calculatePositions(for date: Date, birthData: BirthData? = nil) -> [PlanetaryPosition] return Planet.allCases.map planet in let lon = approximatePosition(planet: planet, date: date) return PlanetaryPosition( planet: planet, longitude: lon, latitude: 0, speed: 1.0, isRetrograde: false ) io astrology software for mac
let item = CSSearchableItem(uniqueIdentifier: birthData.id.uuidString, domainIdentifier: "io.astrology.charts", attributeSet: attributeSet) CSSearchableIndex.default().indexSearchableItems([item]) error in if let error = error print("Index error: \(error)")
class Coordinator: NSObject, MTKViewDelegate { var positions: [PlanetaryPosition] init(positions: [PlanetaryPosition]) self.positions = positions func mtkView(_ view: MTKView, drawableSizeWillChange size: CGSize) {} func draw(in view: MTKView) guard let drawable = view.currentDrawable, let device = view.device, let commandBuffer = device.makeCommandQueue()?.makeCommandBuffer() else return // Clear background let renderPassDescriptor = MTLRenderPassDescriptor() renderPassDescriptor.colorAttachments[0].texture = drawable.texture renderPassDescriptor.colorAttachments[0].loadAction = .clear renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColor(red: 0.05, green: 0.05, blue: 0.1, alpha: 1) guard let encoder = commandBuffer.makeRenderCommandEncoder(descriptor: renderPassDescriptor) else return // Draw zodiac circle and aspect lines here // (Simplified: In real implementation, use Metal shaders to draw lines/arcs) encoder.endEncoding() commandBuffer.present(drawable) commandBuffer.commit() } } import SwiftUI struct InputFormView: View @State private var name = "" @State private var birthDate = Date() @State private var latitude = 0.0 @State private var longitude = 0.0 @State private var selectedHouseSystem = HouseSystem.placidus @AppStorage("savedBirthData") private var savedData: Data? /// Approximate heliocentric longitude (for demo)
import Foundation class PlanetCalculator
import CoreSpotlight import MobileCoreServices class SpotlightIndexer static func indexChart(_ birthData: BirthData, positions: [PlanetaryPosition]) let attributeSet = CSSearchableItemAttributeSet(contentType: .text) attributeSet.title = "(birthData.name)'s Natal Chart" attributeSet.contentDescription = positions.map "($0.planet.symbol) in ($0.zodiacSign)" .joined(separator: ", ") = nil) -> [PlanetaryPosition] return Planet
enum HouseSystem: String, CaseIterable case placidus = "Placidus" case koch = "Koch" case wholeSign = "Whole Sign"
import SwiftUI @main struct IoAstrologyApp: App @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
.padding() .frame(width: 200)
var formattedPosition: String let degrees = Int(degreeInSign) let minutes = Int((degreeInSign.truncatingRemainder(dividingBy: 1)) * 60) return "\(zodiacSign) \(degrees)°\(minutes)'"