exercises 24

2681 days ago by hgeller@clemson.edu

def abs(y): if y==0: n=0 if y>0: n=y if y<0: n=-1*y return n 
       
def y(x): return 1-abs(x) def z(x): return abs(x)-1 p1 = parametric_plot((x,y),(x,-1,1)) p2 = parametric_plot((x,z),(x,-1,1)) show(p1+p2, axes=true) 
       
def y(x): return (1-abs(x)^(3/2))^(2/3) def z(x): return -(1-abs(x)^(3/2))^(2/3) p1 = parametric_plot((x,y),(x,-1,1)) p2 = parametric_plot((x,z),(x,-1,1)) show(p1+p2, axes=true) 
       
def y(x): return (1-abs(x)^2)^(1/2) def z(x): return -(1-abs(x)^2)^(1/2) p1 = parametric_plot((x,y),(x,-1,1)) p2 = parametric_plot((x,z),(x,-1,1)) show(p1+p2, axes=true) 
       
def y(x): return (1-abs(x)^3)^(1/3) def z(x): return -(1-abs(x)^3)^(1/3) p1 = parametric_plot((x,y),(x,-1,1)) p2 = parametric_plot((x,z),(x,-1,1)) show(p1+p2, axes=true) 
       
p1 = parametric_plot((1,y),(y,-1,1)) p2 = parametric_plot((-1,y),(y,-1,1)) p3 = parametric_plot((x,1),(x,-1,1)) p4 = parametric_plot((x,-1),(x,-1,1)) show(p1+p2+p3+p4, axes=true)