1
+ <!DOCTYPE html>
2
+
3
+ < head >
4
+ <!--uniform circular motion demo! ()cleoold-->
5
+
6
+ < title > 匀速圆周运动demo by cos</ title >
7
+ < meta name ="description " content ="匀速圆周运动demo ">
8
+ < meta name ="keywords " content ="匀速圆周运动 椭圆运动 demo 物理 " />
9
+ < meta charset ="utf-8 ">
10
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
11
+ < meta name ="apple-mobile-web-app-status-bar-style " content ="black ">
12
+ < meta name ="theme-color " content ="#3d3d3d ">
13
+ < meta name ="renderer " content ="webkit ">
14
+ < meta content ="telephone=no " name ="format-detection ">
15
+ < link rel ="stylesheet " href ="./css/min.css " type ="text/css " />
16
+ < link rel ="icon " href ="./ahp.png " sizes ="32x32 ">
17
+ </ head >
18
+
19
+ < script type ="text/javascript ">
20
+ if ( /*@cc_on !@*/ false || ! ! document . documentMode ) document . write ( 'Internet Explorer 可能不兼容此程序. 建议您更换浏览器来浏览.' ) ;
21
+ </ script >
22
+
23
+ < body >
24
+ < header >
25
+ < h1 > 圆周运动 by cos</ h1 >
26
+ </ header >
27
+ < a href ="./index.html " class ="switch-lang "> English</ a >
28
+ < article class ="grand-container ">
29
+ < div class ="shared-info-container ">
30
+ < span > 容器尺寸 </ span > < input type ="text " class ="container-width " autocomplete ="off " readonly />
31
+ </ div >
32
+ < div id ="info-container-1 " class ="info-container ">
33
+ < div class ="obj-titles ">
34
+ < div class ="switch-obj-prev switch-obj "> <<< </ div >
35
+ < h3 > 物块一</ h3 >
36
+ < div class ="switch-obj-next switch-obj "> >>> </ div >
37
+ </ div >
38
+ < div class ="box-label "> < span > X轴坐标</ span > </ div >
39
+ < input type ="text " class ="box-x " autocomplete ="off " placeholder ="leave this be :-) " readonly />
40
+ < div class ="box-label "> < span > Y轴坐标</ span > </ div >
41
+ < input type ="text " class ="box-y " autocomplete ="off " placeholder ="leave this be :-) " readonly />
42
+ < div class ="box-label "> < span > 物块颜色</ span > </ div >
43
+ < input type ="text " class ="set-color " autocomplete ="off " />
44
+ < div class ="box-label "> < span > 物块直径(px)</ span > </ div >
45
+ < input type ="text " class ="set-size " autocomplete ="off " />
46
+ < div class ="box-label "> < span > 轨道X半轴(px)</ span > </ div >
47
+ < input type ="text " class ="set-semi-X-axis " autocomplete ="off " />
48
+ < div class ="box-label "> < span > Rx Δ(px/sec)</ span > </ div >
49
+ < input type ="text " class ="set-semi-X-axis-change " autocomplete ="off " />
50
+ < div class ="box-label "> < span > 轨道Y半轴(px)</ span > </ div >
51
+ < input type ="text " class ="set-semi-Y-axis " autocomplete ="off " />
52
+ < div class ="box-label "> < span > Ry Δ(px/s)</ span > </ div >
53
+ < input type ="text " class ="set-semi-Y-axis-change " autocomplete ="off " />
54
+ < div class ="box-label "> < span > 轨道周期(s)</ span > </ div >
55
+ < input type ="text " class ="set-period " autocomplete ="off " />
56
+ < div class ="box-label "> < span > T Δ(s/s)</ span > </ div >
57
+ < input type ="text " class ="set-period-change " autocomplete ="off " />
58
+ < div class ="box-label "> < span > 轨道偏移角(deg)</ span > </ div >
59
+ < input type ="text " class ="set-angle " autocomplete ="off " />
60
+ < div class ="box-label "> < span > α Δ(deg/s)</ span > </ div >
61
+ < input type ="text " class ="set-angle-change " autocomplete ="off " />
62
+
63
+ < div class ="buttons ">
64
+ < input type ="button " class ="set-attr-go " value ="Go! " />
65
+ < input type ="button " class ="set-attr-reset " value ="重置 " />
66
+ </ div >
67
+ </ div >
68
+ < div id ="container ">
69
+ < div id ="moving-obj-trajectory-1 " class ="moving-obj-trajectory "> </ div >
70
+ < div id ="origin "> </ div >
71
+ < div id ="moving-obj-1 " class ="moving-obj "> </ div >
72
+ </ div >
73
+ < div class ="projections ">
74
+ < div id ="moving-obj-prj-1 " class ="moving-obj-prj "> </ div >
75
+ </ div >
76
+ < div class ="obj-manage ">
77
+ < input type ="button " class ="objs-oneclick-go " value ="确定所有 " />
78
+ < input type ="button " class ="objs-oneclick-reset " value ="重置所有 " />
79
+ < br />
80
+ < input type ="button " class ="append-objs " value ="增加 " />
81
+ < input type ="button " class ="delete-objs " value ="移除 " />
82
+ </ div >
83
+ < div class ="description ">
84
+ < p >
85
+ < span class ="bold "> 提示:</ span > 这个 app 展示了一个围绕着原点旋转的球. 首先您要设置球的颜色:可以是 yellow,
86
+ blue, violet 甚至是 rgba(255,255,255,0.5). 然后再在“物块直径”里设置它的尺寸(5 到 30). 周期描述一个球旋转一周所需要的时间,单位是秒.
87
+ X半轴和Y半轴对应着长短半轴,这个设定的最大值由您的窗口大小决定. 注意当两个值相同的时候,物块会做匀速圆周运动. < span class ="bold "> 不过不要担心
88
+ </ span > ,这些值都已经自动填好了,所以您可以直接点击“确定”.
89
+ < br /> < span class ="bold "> 提示2:</ span > 负的周期值可以产生一个逆时针旋转.
90
+ < br /> < span class ="bold "> 提示3:</ span > 您可以通过拖动小球来改变它的初始位置!
91
+ </ p >
92
+ < p >
93
+ 您可以通过差值来在每秒钟线性地改变周期/半轴长/旋转角. 比如设置X半轴差为 10 可以让小球的X半轴每秒增加 10px(直到它撞到边界)可以让小球看起来越来越扁. 您可以尝试其他区域来看看会发生什么.
94
+ 当然,此时小球就不再做匀速运动了.
95
+ </ p >
96
+ < p >
97
+ < span class ="bold "> 小球的轨迹</ span > 用一个以 t(时间)为参数的参数方程来描述:
98
+ < span class ="equation "> x(t) = Rx(t)⋅cos(𝜔(t)⋅t-𝜑) = Rx(t)⋅cos(2π/T(t)⋅t-𝜑)</ span >
99
+ < span class ="equation "> y(t) = Ry(t)⋅sin(𝜔(t)⋅t-𝜑) = Ry(t)⋅sin(2π/T(t)⋅t-𝜑)</ span >
100
+ 加上小球所在容器的修正. 其中 Rx 或 Ry 为X半轴或Y半轴且 Rx(t) = Rx₀+t⋅ΔRx, Ry(t) = Ry₀+t⋅ΔRy, T 为周期且 T(t) = T₀+t⋅ΔT, 𝜑 是初相.
101
+ </ p >
102
+ < p >
103
+ 使用旋转矩阵作用到它可以旋转小球的轨迹,其中 α(t) = α₀+Δα 为偏移角:
104
+ < span class ="equation "> rotated[x, y](t) = [x(t)⋅cosα-y(t)⋅sinα, x(t)⋅sinα+y(t)⋅cosα]</ span >
105
+ </ p >
106
+ 您可以生成多个这样的小球来实现炫目的效果.
107
+ </ div >
108
+ < div class ="samples-display ">
109
+ < h5 > 点击查看/隐藏样例</ h5 >
110
+ </ div >
111
+ < hr />
112
+ < div class ="shared-info-container-bo ">
113
+ < span > 刷新率:</ span > < span > 25</ span >
114
+ < input type ="button " class ="fps-decrease " value ="-减少 " />
115
+ < input type ="button " class ="fps-increase " value ="+增加 " />
116
+ < br /> < br />
117
+ 如果显示卡顿您可以 < input type ="button " class ="cancel-bg-change " value ="暂停背景变化 " />
118
+ </ div >
119
+ </ article >
120
+ < footer >
121
+ < br />
122
+ (c) 2019 cleooldsaty. < a href ="https://github.com/cleoold/uniform_circular_motion " target ="_blank "> Github</ a >
123
+ </ footer >
124
+ </ body >
125
+
126
+ < script type ="text/javascript " src ="./js/min.js "> </ script >
0 commit comments