︠6de93d0c-20fc-470d-b45f-165139997c3ei︠ %html

Welcome to SAGE!  

We can do all sorts of cool things with SAGE.

First, let's plot a few points.

︡337d01d7-2902-432b-99fe-ff1ab92d4adc︡{"html": "

Welcome to SAGE!  

\n

We can do all sorts of cool things with SAGE.

\n

First, let's plot a few points.

"}︡ ︠68dd9a8c-ace5-4433-b352-666d30c6f124︠ points([(0,0), (1,1), (2,pi)], pointsize=30) ︡1dc05f22-87b1-4970-9850-bf5f1fc84308︡{"html": ""}︡ ︠1aee9ba6-c661-41bb-880a-ececc6883e03i︠ %html

In 3-D!

︡8196f6d9-1070-47bb-90b5-94e119d12f76︡{"html": "

In 3-D!

"}︡ ︠1df02018-ee24-4064-84a7-f4f88ebc9c8f︠ points([(0,0,0), (1, 1, 1), (2, pi, -4)]) ︡75091a68-f561-49b4-ae30-b34398ee2198︡︡ ︠fe4fc3fd-63a1-4613-8587-a899c40f5295︠ p=vector((0,2,4)) q=vector((1,1,1)) ︡f3e7c139-a1f7-44a6-a6e8-44b62c02b51e︡︡ ︠28785298-24fa-4d10-b6bc-f0c9c1f3b8af︠ p-q ︡5353910d-2673-4540-9939-8ca699721c75︡{"stdout": "(-1, 1, 3)"}︡ ︠04825c38-170a-4899-a9dd-93df597b4783i︠ %html

norm gives the length of the vector

︡21df0b33-530a-4ed4-b770-1e5d4cae0dec︡{"html": "

norm gives the length of the vector

"}︡ ︠653eb09d-d42b-4799-ac8a-620812ebe9e8︠ norm(p-q) ︡cf1cd517-dde1-4a32-be89-38f5554f91af︡{"stdout": "sqrt(11)"}︡ ︠20c8e8d5-0c71-49b5-9cfd-779841ee6586︠ plot(p) + plot(q) + plot(p-q, color='red') ︡124802b5-1b35-4e84-a25e-eeb78e3f736a︡︡ ︠025b83e6-d86a-431f-8d21-70f4f55568bf︠ @interact def _(p=input_box(default=(0,2,4)),q=input_box(default=(1,1,1))): show(plot(vector(p)) + plot(vector(q)) + plot(vector(p)-vector(q), color='red')) print html('Enter vectors p and q. This will plot p and q in blue and p-q in red.') ︡8358f802-ab3b-4b4b-8bef-546953b64dbb︡{"html": "\n
\n \n \n \n \n
\n \n \n \n \n
\n\n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n
"}︡ ︠245044e5-8074-4eea-b08b-ce81707aebc2i︠ %html

Now we plot the (boundary of) the cylinder we talked about in class!  

Grab it (with your mouse) to rotate it around and view it from different angles.

︡bdd42fc9-5882-4887-9a27-6e8eaa2007d0︡{"html": "

Now we plot the (boundary of) the cylinder we talked about in class!  

\n

Grab it (with your mouse) to rotate it around and view it from different angles.

"}︡ ︠dd52e77a-efba-4e59-af29-12b5fdf5d774︠ var('x,y,z') equation=x^2+z^2==9 equation ︡1e5561d8-5a80-4c20-b8c9-09a4fa42d881︡{"stdout": "x^2 + z^2 == 9"}︡ ︠4239e951-bb69-462a-abdd-9f9cf9ec2e7e︠ implicit_plot3d(equation, (x,-5,5),(y,-5,5),(z,-5,5)) ︡6f09c97e-3bfb-4beb-a489-37ec0d4b319d︡︡ ︠acd7b990-b855-46f0-b81d-b1bfe0d2c991︠ var('x,y,z') @interact def _(equation=input_box(default=(x-1)^2+(y-2)^2+(z+3)^2==16), size=(5)): show(implicit_plot3d(equation, (x,-size,size),(y,-size,size),(z,-size,size))) print html('Enter implicitly defined surface in 3-d (in variables x, y and z) and size of display box.') ︡3fad75cd-57d9-4d96-bebd-12315e1a5aee︡{"html": "\n
\n \n \n \n \n
\n \n \n \n \n
\n\n
equation 
size 
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n
"}︡