1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Is there an algorithms to determine correct angles

  1. Jun 4, 2017 #1
    1. The problem statement, all variables and given/known data
    I am struggling with plotting polar graphs manually (without any help of the calculator). My main unresolved issue is with finding correct values of theta in a given range.
    For example, I have an equation:
    $r = cos(5\theta)$

    2. Relevant equations
    and I know that the range I have to work with is [-π/5 , π/5]. Here are the values I get when arbitrary choose values of theta to compute r, then x and y.

    Screen Shot 2017-06-04 at 13.25.18.png

    But the problem is that I don't know of any algorithm that I could apply in any such case to choose correct values of theta - here I started with -π/5, took π/6, next π/10, and 0 for the first half.
    I suppose there should be some algorithm or rules applicable for such choices.
    Please, help me to fill that gap in my knowledge.

    3. The attempt at a solution
    Thank you very much!
  2. jcsd
  3. Jun 4, 2017 #2


    User Avatar
    Science Advisor
    Gold Member

    Increment the angle by fixed amounts starting at the lowest range value and ending at the highest range value . You have to decide what increment is appropriate for your application .

    For example we could decide on 0.1 of π/5 as the increment .

    Then starting from the lowest range value and incrementing the angle sequentially by 0.1 of π/5 we get :

    - π/5 , - 0.9 x π/5 , - 0.8 x π/5 , ............. , 0 , 0.1 x π/5 , 0.2 x π/5 , .......... , π/5

    Note though that it may be easier to get or make some proper polar graph paper and plot results directly rather than convert to Cartesian coordinates .
  4. Jun 4, 2017 #3


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    If you want to do quick plots from memory, you should use the angles inside sin() and cos() whose values you can remember. You should memorize the sin() and cos() of 0°, 30°, 45°, 60°, and 90°. Pick theta so that you are taking sin() and cos() of those angles.

    (The sin() of 0°, 30°, 45°, 60°, and 90° is √0/2=0, √1/2=1/2, √2/2, √3/2, √4/2=1. And use √2/2 ≅ 1.414/2 = 0.707 and √3/2 ≅ 1.732/2 = 0.866)
    Last edited: Jun 4, 2017
  5. Jun 4, 2017 #4
    Thank you very much. I will try to follow your advice, and see where it brings me to. :) As to direct plotting, well, no, I need to do the fundamental cycle first on r theta graph, and then convert to Cartesian; all manually, without any machines. :-)
  6. Jun 4, 2017 #5
    Yes, I know all these values pretty well - seems the only topic I definitely don't have issues with. I did try using these "standard" angles, but this is wrong in this case because the range of the given equation is 2π/5. So, I wondered what algorithm should be used that works in all cases.
  7. Jun 4, 2017 #6


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    The equation is cos(5θ), so for instance √2/2 = cos(5θ) when 5θ = π/4 or θ = π/20. π/20 is well within the range ±π/4. So you can get a lot of points to plot within the range of ±π/4.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted