2D 座標架
Author: 藍邦偉  老師

$ O $

$Case=%v$

tan

$(\sqrt6+\sqrt2,\sqrt6-\sqrt2)$

$(2+\sqrt3,1)$

$(\sqrt3,1)$

$(1,1)$

$(1,\sqrt3)$

$(\sqrt6-\sqrt2,\sqrt6+\sqrt2)$

$(1,2+\sqrt3)$

$(0,1)$

$(1,0)$

$(-\sqrt6+\sqrt2,\sqrt6+\sqrt2)$

$(-1,2+\sqrt3)$

$(-1,\sqrt3)$

$(-1,1)$

$(-\sqrt3,1)$

$(-1,0)$

$(-2-\sqrt3,1)$

$(-\sqrt6-\sqrt2,-\sqrt6+\sqrt2)$

$(-2-\sqrt3,-1)$

$(-\sqrt3,-1)$

$(-1,-1)$

$(-1,-\sqrt3)$

$(-\sqrt6+\sqrt2,-\sqrt6-\sqrt2)$

$(-1,-2-\sqrt3)$

$(0,-1)$

$(\sqrt6-\sqrt2,-\sqrt6-\sqrt2)$

$(1,-2-\sqrt3)$

$(1,-\sqrt3)$

$(1,-1)$

$(\sqrt3,-1)$

$(\sqrt6+\sqrt2,-\sqrt6+\sqrt2)$

$(2+\sqrt3,-1)$

$(-\sqrt6-\sqrt2,\sqrt6-\sqrt2)$

$%v$

$sin0°=\frac{y}{r}=\frac{0}{1}=0$
$cos0°=\frac{x}{r}=\frac{1}{1}=1$
$tan0°=\frac{y}{x}=\frac{0}{1}=0$

$sin15°=\frac{y}{r}=\frac{\sqrt{6}-\sqrt{2}}{4}$
$cos15°=\frac{x}{r}=\frac{\sqrt{6}+\sqrt{2}}{4}$
$tan15°=\frac{y}{x}=\frac{1}{2+\sqrt{3}}$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;=2-\sqrt{3}$

$sin30°=\frac{y}{r}=\frac{1}{2}$
$cos30°=\frac{x}{r}=\frac{\sqrt{3}}{2}$
$tan30°=\frac{y}{x}=\frac{1}{\sqrt3}$

$sin45°=\frac{y}{r}=\frac{1}{\sqrt2}$
$cos45°=\frac{x}{r}=\frac{1}{\sqrt2}$
$tan45°=\frac{y}{x}=\frac{1}{1}=1$

$sin60°=\frac{y}{r}=\frac{\sqrt3}{2}$
$cos60°=\frac{x}{r}=\frac{1}{2}$
$tan60°=\frac{y}{x}=\frac{\sqrt3}{1}=\sqrt3$

$sin75°=\frac{y}{r}=\frac{\sqrt6+\sqrt2}{4}$
$cos75°=\frac{x}{r}=\frac{\sqrt6-\sqrt2}{4}$
$tan75°=\frac{y}{x}=\frac{2+\sqrt3}{1}$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;=2+\sqrt3$

$sin90°=\frac{y}{r}=\frac{1}{1}=1$
$cos90°=\frac{x}{r}=\frac{0}{1}=0$
$tan90°=\frac{y}{x}=\frac{1}{0}⇒無意義$

$sin105°=\frac{y}{r}=\frac{\sqrt6+\sqrt2}{4}$
$cos105°=\frac{x}{r}=\frac{-(\sqrt6-\sqrt2)}{4}$
$tan105°=\frac{y}{x}=\frac{2+\sqrt3}{-1}$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;=-2-\sqrt3$

$sin120°=\frac{y}{r}=\frac{\sqrt3}{2}$
$cos120°=\frac{x}{r}=\frac{-1}{2}$
$tan120°=\frac{y}{x}=\frac{\sqrt3}{-1}=-\sqrt3$

$sin135°=\frac{y}{r}=\frac{1}{\sqrt2}$
$cos135°=\frac{x}{r}=\frac{-1}{\sqrt2}$
$tan135°=\frac{y}{x}=\frac{1}{-1}=-1$

$sin150°=\frac{y}{r}=\frac{1}{2}$
$cos150°=\frac{x}{r}=\frac{-\sqrt3}{2}$
$tan150°=\frac{y}{x}=\frac{1}{-\sqrt3}$

