極座標與直角座標
Author: 藍邦偉  老師

極座標與直角座標

O: 0.5 * (Corner[1.0] + Corner[3.0])
u = Vector((x(Corner[1.0]), y(O)), (x(Corner[3.0]), y(O)))
v = Vector((x(O), y(Corner[1.0])), (x(O), y(Corner[3.0])))
r = 4 (slider from 0.1 to 5, step 0.1)
n = 20 (slider from 1 to 30, step 1)
集合1 = Sequence(Vector[Vector[O, Rotate[O + (5.0, 0.0), i * 2.0 * 3.141592653589793 / n, O]]], i, 0.0, n)
集合2 = Sequence(Circle[O, i], i, 1.0, 5.0)
文字3: "" + r
Q: (x(Corner[2.0]), y(O))
a = 0.18 (slider from -1 to 1, step 0.01)
P: (x(O) + r * cos(2.0 * a * 3.141592653589793), y(O) + r * sin(2.0 * a * 3.141592653589793))
α = Angle(If[a ≥ 0.0, Q, P], O, If[a ≥ 0.0, P, Q])
w = Vector(O, P)
A = (-3.98, 3.12)
文字2: "P[" + r + "," + (a * 360.0) + "°]"
文字6: "目前角度α=" + (If[a ≟ 1.0, "360°", If[a ≥ 0.0, "" + α, "-" + (360.0° - α)]])