CoCalc Public Filestmp / 3d.sagetex.sageOpen with one click!
Authors: Gihan Marasingha, Harald Schilly, ℏal Snyder, William A. Stein
1
## -*- encoding: utf-8 -*-
2
## This file (3d.sagetex.sage) was *autogenerated* from 3d.tex with sagetex.sty version 2019/01/09 v3.3.
3
import sagetex
4
_st_ = sagetex.SageTeXProcessor('3d', version='2019/01/09 v3.3', version_check=True)
5
_st_.current_tex_line = 4
6
_st_.blockbegin()
7
try:
8
var('x,y')
9
f1(x,y) = (x^2 - y^2)
10
zmin, zmax = -2,2
11
cm = colormaps.Spectral
12
def c(x,y): return float((f1(x,y)-zmin)/(zmax-zmin))
13
S1= plot3d(f1, (x,-1.5,1.5), (y,-1.5,1.5),color=(c,cm),
14
frame = False)
15
except:
16
_st_.goboom(12)
17
_st_.blockend()
18
try:
19
_st_.current_tex_line = 16
20
_st_.plot(0, format='notprovided', _p_=S1)
21
except:
22
_st_.goboom(16)
23
_st_.endofdoc()
24