$sin165°=\frac{y}{r}=\frac{\sqrt6-\sqrt2}{4}$
$cos165°=\frac{x}{r}=\frac{-(\sqrt6+\sqrt2)}{4}$
$tan165°=\frac{y}{x}=\frac{1}{-(2+\sqrt3)}$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;=-2+\sqrt3$

$sin180°=\frac{y}{r}=\frac{0}{1}=0$
$cos180°=\frac{x}{r}=\frac{-1}{1}=-1$
$tan180°=\frac{y}{x}=\frac{0}{-1}=0$

$sin195°=\frac{y}{r}=\frac{-(\sqrt6-\sqrt2)}{4}$
$cos195°=\frac{x}{r}=\frac{-(\sqrt6+\sqrt2)}{4}$
$tan195°=\frac{y}{x}=\frac{-1}{-(2+\sqrt3)}$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;=2-\sqrt3$

$sin210°=\frac{y}{r}=\frac{-1}{2}$
$cos210°=\frac{x}{r}=\frac{-\sqrt3}{2}$
$tan210°=\frac{y}{x}=\frac{-1}{-\sqrt3}=\frac{1}{\sqrt3}$

$sin225°=\frac{y}{r}=\frac{-1}{\sqrt2}$
$cos225°=\frac{x}{r}=\frac{-1}{\sqrt2}$
$tan225°=\frac{y}{x}=\frac{-1}{-1}=1$

$sin240°=\frac{y}{r}=\frac{-\sqrt3}{2}$
$cos240°=\frac{x}{r}=\frac{-1}{2}$
$tan240°=\frac{y}{x}=\frac{-\sqrt3}{-1}=\sqrt3$

$sin255°=\frac{y}{r}=\frac{-(\sqrt6+\sqrt2)}{4}$
$cos255°=\frac{x}{r}=\frac{-(\sqrt6-\sqrt2)}{4}$
$tan255°=\frac{y}{x}=\frac{-(2+\sqrt3)}{-1}$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;=2+\sqrt3$

$sin270°=\frac{y}{r}=\frac{-1}{1}=-1$
$cos270°=\frac{x}{r}=\frac{0}{1}=0$
$tan270°=\frac{y}{x}=\frac{-1}{0}⇒無意義$

$sin285°=\frac{y}{r}=\frac{-(\sqrt6+\sqrt2)}{4}$
$cos285°=\frac{x}{r}=\frac{\sqrt6-\sqrt2}{4}$
$tan285°=\frac{y}{x}=\frac{-(2+\sqrt3)}{1}$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;=-2-\sqrt3$

$sin300°=\frac{y}{r}=\frac{-\sqrt3}{2}$
$cos300°=\frac{x}{r}=\frac{1}{2}$
$tan300°=\frac{y}{x}=\frac{-\sqrt3}{1}=-\sqrt3$

$sin315°=\frac{y}{r}=\frac{-1}{\sqrt2}$
$cos315°=\frac{x}{r}=\frac{1}{\sqrt2}$
$tan315°=\frac{y}{x}=\frac{-1}{1}=-1$

$sin330°=\frac{y}{r}=\frac{-1}{2}$
$cos330°=\frac{x}{r}=\frac{\sqrt3}{2}$
$tan330°=\frac{y}{x}=\frac{-1}{\sqrt3}$

$sin345°=\frac{y}{r}=\frac{-(\sqrt6-\sqrt2)}{4}$
$cos345°=\frac{x}{r}=\frac{\sqrt6+\sqrt2}{4}$
$tan345°=\frac{y}{x}=\frac{-1}{2+\sqrt3}$
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;=-2+\sqrt3$

廣義三角函數

顯示正切

