/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/ /* [ Created with wxMaxima version 0.8.5 ] */ /* [wxMaxima: comment start ] off center circle [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ draw2d(nticks=100, color=blue, line_width=2, xlabel="x", ylabel="y", xrange=[-0.5,2.5], yrange=[-1.5,1.5], proportional_axes=xy, xaxis=true,xtics_axis=true, yaxis=true,ytics_axis=true, grid=true, axis_top=false,axis_bottom=false,axis_left=false,axis_right=false, terminal=wxt, polar(2*cos(theta),theta,0,2*%pi)); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ draw2d(user_preamble="set grid polar", nticks=100, color=blue, line_width=2, xrange=[-0.5,2.5], yrange=[-1.5,1.5], proportional_axes=xy, xaxis=true,xtics_axis=true, yaxis=true,ytics_axis=true, grid=true, axis_top=false,axis_bottom=false,axis_left=false,axis_right=false, terminal=wxt, polar(2*cos(theta),theta,0,2*%pi)); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] plotting r,theta in rectangular coordinates [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ draw2d(nticks=100, color=blue, line_width=2, xlabel="theta", ylabel="r", xrange=[0,2*%pi], yrange=[0,2], proportional_axes=xy, xaxis=true,xtics_axis=true, yaxis=true,ytics_axis=true, grid=true, axis_top=false,axis_bottom=false,axis_left=false,axis_right=false, terminal=wxt, explicit(2*cos(theta),theta,0,2*%pi)); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] Just an example of using atan2 to figure out theta from x and y (atan2(y,x)) [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ atan2(2,-2); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] cardioid r=1-cos(theta) [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ draw2d(user_preamble="set grid polar", nticks=200, line_width=2, color=blue, xrange=[-2.5,1], yrange=[-1.5,1.5], proportional_axes=xy, xaxis=true,xtics_axis=true, yaxis=true,ytics_axis=true, grid=true, axis_top=false,axis_bottom=false,axis_left=false,axis_right=false, terminal=wxt, polar(1-cos(theta),theta,0,2*%pi)); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] what do constants do in cylindrical coords [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ draw3d(proportional_axes=xyz, user_preamble="set xyplane at -2.5", title="r=2, theta=pi/4, z=-1", enhanced3d=false, terminal=wxt, line_width=2, surface_hide=true, color=blue, explicit(-1,x,-2.5,2.5,y,-2.5,2.5), color=red, implicit(x-y=0,x,0,2.5,y,0,2.5,z,-2.5,2.5), color=dark_green, implicit(x^2+y^2=2^2,x,-2.5,2.5,y,-2.5,2.5,z,-2.5,2.5)); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] r=z in cylindrical coords [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ draw3d(proportional_axes=xyz, title="r=z", user_preamble="set xyplane at 0", line_width=2, color=blue, parametric_surface(v*cos(t),v*sin(t), v, v,0,2,t,0,2*%pi), surface_hide=true, terminal=wxt); /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] Some computations [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ integrate(integrate((r *cos(theta))^2 * r, r, 0, 2),\theta,-%pi/2,%pi/2); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ integrate(integrate(r *cos(theta) * r, r, 0, 2),\theta,-%pi/2,%pi/2); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ (2*%pi)/(16/3); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ float(%), numer; /* [wxMaxima: input end ] */ /* Maxima can't load/batch files which end with a comment! */ "Created with wxMaxima"$