高校数学/三角関数
をテンプレートにして作成
Unity学習帳2冊目
高校数学/三角関数 をテンプレートにして作成
[
トップ
] [
差分
|
バックアップ
|
リロード
] [
新規
|
一覧
|
検索
|
最新
|
ヘルプ
]
[ ]
開始行:
TITLE:三角関数
#jsmath
**三角比の定義
直角三角形は90度の直角と鋭角\(\theta\)(シータ)とで構成...
&ref(trigona.png);
-直角に向かい合う辺を斜辺(hypotenuse)
-\(\theta\)に向かい合う辺を対辺(opposite)
-残りの辺(θから直角に向かう辺)を隣辺(adjacent)
三角関数、sin(サイン:正弦:せいげん)、cos(コサイン:...
\(\sin { \theta } =\frac { 対辺 }{ 斜辺 } \quad ,\quad \...
この分数の関係式は頭文字の英語の筆記体の書き順で憶えると...
&font(Red){sin,cosは斜辺が母(分母)と憶える};
二つの角が同じ角度になる三角形同士は相似と言えるので、ど...
&ref(trigonb.png);
比は変わらないので斜辺rの長さを基準としてsinθやcosθの長さ...
|&ref(sincos2.png);|\(r\cos { \theta } =r\frac { x }{ r ...
たとえばθ=30°斜辺rの長さが3.5の時のxとyの長さを知りたいと...
<unityのコード例>
#code(csharp){{
using UnityEngine;
using System.Collections;
public class trigon1 : MonoBehaviour
{
void Start ()
{
float r, theta, x, y;
r = 3.5f;
theta = 30 * Mathf.Deg2Rad; //°(単位度)からラジアン...
x = r * Mathf.Cos (theta);
y = r * Mathf.Sin (theta);
print ("r=" + r + " θ=" + theta + " x=" + x + " y=" +...
}
}
}}
#hr
出力
r=3.5 θ=0.5235988 x=3.031089 y=1.75
#hr
tanθは一次関数式の傾きとしても取り扱える
&ref(e1c2780d9457ca20ed35d48d38814082.png);
**ラジアン(RadianAngles:弧度法)
三角関数では角の大きさを測る引数に弧の長さの実数であるラ...
1回転 = 360° = \(2\pi\)
通常、角はギリシャ文字θ(シータ)を用いて表される。aを°に...
&ref(78feedc804f38212694e84d9d5210330.png);
基本的にLの長さによる&font(Red){単位の無い実数となり y=co...
**三角関数の定義
ラジアンと単位円、三角比を用いた三角関数の定義。原点を中...
&ref(0cded19e12a181bf3e8388dbce4eb67e.png);
このcos(x)とsin(x)をグラフで描くと以下の様な波のグラフに...
&ref(sincos1.png);
この実際の値の動きを視覚的に確認できるプログラムを作りま...
[[三角関数プレーヤー_for_Unity:https://dl.dropboxusercont...
#code(csharp){{
using UnityEngine;
using System.Collections;
public class trigon2 : MonoBehaviour
{
void Start ()
{
float x = Mathf.Cos (60 * Mathf.Deg2Rad);
float y = Mathf.Sin (60 * Mathf.Deg2Rad);
print (Mathf.Pow (x, 2) + Mathf.Pow (y, 2)); //三平...
}
}
}}
**負角、余角の公式
θを時計回りに進めると負角(-)となり、以下の負角の公式が利...
\(\cos { (-\theta ) } =cos\theta \quad ,\quad \sin { (-\t...
直角\(\frac { \pi }{ 2 } \)からθを引いた余りの角を余角と...
\(\cos { \left( \frac { \pi }{ 2 } -\theta \right) } =...
&ref(f251ae8248eb7f58752c4597e59b4629.png);
※unityのMathfクラスsin,cos関数ではマイナスの引数でも上記...
**atan(アークタンジェント:逆正接)
atan は tan の逆関数になる(つまり傾きから角度を得る)。...
\(\tan { \theta } =\frac { \sin { \theta } }{ \cos { \...
arctanは幾つかの表現方法があり\(\arctan { \left( \frac { ...
unityのコードでは[[Atan:http://docs.unity3d.com/ja/curren...
<unityのコード例>
#code(csharp){{
using UnityEngine;
using System.Collections;
public class Trigon3 : MonoBehaviour
{
float theta, x, y, tan, arctan, arctan2;
void Start ()
{
theta = 30f * Mathf.Deg2Rad;
x = Mathf.Cos (theta);
y = Mathf.Sin (theta);
tan = Mathf.Tan (theta);
arctan = Mathf.Atan (tan) * Mathf.Rad2Deg;
arctan2 = Mathf.Atan2 (y, x) * Mathf.Rad2Deg;
print ("cos=" + x + " sin=" + y + " tan=" + tan + "...
Vector2 vec = Vector2.right;
vec = Quaternion.AngleAxis (30, Vector3.forward) * vec;
print ("30°回転させたベクトル=" + vec + " arctan関数...
}
}
}}
#hr
出力
cos=0.8660254 sin=0.5 tan=0.5773503 arctan=30 arctan2...
30°回転させたベクトル=(0.9, 0.5) arctan関数で逆算した値=30
#hr
**有名なsin,cos値
最低限、暗記しておいた方が良いsin,cos値
|cos(0°)|1|sin(0°)|0|
|cos(30°)|√0.75 = 0.866~|sin(30°)|√0.25= 0.5|
|cos(45°)|√0.5= 0.7071~|sin(45°)|√0.5= 0.7071~|
|cos(60°)|√0.25= 0.5|sin(60°)|√0.75 = 0.866~|
|cos(90°)|0|sin(90°)|1|
45°を境にsin,cosの関係が対称になっている
上の表から以下の式で三平方の定理が成立している事が確認で...
\(\cos ^{ 2 }{ (30) } +\sin ^{ 2 }{ (30) } =1\quad \quad ...
**三角関数の表記注意点
三角関数同士の掛算では以下の様に表記する必要がある
\(\sin { A } \times \sin { B } =\sin { A } \sin { B } \)
sinABの様な書き方はNGなので注意
累乗表記は
\(\sin { \theta } \times \sin { \theta } =\sin ^{ 2 }{ ...
のように関数側の右肩に書く事が約束となっている
#navi
終了行:
TITLE:三角関数
#jsmath
**三角比の定義
直角三角形は90度の直角と鋭角\(\theta\)(シータ)とで構成...
&ref(trigona.png);
-直角に向かい合う辺を斜辺(hypotenuse)
-\(\theta\)に向かい合う辺を対辺(opposite)
-残りの辺(θから直角に向かう辺)を隣辺(adjacent)
三角関数、sin(サイン:正弦:せいげん)、cos(コサイン:...
\(\sin { \theta } =\frac { 対辺 }{ 斜辺 } \quad ,\quad \...
この分数の関係式は頭文字の英語の筆記体の書き順で憶えると...
&font(Red){sin,cosは斜辺が母(分母)と憶える};
二つの角が同じ角度になる三角形同士は相似と言えるので、ど...
&ref(trigonb.png);
比は変わらないので斜辺rの長さを基準としてsinθやcosθの長さ...
|&ref(sincos2.png);|\(r\cos { \theta } =r\frac { x }{ r ...
たとえばθ=30°斜辺rの長さが3.5の時のxとyの長さを知りたいと...
<unityのコード例>
#code(csharp){{
using UnityEngine;
using System.Collections;
public class trigon1 : MonoBehaviour
{
void Start ()
{
float r, theta, x, y;
r = 3.5f;
theta = 30 * Mathf.Deg2Rad; //°(単位度)からラジアン...
x = r * Mathf.Cos (theta);
y = r * Mathf.Sin (theta);
print ("r=" + r + " θ=" + theta + " x=" + x + " y=" +...
}
}
}}
#hr
出力
r=3.5 θ=0.5235988 x=3.031089 y=1.75
#hr
tanθは一次関数式の傾きとしても取り扱える
&ref(e1c2780d9457ca20ed35d48d38814082.png);
**ラジアン(RadianAngles:弧度法)
三角関数では角の大きさを測る引数に弧の長さの実数であるラ...
1回転 = 360° = \(2\pi\)
通常、角はギリシャ文字θ(シータ)を用いて表される。aを°に...
&ref(78feedc804f38212694e84d9d5210330.png);
基本的にLの長さによる&font(Red){単位の無い実数となり y=co...
**三角関数の定義
ラジアンと単位円、三角比を用いた三角関数の定義。原点を中...
&ref(0cded19e12a181bf3e8388dbce4eb67e.png);
このcos(x)とsin(x)をグラフで描くと以下の様な波のグラフに...
&ref(sincos1.png);
この実際の値の動きを視覚的に確認できるプログラムを作りま...
[[三角関数プレーヤー_for_Unity:https://dl.dropboxusercont...
#code(csharp){{
using UnityEngine;
using System.Collections;
public class trigon2 : MonoBehaviour
{
void Start ()
{
float x = Mathf.Cos (60 * Mathf.Deg2Rad);
float y = Mathf.Sin (60 * Mathf.Deg2Rad);
print (Mathf.Pow (x, 2) + Mathf.Pow (y, 2)); //三平...
}
}
}}
**負角、余角の公式
θを時計回りに進めると負角(-)となり、以下の負角の公式が利...
\(\cos { (-\theta ) } =cos\theta \quad ,\quad \sin { (-\t...
直角\(\frac { \pi }{ 2 } \)からθを引いた余りの角を余角と...
\(\cos { \left( \frac { \pi }{ 2 } -\theta \right) } =...
&ref(f251ae8248eb7f58752c4597e59b4629.png);
※unityのMathfクラスsin,cos関数ではマイナスの引数でも上記...
**atan(アークタンジェント:逆正接)
atan は tan の逆関数になる(つまり傾きから角度を得る)。...
\(\tan { \theta } =\frac { \sin { \theta } }{ \cos { \...
arctanは幾つかの表現方法があり\(\arctan { \left( \frac { ...
unityのコードでは[[Atan:http://docs.unity3d.com/ja/curren...
<unityのコード例>
#code(csharp){{
using UnityEngine;
using System.Collections;
public class Trigon3 : MonoBehaviour
{
float theta, x, y, tan, arctan, arctan2;
void Start ()
{
theta = 30f * Mathf.Deg2Rad;
x = Mathf.Cos (theta);
y = Mathf.Sin (theta);
tan = Mathf.Tan (theta);
arctan = Mathf.Atan (tan) * Mathf.Rad2Deg;
arctan2 = Mathf.Atan2 (y, x) * Mathf.Rad2Deg;
print ("cos=" + x + " sin=" + y + " tan=" + tan + "...
Vector2 vec = Vector2.right;
vec = Quaternion.AngleAxis (30, Vector3.forward) * vec;
print ("30°回転させたベクトル=" + vec + " arctan関数...
}
}
}}
#hr
出力
cos=0.8660254 sin=0.5 tan=0.5773503 arctan=30 arctan2...
30°回転させたベクトル=(0.9, 0.5) arctan関数で逆算した値=30
#hr
**有名なsin,cos値
最低限、暗記しておいた方が良いsin,cos値
|cos(0°)|1|sin(0°)|0|
|cos(30°)|√0.75 = 0.866~|sin(30°)|√0.25= 0.5|
|cos(45°)|√0.5= 0.7071~|sin(45°)|√0.5= 0.7071~|
|cos(60°)|√0.25= 0.5|sin(60°)|√0.75 = 0.866~|
|cos(90°)|0|sin(90°)|1|
45°を境にsin,cosの関係が対称になっている
上の表から以下の式で三平方の定理が成立している事が確認で...
\(\cos ^{ 2 }{ (30) } +\sin ^{ 2 }{ (30) } =1\quad \quad ...
**三角関数の表記注意点
三角関数同士の掛算では以下の様に表記する必要がある
\(\sin { A } \times \sin { B } =\sin { A } \sin { B } \)
sinABの様な書き方はNGなので注意
累乗表記は
\(\sin { \theta } \times \sin { \theta } =\sin ^{ 2 }{ ...
のように関数側の右肩に書く事が約束となっている
#navi
ページ名:
ヒント
Adv.