O = (0, 0)
Q_2: 0.7 * Corner[1] + 0.3 * Corner[2]
Q_3: (x(Q_2), y(Corner[4]))
polya, q_1, q_2, q_4, q_3 = Polygon(Corner[1], Q_2, Q_3, Corner[4])
n = 0 (slider from 0 to 24, step 1)
a = false
A_1 = (3.863703305156273, 1.0352761804100827)
B_1 = (3.732050807568877, 1)
A_2 = (1.7320508075688772, 1)
A_3 = (1, 1)
A_4 = (1, 1.7320508075688772)
A_5 = (1.0352761804100827, 3.863703305156273)
B_5 = (1, 3.732050807568877)
A_6 = (0, 1)
A_0 = (1, 0)
A_7 = (-1.0352761804100827, 3.863703305156273)
B_7 = (-1, 3.732050807568877)
A_8 = (-1, 1.7320508075688772)
A_9 = (-1, 1)
A_a = (-1.7320508075688772, 1)
A_c = (-1, 0)
B_b = (-3.732050807568877, 1)
A_d = (-3.863703305156273, -1.0352761804100827)
B_d = (-3.732050807568877, -1)
A_e = (-1.7320508075688772, -1)
A_f = (-1, -1)
A_g = (-1, -1.7320508075688772)
A_h = (-1.0352761804100827, -3.863703305156273)
B_h = (-1, -3.732050807568877)
A_i = (0, -1)
A_j = (1.0352761804100827, -3.863703305156273)
B_j = (1, -3.732050807568877)
A_k = (1, -1.7320508075688772)
A_l = (1, -1)
A_m = (1.7320508075688772, -1)
A_n = (3.863703305156273, -1.0352761804100827)
B_n = (3.732050807568877, -1)
A_b = (-3.863703305156273, 1.0352761804100827)
poly0 = Segment(O, (1, 0))
Poly1, b_1, c_1, a_1 = Polygon(O, A_1, (x(A_1), 0))
Poly1', b, o, b_2 = Polygon(O, B_1, (x(B_1), 0))
Poly2, c, o_1, a_2 = Polygon(O, A_2, (x(A_2), 0))
Poly3, d, o_2, a_3 = Polygon(O, A_3, (x(A_3), 0))
Poly4, e, o_3, a_4 = Polygon(O, A_4, (x(A_4), 0))
Poly5, f, o_4, a_5 = Polygon(O, A_5, (x(A_5), 0))
Poly5', g, o_5, b_5 = Polygon(O, B_5, (x(B_5), 0))
poly6 = Segment(O, (0, 1))
Poly7, h, o_6, a_7 = Polygon(O, A_7, (x(A_7), 0))
Poly7', i, o_7, b_7 = Polygon(O, B_7, (x(B_7), 0))
Poly8, j, o_8, a_8 = Polygon(O, A_8, (x(A_8), 0))
Poly9, k, o_9, a_9 = Polygon(O, A_9, (x(A_9), 0))
Polya, l, o_{10}, a_a = Polygon(O, A_a, (x(A_a), 0))
Polyb, m, o_{11}, a_b = Polygon(O, A_b, (x(A_b), 0))
Polyb', p, o_{12}, b_b = Polygon(O, B_b, (x(B_b), 0))
polyc = Segment(O, (-1, 0))
Polyd, q, o_{13}, a_d = Polygon(O, A_d, (x(A_d), 0))
Polyd', r, o_{14}, b_d = Polygon(O, B_d, (x(B_d), 0))
Polye, s, o_{15}, a_e = Polygon(O, A_e, (x(A_e), 0))
Polyf, t, o_{16}, a_f = Polygon(O, A_f, (x(A_f), 0))
Polyg, d_1, o_{17}, a_g = Polygon(O, A_g, (x(A_g), 0))
Polyh, e_1, o_{18}, a_h = Polygon(O, A_h, (x(A_h), 0))
Polyh', f_1, o_{19}, b_h = Polygon(O, B_h, (x(B_h), 0))
polyi = Segment(O, (0, -1))
Polyj, g_1, o_{20}, a_j = Polygon(O, A_j, (x(A_j), 0))
Polyj', h_1, o_{21}, b_j = Polygon(O, B_j, (x(B_j), 0))
Polyk, i_1, o_{22}, a_k = Polygon(O, A_k, (x(A_k), 0))
Polyl, j_1, o_{23}, a_l = Polygon(O, A_l, (x(A_l), 0))
Polym, k_1, o_{24}, a_m = Polygon(O, A_m, (x(A_m), 0))
Polyn, l_1, o_{25}, a_n = Polygon(O, A_n, (x(A_n), 0))
Polyn', m_1, o_{26}, b_n = Polygon(O, B_n, (x(B_n), 0))
α = Angle((1, 0), O, (cos(((n - 1) * 15)°), sin(((n - 1) * 15)°)))
A = (-10.605262475434118, 3.5367083557257413)
ray = Vector(O, (5 * cos(((n - 1) * 15)°), 5 * sin(((n - 1) * 15)°)))