Golden Hour Calculator
위치와 날짜를 기반으로 황금시간 및 청시간 사진 촬영 창을 찾습니다.
이 도구 소개
골든아워는 일출 직후와 일몰 직전, 태양이 낮게 떠 있어 모든 것을 부드럽고 따뜻한 빛으로 감싸는 짧은 시간대입니다. 반면 블루아워는 일출 전과 일몰 후에 찾아오는 더 깊은 박명으로, 하늘이 균일하고 차분한 푸른 색조로 물듭니다. 두 시간대 모두 한낮의 강한 빛으로는 결코 낼 수 없는 부드럽고 분위기 있는 사진을 만들어 주기에 사진가들이 매우 아끼는 순간입니다. 이 계산기는 천문학 공식을 사용해 어떤 날짜와 장소에서든 이 시간대가 언제 시작하고 끝나는지 정확히 짚어 줍니다.
사용법은 날짜와 위치를 입력하기만 하면 되며, 일출과 일몰 전후의 골든아워와 블루아워 시작·종료 시각을 보여 줍니다. 촬영을 분 단위로 계획하고 빛이 가장 좋을 때 현장에 도착하고 싶은 사진가, 영상 제작자, 여행자를 위해 만들어졌습니다.
이 시각은 계절과 위도에 따라 눈에 띄게 달라지므로, 대략적인 추정치에 의존하지 말고 항상 정확한 날짜로 수치를 확인하세요. 모든 계산은 브라우저 안에서 로컬로 처리되므로 위치 데이터가 기기를 벗어나는 일은 전혀 없습니다.
자주 묻는 질문
코드 구현
import math
from datetime import datetime, timedelta, timezone
def sun_times(lat: float, lon: float, date: datetime) -> dict:
"""Calculate sunrise, sunset and golden hour times."""
# Day of year
N = date.timetuple().tm_yday
# Mean longitude and anomaly
L = (280.460 + 0.9856474 * N) % 360
g = math.radians((357.528 + 0.9856003 * N) % 360)
# Ecliptic longitude
lam = math.radians(L + 1.915 * math.sin(g) + 0.020 * math.sin(2 * g))
# Declination
decl = math.asin(math.sin(math.radians(23.439)) * math.sin(lam))
# Hour angle for sunrise/sunset (sun altitude = -0.833°)
cos_ha = (math.sin(math.radians(-0.833)) - math.sin(math.radians(lat)) * math.sin(decl)) / (math.cos(math.radians(lat)) * math.cos(decl))
if abs(cos_ha) > 1:
return {"error": "Midnight sun or polar night"}
ha = math.degrees(math.acos(cos_ha))
# Equation of time correction (simplified)
B = math.radians(360 / 365 * (N - 81))
eot = 9.87 * math.sin(2 * B) - 7.53 * math.cos(B) - 1.5 * math.sin(B)
# Solar noon in minutes from midnight UTC
solar_noon = 720 - 4 * lon - eot
sunrise_min = solar_noon - 4 * ha
sunset_min = solar_noon + 4 * ha
# Golden hour bounds: sun at 6° above horizon
cos_gh = (math.sin(math.radians(6)) - math.sin(math.radians(lat)) * math.sin(decl)) / (math.cos(math.radians(lat)) * math.cos(decl))
gh_ha = math.degrees(math.acos(max(-1, min(1, cos_gh))))
golden_end_morn = solar_noon - 4 * gh_ha
golden_start_eve = solar_noon + 4 * gh_ha
def mins_to_str(m):
h, mn = divmod(int(m), 60)
return f"{h:02d}:{mn:02d}"
return {
"sunrise": mins_to_str(sunrise_min),
"golden_hour_morning_end": mins_to_str(golden_end_morn),
"solar_noon": mins_to_str(solar_noon),
"golden_hour_evening_start": mins_to_str(golden_start_eve),
"sunset": mins_to_str(sunset_min),
}
# New York City
result = sun_times(40.7128, -74.0060, datetime(2024, 6, 21))
for k, v in result.items():
print(f"{k}: {v}")Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.