Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168769
Image: ubuntu2004
A = matrix([[-2, -1, 3, 1], [-3, 2, 4, -2]]) A
\newcommand{\Bold}[1]{\mathbf{#1}}\left(21313242\begin{array}{rrrr} -2 & -1 & 3 & 1 \\ -3 & 2 & 4 & -2 \end{array}\right)
A.columns()
\newcommand{\Bold}[1]{\mathbf{#1}}\left[\left(-2,-3\right), \left(-1,2\right), \left(3,4\right), \left(1,-2\right)\right]
P = polygon(A.columns(), color = (random(), random(), random()), alpha = .6) show(P, aspect_ratio = 1)
r_y = matrix([[-1, 0], [0, 1]]) r_y
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1001\begin{array}{rr} -1 & 0 \\ 0 & 1 \end{array}\right)
A
\newcommand{\Bold}[1]{\mathbf{#1}}\left(21313242\begin{array}{rrrr} -2 & -1 & 3 & 1 \\ -3 & 2 & 4 & -2 \end{array}\right)
r_y*A
\newcommand{\Bold}[1]{\mathbf{#1}}\left(21313242\begin{array}{rrrr} 2 & 1 & -3 & -1 \\ -3 & 2 & 4 & -2 \end{array}\right)
Q = polygon((r_y*A).columns(), color = (random(), random(), random()), alpha = .6) show(P+Q, aspect_ratio = 1)
r_x = matrix([[1, 0], [0, -1]]) r_x
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1001\begin{array}{rr} 1 & 0 \\ 0 & -1 \end{array}\right)
r_x*A
\newcommand{\Bold}[1]{\mathbf{#1}}\left(21313242\begin{array}{rrrr} -2 & -1 & 3 & 1 \\ 3 & -2 & -4 & 2 \end{array}\right)
R = polygon((r_x*A).columns(), color = (random(), random(), random()), alpha = .5) show(P+R, aspect_ratio = 1)
r_I = matrix([[0, 1], [1, 0]]) r_I
\newcommand{\Bold}[1]{\mathbf{#1}}\left(0110\begin{array}{rr} 0 & 1 \\ 1 & 0 \end{array}\right)
r_I*A
\newcommand{\Bold}[1]{\mathbf{#1}}\left(32422131\begin{array}{rrrr} -3 & 2 & 4 & -2 \\ -2 & -1 & 3 & 1 \end{array}\right)
S = polygon((r_I*A).columns(), color = (random(), random(), random()), alpha = .5) show(P+S+line([(-3, -3), (4, 4)], color = 'black', linestyle = '--'), aspect_ratio = 1)
var('theta') def R(theta): return matrix([[cos(theta), -sin(theta)], [sin(theta), cos(theta)]]) R(theta)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(cos(θ)sin(θ)sin(θ)cos(θ)\begin{array}{rr} \cos\left(\theta\right) & -\sin\left(\theta\right) \\ \sin\left(\theta\right) & \cos\left(\theta\right) \end{array}\right)
R(pi/6)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1231212123\begin{array}{rr} \frac{1}{2} \, \sqrt{3} & -\frac{1}{2} \\ \frac{1}{2} & \frac{1}{2} \, \sqrt{3} \end{array}\right)
T = polygon((R(pi/4)*A).columns(), color = (random(), random(), random()), alpha = .5, aspect_ratio = 1) show(P+T, aspect_ratio = 1)
@interact def rotate(theta = (0..2*pi, step = pi/24)): S = polygon((R(theta)*A).columns(), color = 'red', alpha = .5) print R(theta) show(P+S, aspect_ratio = 1)
theta 
[removed]
[removed]
[removed]
[removed]