You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于Tonalpohualli(墨西加仪式日历)的数学计算技术问询

Tonalpohualli Date Calculation Guide

Got it, let's break down how to compute dates in the Tonalpohualli (Mexica ritual calendar) clearly—this boils down to working with two independent cyclic sequences: the 13-day trecena numbers and the 20 unique day symbols. Here's a step-by-step breakdown with examples and code to automate the process.

Core Background

The Tonalpohualli is a 260-day calendar formed by the least common multiple of 13 and 20 (since 13 and 20 are coprime). Each date is a pair of:

  • A number from 1 to 13 (repeating every 13 days)
  • One of 20 unique symbols (repeating every 20 days)

Full Symbol Sequence (Matching Your Description)

First, let's formalize the 20-symbol order based on the examples you provided, filling in standard missing entries (adjust these if your symbol set differs):

  • 1: Crocodile
  • 2: Wind
  • 3: House
  • 4: Lizard
  • 5: Serpent
  • 6: Death
  • 7: Deer
  • 8: Rabbit
  • 9: Water
  • 10: Dog
  • 11: Monkey
  • 12: Grass
  • 13: Reed
  • 14: Jaguar
  • 15: Eagle
  • 16: Vulture
  • 17: Ocelot
  • 18: Snake
  • 19: Rain
  • 20: Flower

Step-by-Step Calculation

For any given day number N (starting at 1 for the first day of the cycle):

1. Calculate the Trecena Number

Use modular arithmetic to wrap the day number into the 1-13 range:

number = ((N - 1) % 13) + 1
  • Why subtract 1 first? Modulo 13 gives us a 0-12 range; adding 1 shifts it back to 1-13.
  • Example: Day 14 → ((14-1) %13)+1 = (13%13)+1 = 0+1 = 1 (correct, as it starts a new trecena).

2. Calculate the Day Symbol

Similarly, map the day number to the 20-symbol cycle:

symbol_index = (N - 1) % 20
symbol = tonalpohualli_symbols[symbol_index]
  • Again, subtracting 1 aligns the day number to a 0-based index for the symbol list.
  • Example: Day 19 → (19-1)%20 = 18 → index 18 corresponds to Rain, which matches your "6 - Rain" example (since day 19's number is ((19-1)%13)+1 = 6).

Example Calculations

Let's verify with your provided cases:

  • Day 13: ((13-1)%13)+1 =13 | (13-1)%20=12 → symbol 13 = Reed → 13 - Reed
  • Day 14: ((14-1)%13)+1=1 | (14-1)%20=13 → symbol14=Jaguar → 1 - Jaguar
  • Day 19: ((19-1)%13)+1=6 | (19-1)%20=18 → symbol19=Rain → 6 - Rain
  • Day20: ((20-1)%13)+1=7 | (20-1)%20=19 → symbol20=Flower → 7 - Flower

Automated Calculation Code (Python)

If you need to compute multiple dates quickly, here's a simple script you can adapt:

# Define your 20-symbol sequence (adjust this list if your symbols differ)
tonalpohualli_symbols = [
    "Crocodile", "Wind", "House", "Lizard", "Serpent",
    "Death", "Deer", "Rabbit", "Water", "Dog",
    "Monkey", "Grass", "Reed", "Jaguar", "Eagle",
    "Vulture", "Ocelot", "Snake", "Rain", "Flower"
]

def get_tonalpohualli_date(day_num):
    # Calculate the 1-13 number
    trecena_num = ((day_num - 1) % 13) + 1
    # Get the corresponding symbol
    symbol = tonalpohualli_symbols[(day_num - 1) % 20]
    return f"{trecena_num} - {symbol}"

# Test the function with your examples
print(get_tonalpohualli_date(13))   # Output: 13 - Reed
print(get_tonalpohualli_date(14))   # Output: 1 - Jaguar
print(get_tonalpohualli_date(19))   # Output: 6 - Rain
print(get_tonalpohualli_date(20))   # Output: 7 - Flower
print(get_tonalpohualli_date(260))  # Output: 13 - Flower (last day of full cycle)

Just update the tonalpohualli_symbols list if your specific symbol order varies— the core arithmetic logic stays the same regardless of the symbol set.

内容的提问来源于stack exchange,提问作者Pablo Ivan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 03:42:48