Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I've chosen some values to have something to work with. Go to a Sage Cell Server and copy/paste the following code in:

m = 5
r = 3
w = 6
x_coords = [t for t in range(0,360,5)]
y_coords = [m*r*w^2*cos(t*pi/180).n(digits=5) for t in range(0,360,5)]
list_plot([(x_coords[i],y_coords[i]) for i in range(0,len(x_coords))])

Press "Evaluate" and you'll get the plot. Creating the arrays: The first array (actually a list in Python) has the x coordinates, the second list creates the y values. Note that range(0,360,5) will not include 360. Plotting the data: list_plot is used to graph the points. The len(x_coords) is the length of the list (number of x values).