GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - eastyou/solarscale: 太阳系比例海报:按真实比例绘制天体大小、换算行星距离并生成 A4 海报

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
examples
examples
 
 
solarscale
solarscale
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

solarscale

CI License: MIT Python 3.9+

太阳系比例海报:把太阳和八大行星按真实比例画成圆,同时换算“如果按同一比例摆放,需要多长的纸”。

特性

  • 内置太阳与八大行星的半径、日距与配色
  • 任意比例尺 --km-per-mm,也可用 --fit 让某个天体刚好填满页面宽度
  • SVG 严格按比例绘制,A4 直接打印
  • 距离表同时给出千米、AU、图上尺寸与所需纸张长度
  • 纯标准库,零依赖,跨平台

安装

python -m pip install -e .

用法

solarscale poster --km-per-mm 8000 -o poster.html
solarscale poster --fit Sun --width 180 -o sun.html
solarscale table --km-per-mm 8000
solarscale table --html > table.html
solarscale info Earth
命令 说明
poster 生成 A4 海报 HTML
table 打印比例表,--html 输出网页表格
info 查看单个天体的直径、日距与图上尺寸

数据

天体 直径(千米) 日距(AU)
太阳 1,392,680 0
水星 4,879.4 0.387
金星 12,103.6 0.723
地球 12,742 1.000
火星 6,779 1.524
木星 139,822 5.203
土星 116,464 9.537
天王星 50,724 19.191
海王星 49,244 30.069

按 1 毫米 = 8000 千米计算,太阳能装进 A4 纸,而海王星要放到 560 米开外——这正是海报想传达的尺度感。

示例

examples/solarscale.html 是默认比例(1 毫米 = 8000 千米)的 A4 海报。

测试

python -m unittest discover -s tests -v

协议

MIT © 2026 eastyou

About

太阳系比例海报:按真实比例绘制天体大小、换算行星距离并生成 A4 海报

Topics

astronomyclieducationposterprintablepythonscalesolar-system

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.