### Development Setup for circular-natal-horoscope-js Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Details the commands required to set up the development environment for the circular-natal-horoscope-js project. This includes installing node modules and starting a development server. ```bash npm install // or yarn install yarn start:dev ``` -------------------------------- ### Installing circular-natal-horoscope-js via NPM or Yarn Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Provides instructions for installing the circular-natal-horoscope-js package using either npm or yarn package managers. This is the standard method for including the library in your project. ```bash npm i circular-natal-horoscope-js --save // or yarn yarn add circular-natal-horoscope-js ``` -------------------------------- ### Adding New Languages to the Horoscope Generator Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Guides users on how to add support for new languages within the library. It involves copying existing language tokens, adding them to `src/utilities/language.js` under a new ISO language code, and then specifying the language during horoscope generation. ```javascript new Horoscope({ language: "es" }); ``` -------------------------------- ### Get Origin Data with circular-natal-horoscope-js Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Initializes the Origin class to automatically derive local timezone from coordinates and calculate UTC time, accounting for historical daylight savings. This class requires year, month, date, hour, minute, latitude, and longitude as input. It only works for C.E. dates greater than 0. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; ////////// // Origin ////////// // This class automatically derives the local timezone from latitude/longitude coordinates // and calculates UTC time with respect to timezone and historical daylight savings time. // Only works for C.E. date (> 0). ///////// // * int year: value >= 0 C.E. // * int month: (0 = january ...11 = december) // * int date: (1...31) // * int hours = local time - hours value (0...23) // * int minute = local time - minute value (0...59) // * float latitude = latitude in decimal format (-90.00...90.00) // * float longitude = longitude in decimal format (-180.00...180.00) // December 1st, 2020 - 430pm const origin = new Origin({ year: 2020, month: 11, // 0 = January, 11 = December! date: 1, hour: 16, minute: 30, latitude: 40.0, longitude: -70.0, }); ``` -------------------------------- ### Filter Aspect Points for Specific Calculations Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt This example shows how to control which celestial bodies, points, and angles are included in aspect calculations using `aspectPoints` and `aspectWithPoints`. It demonstrates calculating aspects only between the Sun, Moon, and Venus, and then calculating only planetary aspects by excluding angles and other points. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; // Calculate only Sun aspects to Moon and Venus const sunMoonVenusAspects = new Horoscope({ origin: new Origin({ year: 2005, month: 5, date: 21, hour: 9, minute: 0, latitude: 40.4168, longitude: -3.7038 // Madrid }), houseSystem: "placidus", zodiac: "tropical", aspectPoints: ["sun"], aspectWithPoints: ["moon", "venus"], aspectTypes: ["major"], language: "en" }); console.log("Sun to Moon/Venus aspects:"); sunMoonVenusAspects.Aspects.all.forEach(aspect => { console.log(` ${aspect.point1Label} ${aspect.label} ${aspect.point2Label}`); }); // Calculate aspects between planets only (no angles or points) const planetaryAspects = new Horoscope({ origin: new Origin({ year: 2005, month: 5, date: 21, hour: 9, minute: 0, latitude: 40.4168, longitude: -3.7038 }), houseSystem: "placidus", zodiac: "tropical", aspectPoints: ["bodies"], aspectWithPoints: ["bodies"], aspectTypes: ["major"], language: "en" }); console.log(`\nPlanetary aspects only: ${planetaryAspects.Aspects.all.length}`); ``` -------------------------------- ### Building and Viewing the Demo HTML Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Instructions for building the demo files and viewing the interactive demo of the circular-natal-horoscope-js library in a browser. This helps visualize the library's capabilities. ```bash npm run build:demo ``` -------------------------------- ### Building the JavaScript Bundle with Webpack Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Explains how to build the project's JavaScript bundle using webpack. This command is essential for developers who modify the library's code and need to generate a new distributable file. ```bash npm run build // or yarn run build ``` -------------------------------- ### Running Tests for circular-natal-horoscope-js Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Provides the commands to execute the test suite for the circular-natal-horoscope-js project, ensuring the library functions as expected. ```bash npm test // or yarn test ``` -------------------------------- ### Testing a Package from a GitHub Release Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Demonstrates how to test a specific version of the circular-natal-horoscope-js package directly from a GitHub release by adding it as a dependency in another project's `package.json`. ```json "circular-natal-horoscope-js": "git+https://github.com/0xStarcat/CircularNatalHoroscopeJS.git#" ``` -------------------------------- ### Retrieve Static Astrological Labels in JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt Demonstrates how to use static methods of the Horoscope class to fetch labels for house systems, zodiac systems, signs, celestial bodies, and aspects in a specified language. It also shows how to list available languages. ```javascript import { Horoscope } from "circular-natal-horoscope-js"; // Get available house systems console.log("House Systems:"); Horoscope.HouseSystems("en").forEach(system => { console.log(` ${system.value}: ${system.label}`); }); // Get available zodiac systems console.log("\nZodiac Systems:"); Horoscope.ZodiacSystems("en").forEach(system => { console.log(` ${system.value}: ${system.label}`); }); // Get zodiac sign labels console.log("\nZodiac Signs:"); Horoscope.ZodiacLabels("en").forEach(sign => { console.log(` ${sign.key}: ${sign.label}`); }); // Get house labels console.log("\nHouse Labels:"); Horoscope.HouseLabels("en").forEach(house => { console.log(` House ${house.key}: ${house.label}`); }); // Get celestial body/point/angle labels console.log("\nCelestial Labels:"); Horoscope.CelestialLabels("en").forEach(item => { console.log(` ${item.key} (${item.type}): ${item.label}`); }); // Get aspect labels with orb info console.log("\nAspect Labels:"); Horoscope.AspectLabels("en").forEach(aspect => { console.log(` ${aspect.label}: ${aspect.angle}° (orb: ${aspect.defaultOrb}°, ${aspect.levelLabel})`); }); // Get available languages console.log("\nAvailable Languages:"); Horoscope.Languages().forEach(lang => { console.log(` ${lang.key}: ${lang.label}`); }); ``` -------------------------------- ### Interpreting ChartPosition Object in JavaScript Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Demonstrates the structure of the ChartPosition object, which provides orientation data for celestial bodies and house cusps on a natal chart. It includes horizon and ecliptic coordinates in various formats, such as ArcDegrees and DecimalDegrees. ```javascript const mercury = { ... // ChartPosition for a mercury in Libra and conjunct the ascendant. ChartPosition: { Horizon: { // mercury is on the horizon mercury the ascendant (0 deg horizon) ArcDegrees: {degrees: 0, minutes: 0, seconds: 0} ArcDegreesFormatted: "0° 0' 0''" ArcDegreesFormatted30: "0° 0' 0''" DecimalDegrees: 0 }, Ecliptic: { // mercury is also at 180 degrees on the ecliptic, so within Libra sign. ArcDegrees: {degrees: 180, minutes: 38, seconds: 2} ArcDegreesFormatted: "180° 38' 2''" ArcDegreesFormatted30: "0° 38' 2''" DecimalDegrees: 180.634 } } } ``` -------------------------------- ### Configure Horoscope Results with circular-natal-horoscope-js Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Configures the Horoscope class for astrological chart calculations. It requires an Origin instance and allows customization of house system, zodiac type, aspect points, aspect types, custom orbs, and language. The available options for house systems, zodiacs, aspect points, and aspect types are validated within the library. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; ////////// // Horoscope ////////// // This class contains horoscope chart calculations ///////// // * Origin origin: instance of the Origin class // * string houseSystem: one of the following: ['placidus', 'koch', 'campanus', 'whole-sign', 'equal-house', 'regiomontanus', 'topocentric'] - full list validated in self.HouseSystems // * string zodiac: one of the following: ['sidereal', 'tropical'] - full list validated self.ZodiacSystems // * array aspectPoints = an array containing all or none of the strings "bodies", "points", or "angles" to determine which starting points will be used in aspect generation // * array aspectWithPoints = an array containing all or none of the strings "bodies", "points", or "angles" to determine ending points will be used in aspect generation // * array aspectTypes = an array containing all or none of the following: "major", "minor", "conjunction", "opposition", etc to determine which aspects to calculate. // * object customOrbs = an object with specific keys set to override the default orbs and set your own for aspect calculation. // * string language = the language code (en, es, etc) which will return labels and results in a specific language, if configured. // // *NOTE: "bodies" = planets, "points" = lunar nodes / lilith, "angles" = ascendant / midheaven // *NOTE: You can also pass in individual bodies, points, or angles into aspectPoints or aspectWithPoints // * example: { aspectPoints: ["sun"], aspectWithPoints: ["moon"], aspectTypes: ["major", "quincunx"] } // * will only calculate sun to moon major or quincunx aspects if they exist // * All usable keys found in ./src/constant.js under BODIES, POINTS, ANGLES const horoscope = new Horoscope({ origin: new Origin({...}), houseSystem: "whole-sign", zodiac: "tropical", aspectPoints: ['bodies', 'points', 'angles'], aspectWithPoints: ['bodies', 'points', 'angles'], aspectTypes: ["major", "minor"], customOrbs: {}, language: 'en' }); ``` -------------------------------- ### Calculate and Access All Aspects Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt Demonstrates how to initialize the Horoscope class and access all calculated aspects. It shows how to iterate through all aspects, filter them by type (conjunction, trine, square), and by specific celestial points like the Sun. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const horoscope = new Horoscope({ origin: new Origin({ year: 1975, month: 2, date: 10, hour: 22, minute: 30, latitude: 41.9028, longitude: 12.4964 // Rome }), houseSystem: "placidus", zodiac: "tropical", aspectPoints: ["bodies", "points", "angles"], aspectWithPoints: ["bodies", "points", "angles"], aspectTypes: ["major", "minor"], customOrbs: { conjunction: 8, opposition: 8, trine: 8, square: 7, sextile: 6, quincunx: 5 }, language: "en" }); // Access all aspects console.log(`Total aspects found: ${horoscope.Aspects.all.length}`); horoscope.Aspects.all.forEach(aspect => { console.log(`${aspect.point1Label} ${aspect.label} ${aspect.point2Label}`); console.log(` Orb: ${aspect.orb}° (max: ${aspect.orbUsed}°)`); console.log(` Type: ${aspect.aspectLevelLabel}`); }); // Access aspects by type const conjunctions = horoscope.Aspects.types.conjunction || []; const trines = horoscope.Aspects.types.trine || []; const squares = horoscope.Aspects.types.square || []; console.log(`Conjunctions: ${conjunctions.length}`); console.log(`Trines: ${trines.length}`); console.log(`Squares: ${squares.length}`); // Access aspects by point const sunAspects = horoscope.Aspects.points.sun || []; console.log(`Sun aspects: ${sunAspects.length}`); sunAspects.forEach(aspect => { const otherPoint = aspect.point1Key === "sun" ? aspect.point2Label : aspect.point1Label; console.log(` Sun ${aspect.label} ${otherPoint}`); }); ``` -------------------------------- ### Compare Tropical and Sidereal Zodiac Calculations in JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt Illustrates how to create horoscope calculations using both tropical and sidereal zodiac systems. This allows for a direct comparison of celestial body placements and sign interpretations, highlighting the effect of the precession of the equinoxes. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const origin = new Origin({ year: 1992, month: 8, date: 22, hour: 11, minute: 15, latitude: 28.6139, longitude: 77.2090 // New Delhi }); // Tropical zodiac calculation const tropicalChart = new Horoscope({ origin: origin, houseSystem: "whole-sign", zodiac: "tropical", language: "en" }); // Sidereal zodiac calculation const siderealChart = new Horoscope({ origin: origin, houseSystem: "whole-sign", zodiac: "sidereal", language: "en" }); console.log("Comparison - Tropical vs Sidereal:"); console.log(`Sun Sign: ${tropicalChart.SunSign.label} vs ${siderealChart.SunSign.label}`); console.log(`Ascendant: ${tropicalChart.Ascendant.Sign.label} vs ${siderealChart.Ascendant.Sign.label}`); console.log(`Moon: ${tropicalChart.CelestialBodies.moon.Sign.label} vs ${siderealChart.CelestialBodies.moon.Sign.label}`); // The sidereal positions are typically ~24 degrees behind tropical const tropicalSunDeg = tropicalChart.CelestialBodies.sun.ChartPosition.Ecliptic.DecimalDegrees; const siderealSunDeg = siderealChart.CelestialBodies.sun.ChartPosition.Ecliptic.DecimalDegrees; console.log(`Sun Position: ${tropicalSunDeg.toFixed(2)}° tropical vs ${siderealSunDeg.toFixed(2)}° sidereal`); ``` -------------------------------- ### Retrieve Horoscope Results with circular-natal-horoscope-js Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Accesses various astrological results after initializing the Horoscope class. This includes data for critical angles (ascendant, midheaven), aspects (organized by points and types), celestial bodies (planets, asteroids), celestial points (lunar nodes, lilith), house cusps, and zodiac sign information for the sun and zodiac cusps. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const horoscope = new Horoscope({...}) // Info for all critical angles horoscope.Angles = { all: [...], ascendant: {...}, midheaven: {...} } // The ascendant info horoscope.Ascendant = {...} // Aspect results horoscope.Aspects = { all: [...], points: { // organized by point ascendant: [...], // etc sun: [...], // etc moon: [...], // etc }, types: { // organized by type conjunction: [...], // etc opposition: [...] // etc } } // Planet / Asteriod results // sun, moon, mercury, venus, mars, jupiter, saturn, uranus, neptune, pluto, chiron, sirius horoscope.CelestialBodies = { all: [...], sun: {...}, // etc moon: {...} // etc } // lunar results // northnode, southnode, lilith horoscope.CelestialPoints = { all: [...], northnode: {...}, //etc } // house cusps horoscope.Houses = [ ...12 ] // Midheaven info horoscope.Midheaven = { ... } // Info about what zodiac sign the sun is in at a given origin horoscope.SunSign = { ... } // Info about the zodiac cusps at the given date/time/location origin horoscope.ZodiacCusps = [ ...12 ] ``` -------------------------------- ### Extract Natal Chart Data for Visualization (JavaScript) Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt This JavaScript snippet demonstrates how to initialize the Horoscope object with birth data and configuration, then extract and format planet positions, house cusps, and key angles for use with charting libraries. It utilizes the 'circular-natal-horoscope-js' library. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const horoscope = new Horoscope({ origin: new Origin({ year: 1999, month: 11, date: 31, hour: 23, minute: 59, latitude: 40.7128, longitude: -74.0060 }), houseSystem: "placidus", zodiac: "tropical", aspectPoints: ["bodies", "points", "angles"], aspectWithPoints: ["bodies", "points", "angles"], aspectTypes: ["major"], language: "en" }); // Prepare planet positions for chart library const planets = Object.assign( {}, ...horoscope.CelestialBodies.all.map(body => ({ [body.key]: { position: body.ChartPosition.Ecliptic.DecimalDegrees, sign: body.Sign.label, house: body.House.id, retrograde: body.isRetrograde } })) ); // Prepare house cusps const houseCusps = horoscope.Houses.map(house => house.ChartPosition.StartPosition.Ecliptic.DecimalDegrees ); // Key angles const chartData = { ascendant: horoscope.Ascendant.ChartPosition.Ecliptic.DecimalDegrees, midheaven: horoscope.Midheaven.ChartPosition.Ecliptic.DecimalDegrees, descendant: (horoscope.Ascendant.ChartPosition.Ecliptic.DecimalDegrees + 180) % 360, ic: (horoscope.Midheaven.ChartPosition.Ecliptic.DecimalDegrees + 180) % 360, planets: planets, cusps: houseCusps, aspects: horoscope.Aspects.all.map(aspect => ({ point1: aspect.point1Key, point2: aspect.point2Key, type: aspect.aspectKey, orb: aspect.orb })) }; console.log(JSON.stringify(chartData, null, 2)); ``` -------------------------------- ### Interpret ChartPosition Coordinates in JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt Explains how to use the ChartPosition object to obtain coordinates for celestial bodies. It details how to access both horizon (relative to Ascendant) and ecliptic (absolute zodiac) positions, including decimal degrees and formatted arc degrees. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const horoscope = new Horoscope({ origin: new Origin({ year: 2015, month: 3, date: 10, hour: 14, minute: 30, latitude: 51.5074, longitude: -0.1278 }), houseSystem: "placidus", zodiac: "tropical", language: "en" }); // ChartPosition structure for a celestial body const mercury = horoscope.CelestialBodies.mercury; const chartPos = mercury.ChartPosition; console.log("Mercury ChartPosition:"); console.log("\nHorizon (inner circle - relative to Ascendant at 0°):"); console.log(` DecimalDegrees: ${chartPos.Horizon.DecimalDegrees}`); console.log(` ArcDegrees: ${JSON.stringify(chartPos.Horizon.ArcDegrees)}`); console.log(` Formatted: ${chartPos.Horizon.ArcDegreesFormatted}`); console.log(` Formatted30: ${chartPos.Horizon.ArcDegreesFormatted30}`); console.log("\nEcliptic (outer circle - absolute zodiac position):"); console.log(` DecimalDegrees: ${chartPos.Ecliptic.DecimalDegrees}`); console.log(` ArcDegrees: ${JSON.stringify(chartPos.Ecliptic.ArcDegrees)}`); console.log(` Formatted: ${chartPos.Ecliptic.ArcDegreesFormatted}`); console.log(` Formatted30: ${chartPos.Ecliptic.ArcDegreesFormatted30}`); ``` -------------------------------- ### Access Houses (12 House Placements) - JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt Provides a method to access all 12 house placements, including cusp positions and sign data. This requires the 'circular-natal-horoscope-js' library. Outputs house numbers, sign labels, and cusp positions. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const horoscope = new Horoscope({ origin: new Origin({ year: 1988, month: 11, date: 21, hour: 15, minute: 45, latitude: 35.6762, longitude: 139.6503 // Tokyo }), houseSystem: "koch", zodiac: "tropical", language: "en" }); // Iterate through all 12 houses horoscope.Houses.forEach((house, index) => { console.log(`House ${index + 1} (${house.label}):`); console.log(` Sign: ${house.Sign.label}`); console.log(` Start: ${house.ChartPosition.StartPosition.Ecliptic.ArcDegreesFormatted}`); console.log(` Horizon: ${house.ChartPosition.StartPosition.Horizon.DecimalDegrees}°`); }); // Access specific house data const firstHouse = horoscope.Houses[0]; const tenthHouse = horoscope.Houses[9]; console.log(`1st House cusp: ${firstHouse.Sign.label} ${firstHouse.ChartPosition.StartPosition.Ecliptic.ArcDegreesFormatted30}`); console.log(`10th House cusp: ${tenthHouse.Sign.label} ${tenthHouse.ChartPosition.StartPosition.Ecliptic.ArcDegreesFormatted30}`); ``` -------------------------------- ### Set Custom Orb Degrees for Aspects with circular-natal-horoscope-js Source: https://github.com/0xstarcat/circularnatalhoroscopejs/blob/master/README.md Allows setting custom orb degrees for aspect calculations within the Horoscope class. This overrides the default orb values defined in `./src/constants.js`. You can specify orbs for various aspect types like conjunction, opposition, trine, etc. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const customOrbs = { conjunction: 8, opposition: 8, trine: 8, square: 7, sextile: 6, quincunx: 5, quintile: 1, septile: 1, "semi-square": 1, "semi-sextile": 1, }; const horoscope = new Horoscope({ origin: new Origin({...}), houseSystem: "whole-sign", zodiac: "tropical", aspectPoints: ['bodies', 'points', 'angles'], aspectWithPoints: ['bodies', 'points', 'angles'], aspectTypes: ["major", "minor"], customOrbs: customOrbs, language: 'en' }); ``` -------------------------------- ### Access Celestial Points (North Node, South Node, Lilith) - JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt Demonstrates how to access the North Node, South Node, and Lilith (Black Moon) positions, including their sign and house placements. Requires the 'circular-natal-horoscope-js' library. Outputs sign labels, house labels, and ecliptic positions. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const horoscope = new Horoscope({ origin: new Origin({ year: 2000, month: 0, date: 1, hour: 12, minute: 0, latitude: 40.7128, longitude: -74.0060 }), houseSystem: "whole-sign", zodiac: "tropical", language: "en" }); // Access all celestial points const points = horoscope.CelestialPoints; // North Node console.log(`North Node: ${points.northnode.Sign.label}`); console.log(` House: ${points.northnode.House.label}`); console.log(` Position: ${points.northnode.ChartPosition.Ecliptic.ArcDegreesFormatted30}`); // South Node console.log(`South Node: ${points.southnode.Sign.label}`); console.log(` House: ${points.southnode.House.label}`); // Lilith (Black Moon) console.log(`Lilith: ${points.lilith.Sign.label}`); console.log(` House: ${points.lilith.House.label}`); // Iterate over all points points.all.forEach(point => { console.log(`${point.label} in ${point.Sign.label}`); }); ``` -------------------------------- ### Configure Custom Orbs for Aspect Calculation Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt This snippet illustrates how to override default orb values for aspect calculations by providing a `customOrbs` object. This allows for fine-tuning the detection of aspects based on their angular separation, potentially detecting more or fewer aspects depending on the orb values set. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; // Define custom orbs (degrees of allowable deviation) const customOrbs = { conjunction: 10, // Default: 8 opposition: 10, // Default: 8 trine: 8, // Default: 8 square: 8, // Default: 7 sextile: 6, // Default: 6 quincunx: 3, // Default: 5 quintile: 2, // Default: 1 septile: 1, // Default: 1 "semi-square": 2, // Default: 1 "semi-sextile": 2 // Default: 1 }; const horoscope = new Horoscope({ origin: new Origin({ year: 2020, month: 0, date: 15, hour: 12, minute: 0, latitude: 37.7749, longitude: -122.4194 }), houseSystem: "placidus", zodiac: "tropical", aspectPoints: ["bodies"], aspectWithPoints: ["bodies"], aspectTypes: ["major", "minor"], customOrbs: customOrbs, language: "en" }); // Wider orbs will detect more aspects console.log(`Aspects with custom orbs: ${horoscope.Aspects.all.length}`); ``` -------------------------------- ### Access Angles (Ascendant, Midheaven) - JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt Shows how to retrieve the Ascendant (Rising Sign) and Midheaven (MC) positions. This functionality relies on the 'circular-natal-horoscope-js' library. Outputs sign labels, ecliptic degrees, and formatted positions. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const horoscope = new Horoscope({ origin: new Origin({ year: 1995, month: 7, date: 15, hour: 6, minute: 30, latitude: 48.8566, longitude: 2.3522 // Paris }), houseSystem: "placidus", zodiac: "tropical", language: "en" }); // Ascendant (Rising Sign) const ascendant = horoscope.Ascendant; console.log(`Ascendant: ${ascendant.Sign.label}`); console.log(` Ecliptic: ${ascendant.ChartPosition.Ecliptic.DecimalDegrees}°`); console.log(` Formatted: ${ascendant.ChartPosition.Ecliptic.ArcDegreesFormatted30}`); // Midheaven (MC) const midheaven = horoscope.Midheaven; console.log(`Midheaven: ${midheaven.Sign.label}`); console.log(` Ecliptic: ${midheaven.ChartPosition.Ecliptic.DecimalDegrees}°`); console.log(` Formatted: ${midheaven.ChartPosition.Ecliptic.ArcDegreesFormatted30}`); // Access both angles through the Angles property const angles = horoscope.Angles; console.log(`Angles count: ${angles.all.length}`); // 2 angles.all.forEach(angle => { console.log(`${angle.label}: ${angle.Sign.label}`); }); ``` -------------------------------- ### Create Birth Data with Origin Class in JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt The `Origin` class in circular-natal-horoscope-js represents birth data (date, time, location). It automatically determines the local timezone and calculates UTC time, accounting for historical daylight savings. This class is essential for initializing the `Horoscope` class. ```javascript import { Origin } from "circular-natal-horoscope-js"; // Create an origin for December 1st, 2020 at 4:30 PM // Location: 40°N latitude, 70°W longitude const origin = new Origin({ year: 2020, month: 11, // 0 = January, 11 = December date: 1, hour: 16, // 24-hour format (0-23) minute: 30, latitude: 40.0, // Decimal format (-90 to 90) longitude: -70.0 // Decimal format (-180 to 180) }); // Accessing computed properties console.log(origin.localTimeFormatted); // "2020-12-01T16:30:00-05:00" console.log(origin.utcTimeFormatted); // "2020-12-01T21:30:00+00:00" console.log(origin.timezone.name); // "America/New_York" console.log(origin.julianDate); // Julian date number console.log(origin.localSiderealTime); // Local sidereal time in degrees ``` -------------------------------- ### Access Zodiac Cusps (Sign Cusp Positions) - JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt Explains how to access the positions of all 12 zodiac sign cusps relative to the chart's horizon. This functionality is part of the 'circular-natal-horoscope-js' library. Outputs sign labels and horizon/ecliptic degrees, suitable for chart visualization. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const horoscope = new Horoscope({ origin: new Origin({ year: 2010, month: 6, date: 4, hour: 8, minute: 15, latitude: 52.5200, longitude: 13.4050 // Berlin }), houseSystem: "whole-sign", zodiac: "tropical", language: "en" }); // Access zodiac cusps for chart rendering horoscope.ZodiacCusps.forEach((cusp, index) => { console.log(`${cusp.Sign.label}:`); console.log(` Horizon Position: ${cusp.ChartPosition.Horizon.DecimalDegrees}°`); console.log(` Ecliptic Position: ${cusp.ChartPosition.Ecliptic.DecimalDegrees}°`); }); // Use for chart visualization const chartData = horoscope.ZodiacCusps.map(cusp => ({ sign: cusp.Sign.label, horizonDegrees: cusp.ChartPosition.Horizon.DecimalDegrees, eclipticDegrees: cusp.ChartPosition.Ecliptic.DecimalDegrees })); console.log(JSON.stringify(chartData, null, 2)); ``` -------------------------------- ### Calculate Horoscope with Horoscope Class in JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt The `Horoscope` class is the primary calculator for astrological charts. It uses an `Origin` instance and configuration options to compute planetary positions, house cusps, and aspects. Supported configurations include house systems, zodiac types, aspect calculations, and language settings. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const origin = new Origin({ year: 1990, month: 5, // June date: 15, hour: 10, minute: 30, latitude: 51.5074, // London longitude: -0.1278 }); const horoscope = new Horoscope({ origin: origin, houseSystem: "placidus", // Options: placidus, koch, whole-sign, equal-house, campanus, regiomontanus, topocentric zodiac: "tropical", // Options: tropical, sidereal aspectPoints: ["bodies", "points", "angles"], // What to calculate aspects from aspectWithPoints: ["bodies", "points", "angles"], // What to calculate aspects to aspectTypes: ["major", "minor"], // major, minor, or specific aspects customOrbs: {}, // Override default orb values language: "en" // Language code for labels }); // Access the complete horoscope data console.log(horoscope.SunSign.label); // "Gemini" console.log(horoscope.Ascendant.Sign.label); // Sign of the Ascendant console.log(horoscope.Midheaven.Sign.label); // Sign of the Midheaven ``` -------------------------------- ### Access Celestial Body Data in JavaScript Source: https://context7.com/0xstarcat/circularnatalhoroscopejs/llms.txt The `CelestialBodies` property of the `Horoscope` class provides detailed information about planets and other celestial points. It includes their zodiac sign, house placement, retrograde status, and precise positions in ecliptic and horizon coordinates. You can access all bodies or specific ones like the Sun or Moon. ```javascript import { Origin, Horoscope } from "circular-natal-horoscope-js"; const horoscope = new Horoscope({ origin: new Origin({ year: 1985, month: 3, date: 20, hour: 14, minute: 0, latitude: 34.0522, longitude: -118.2437 }), houseSystem: "placidus", zodiac: "tropical", language: "en" }); // Access all celestial bodies horoscope.CelestialBodies.all.forEach(body => { console.log(`${body.label}: ${body.Sign.label} (House ${body.House.label})`); console.log(` Position: ${body.ChartPosition.Ecliptic.ArcDegreesFormatted30}`); console.log(` Retrograde: ${body.isRetrograde ? "Yes" : "No"}`); }); // Access specific body directly const sun = horoscope.CelestialBodies.sun; console.log(`Sun in ${sun.Sign.label}`); console.log(`Ecliptic Degrees: ${sun.ChartPosition.Ecliptic.DecimalDegrees}`); console.log(`Horizon Degrees: ${sun.ChartPosition.Horizon.DecimalDegrees}`); const moon = horoscope.CelestialBodies.moon; console.log(`Moon in ${moon.Sign.label}, House ${moon.House.label}`); // Output example: // Sun: Aries (House 10) // Position: 0° 15' 32'' // Retrograde: No // Moon: Leo (House 2) // Position: 12° 45' 18'' // Retrograde: No ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.