学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- 数式入力ソフト(TeX, MathML): MathType
- MathML対応ブラウザ: Firefox、Safari
- MathML非対応ブラウザ(Internet Explorer, Google Chrome...)用JavaScript Library: MathJax
- 参考書籍
ラング線形代数学(上)(S.ラング (著)、芹沢 正三 (翻訳)、ちくま学芸文庫)の4章(線形写像)、1(写像)、練習問題8-12.を取り組んでみる。
円柱
コード(Emacs)
Python 3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sympy import pprint, symbols, plot, solve, exp, cos, sin
x, y = symbols('x y')
eqs = [(x ** 2 + y ** 2 - 1, x ** 2 / 4 + y ** 2 / 9 - 1),
(x - 2, x - 2 * y),
(x - 1, x ** 2 + y ** 2 - exp(1) ** 2),
(x ** 2 / 9 + y ** 2 / 16 - 1, x ** 2 + y ** 2 - 1)]
for i, (eq1, eq2) in enumerate(eqs, 8):
p = plot(*solve(eq1, x), *solve(eq2, x), show=False, legend=True)
p.save('sample{0}.svg'.format(i))
入出力結果(Terminal, IPython)
$ ./sample8.py $
0 コメント:
コメントを投稿