抛硬币

自动抛50次

抛硬币

复位

O

投掷次数

正面向上的频率

O1: (-0.73, 0.7, 0.02)
A1: (-0.51, 0.22, 0.02)
B1: (-0.2, 0.7, 0.02)
d1 = CircleArc(O1, A1, B1, xOyPlane)
O2: (-0.58, 0.55, 0.02)
A2: (-0.39, 0.05, 0.02)
B2: (-0.2, 0.18, 0.02)
d2 = CircleArc(O2, A2, B2, xOyPlane)
q1 = Polygon({(-0.2, -0.7, 0.02), (0.2, -0.7, 0.02), (0.2, 0.7, 0.02), (-0.2, 0.7, 0.02)})
c = Circle((0, 0, 0.01), 1, zAxis)
q2 = Polygon(Flatten[{Sequence[Point[d1, k], k, 0, 1, 0.01], Sequence[Point[d2, k], k, 1, 0, -0.01]}])
a = CurveCartesian(((0.8 * sin((4 * t))) * cos(t)), ((0.8 * sin((4 * t))) * sin(t)), t, 0, (2 * π))
f: z = -0.2
b = RandomElement(Remove[Sequence[k, k, (-(360°)), 360°, 180°], {0°}])
v = 13
k = 0 (slider from 0 to 1, step 0.01)
v' = 13 (slider from (0.8 * v) to v, step 0.01)
k' = 1 (slider from 0 to 1, step 0.01)
h = 10 (slider from 0 to 10, step 0.01)
h' = If(h < 5, h, abs(h - 10))
u = Vector((0, 0, 0), (0, 0, h'))
c' = Translate(Rotate[c, ((sgn(b) * 720°) * k') + (b * k), yAxis], u)
l1: {a, q1, q2}
l1' = Translate(Rotate[l1, ((sgn(b) * 720°) * k') + (b * k), yAxis], u)
n = 0
m = 1 (slider from 1 to 50, step 1)
text0 = If(Mod[b, 360°] ≟ 0, "正面", "反面")
l2: {}
text1 = LaTeX("第" + n + "次:\textcolor{red}{" + (Element[l2, n]) + "}向上")
s = Div(n, 50)
N1 = If(0 ≤ s < 1, n, 50)
N2 = If(1 ≤ s < 2, n, (50 * 2))
N3 = If(2 ≤ s < 3, n, (50 * 3))
N4 = If(3 ≤ s < 4, n, (50 * 4))
N5 = If(4 ≤ s < 5, n, (50 * 5))
N6 = If(5 ≤ s < 6, n, (50 * 6))
N7 = If(6 ≤ s < 7, n, (50 * 7))
N8 = If(7 ≤ s < 8, n, (50 * 8))
N9 = If(8 ≤ s < 9, n, (50 * 9))
N10 = If(9 ≤ s < 10, n, (50 * 10))
T1 = CountIf(x ≟ "正面", Take[l2, 1, N1])
T2 = CountIf(x ≟ "正面", Take[l2, 1, N2])
T3 = CountIf(x ≟ "正面", Take[l2, 1, N3])
T4 = CountIf(x ≟ "正面", Take[l2, 1, N4])
T5 = CountIf(x ≟ "正面", Take[l2, 1, N5])
T6 = CountIf(x ≟ "正面", Take[l2, 1, N6])
T7 = CountIf(x ≟ "正面", Take[l2, 1, N7])
T8 = CountIf(x ≟ "正面", Take[l2, 1, N8])
T9 = CountIf(x ≟ "正面", Take[l2, 1, N9])
T10 = CountIf(x ≟ "正面", Take[l2, 1, N10])
m1: N1:N10
m2: T1:T10
m3: m2 / m1
s': Div[n - 1, 50] + 1
m1' = Append("抛掷次数", Take[m1, 1, s'])
m2' = Append("正面向上的频数", Take[m2, 1, s'])
m3' = Append("正面向上的频率", Take[m3, 1, s'])
text2 = TableText(m1', m2', m3', "c_|")
w = Vector((-1, 0), (12, 0))
d = Vector((0, -1), (0, 5))
l3 = Sequence(Segment[(k, 0), (k, 0.2)], k, 1, 10)
l4 = Sequence(Segment[(0, k), (0.2, k)], k, 0, 4, 0.4)
l5 = Sequence(Text[(50 * k), (-0.31, -0.1) + (k, 0), true, true], k, 1, 10)
text3 = Text(0.5, (-0.7, 2.2), true, true)
text4 = Text(1, (-0.4, 4.2), true, true)
g = Segment((0, 2), (10, 2))
l6 = Sequence((Element[m1, k] / 50, (Element[m3, k] * 4)), k, 1, s')
A = (9.82458, -3.26768)
B = (12.38858, -3.25018)