some examples

116 days ago by jsuagee

#this is a comment #to evaluate a line click on the line and hold the shift and enter keys 
       
center1 = (0,0,0); radius1 = 2; 
       
center2 = (1,1,1); radius2 = 1.5; 
       
#lets create some spheres S1 = sphere(center1,radius1,color='pink',opacity=.5) S2 = sphere(center2,radius2,color='purple',opacity=.5) 
       
#now lets plot them (put cursor in this box and hit shift+enter S1 + S2 
       
#you can click on the image and drag and rotate it 
       
#now lets create some lines L1 = line([(0,0),(1,3)]); L2 = line([(1,3),(-4,6)]); L3 = line([(-4,6),(0,0)]) 
       
#and plot them L1 + L2 + L3 
       
#now lets plot a function var('x y z') 
       
(x, y, z)
(x, y, z)
#the function is sin(x^2 +3*y)^3 and we are plotting it from x=-1 to 2 and from y=-3 to 1 #you can also rotate the plot plot3d( sin(x^2 + 3*y)^3,(x,-1,2),(y,-3,1)) 
       
#here is an implicit plot graphing the solution set to the equation x^2 + y^2 - z^2 - 2 = 0 # implicit_plot3d(x^2 + y^2 - z^2 - 2,(x,-2, 2), (y,-2, 2), (z,-2, 2))