Io Astrology Software For Mac | EASY - Roundup |

static let example = BirthData( name: "Example", date: Date(), latitude: 40.7128, longitude: -74.0060, timezone: .current ) enum Planet: String, CaseIterable case sun, moon, mercury, venus, mars, jupiter, saturn, uranus, neptune, pluto case chiron, northNode, trueLilith var symbol: String switch self case .sun: return "☉" case .moon: return "☽" case .mercury: return "☿" case .venus: return "♀" case .mars: return "♂" case .jupiter: return "♃" case .saturn: return "♄" case .uranus: return "♅" case .neptune: return "♆" case .pluto: return "♇" case .chiron: return "⚷" case .northNode: return "☊" case .trueLilith: return "⚸"

import SwiftUI @main struct IoAstrologyApp: App @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

var body: some View Form Section("Personal Data") TextField("Name", text: $name) DatePicker("Birth Date", selection: $birthDate, displayedComponents: [.date, .hourAndMinute]) Section("Location") HStack Text("Latitude") TextField("Latitude", value: $latitude, format: .number) HStack Text("Longitude") TextField("Longitude", value: $longitude, format: .number) Section("House System") Picker("System", selection: $selectedHouseSystem) ForEach(HouseSystem.allCases, id: \.self) system in Text(system.rawValue).tag(system) .pickerStyle(.radioGroup) Button("Generate Chart") let birth = BirthData(name: name, date: birthDate, latitude: latitude, longitude: longitude, timezone: .current) saveBirthData(birth) .buttonStyle(.borderedProminent) .padding() .frame(width: 400)

class AppDelegate: NSObject, NSApplicationDelegate var statusItem: NSStatusItem? var popover: NSPopover? io astrology software for mac

var zodiacSign: String let signs = ["Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces"] let index = Int((longitude / 30).rounded(.down)) % 12 return signs[index]

func makeNSView(context: Context) -> MTKView let mtkView = MTKView() mtkView.device = MTLCreateSystemDefaultDevice() mtkView.clearColor = MTLClearColor(red: 0.05, green: 0.05, blue: 0.1, alpha: 1) mtkView.delegate = context.coordinator return mtkView

var formattedPosition: String let degrees = Int(degreeInSign) let minutes = Int((degreeInSign.truncatingRemainder(dividingBy: 1)) * 60) return "\(zodiacSign) \(degrees)°\(minutes)'" static let example = BirthData( name: "Example", date:

/// 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

import SwiftUI import MetalKit struct ChartWheelView: NSViewRepresentable { let positions: [PlanetaryPosition]

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)") Replace with Swiss Ephemeris

var body: some Scene WindowGroup ContentView() .windowStyle(.titleBar) .commands CommandMenu("Chart") Button("Recalculate Now") NotificationCenter.default.post(name: .init("recalculate"), object: nil) .keyboardShortcut("R")

var name: String rawValue.capitalized import Foundation struct PlanetaryPosition: Identifiable let id = UUID() let planet: Planet let longitude: Double // 0-360° let latitude: Double let speed: Double // degrees per day let isRetrograde: Bool

func updateNSView(_ nsView: MTKView, context: Context) context.coordinator.positions = positions