知识卡片
坐标变换顺序保留圆心
先把单位方向按指针长度L缩放,再翻转Y,最后平移至圆心(cx,cy),端点即(cx+Lsinθ, cy−Lcosθ)。若先加圆心再翻转,圆心本身也被翻到错误位置。教学演算:圆心(150,150)、L=90时,0/15/30/45秒依次为(150,60)/(240,150)/(150,240)/(60,150),未运行实测。
结构图:
flowchart TD
A[时间与指针周期] --> B[弧度角度]
B --> C[单位方向 sinθ cosθ]
C --> D[按长度缩放]
D --> E[翻转Y方向]
E --> F[平移至圆心]
F --> G[SVG端点]
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 数学
原书出处 · 1 处
- 数学 · 查看原书依据
stroke-width:3px;"/>`, p.X, p.Y) } func makeHand(p Point, length float64) Point { p = Point{p.X * length, p.Y * length} p = Point{p.X, -p.Y} return Po
参考来源
- 位置:《通过测试学习 Go 编程》数学,spine020(book-sources;extracted/通过测试学习 Go 编程/_epub-src/OEBPS/Text/19.html)。
- 结论依据:原文makeHand按缩放、翻转、平移实现;四点是公式演算。
- 原始内容:stroke-width:3px;"/>`, p.X, p.Y) } func makeHand(p Point, length float64) Point { p = Point{p.X * length, p.Y * length} p = Point{p.X, -p.Y} return Po