Reputation: 1529
How can I plot theta = pi/4 in sage?
I tried doing the following
p4 = polar_plot(lambda x: pi/4, 0, 2*pi, rgbcolor=hue(0.6))
p4.show()
but it doesn't show the desired figure.
p4 = polar_plot(lambda x: x, 0, 2*pi, rgbcolor=hue(0.6))
p4.show()
shows archimedes spiral. It seems that lambda x is r.
Upvotes: 0
Views: 100
Reputation: 4402
According to the documentation for polar_plot, the function plotted "polarly" is the radius, with whatever variable you put in as the variable for the angle (in radians). Indeed, polar_plot(pi/4, 0, 2*pi, rgbcolor=hue(0.6))
would be sufficient for your first plot.
As far as actually plotting what you really want, I don't think you could do it with polar_plot
as it stands. However, you could certainly do a parametric plot, like
parametric_plot((x*cos(pi/4),x*sin(pi/4)),(x,0,10))
but I'm not sure if that is what you are going for.
Upvotes: 1