Frodo and Black Riders

Back to Problem Solutions forum

Vladimir_V     2016-01-02 15:20:21

Hi to everyone! Would be nice for me if you could clarify some details about "Frodo and Black Riders " task 1. Every Riders has a look direction expressed in radians. For example 3.14/2 = 1.57 and it is clear for that he is looking along Y axis. or 3.14 Rider is looking along y axis from( 0- to - infinite) And the questions : when we have minus radians what direction Riders is looking at in that case ? Let's take example from the task, there we have rider nr.3 and 4 having -1.5 and respectively -1. What does that mean(which direction) ? 2. And second. We have frodo at some position (x.y) Depending on the answer to frist question the angle between loking direction of Rider an position of the frodo could be ( for example 100 grades or 260 grades= having 360 in total ). I am really confusesd with these negative radians and how to look at that angle beetween frodo position and Rider's looking direction ?

Thanks a lot

Quandray     2016-01-02 17:23:01
User avatar

Hi,

I'm not sure I understand your second question, but I'll answer your first question and hopefully that will help. If not please ask again.

Positive radians is counterclockwise from the x axis. Negative radians is the other way, that is clockwise from the x axis.

Another way of looking at it when you have negative radians is, if you add pi, that'll give you the opposite direction.

If 1.57 is north, 0.79 is roughly north east and -2.36 is roughly south west.

Vladimir_V     2016-01-02 17:50:48

Thanks a lot. That really helped me. Task is done :)

pj6444     2016-01-03 01:09:52

Hi there!

I've been looking at this problem and seen that Monte Carlo integration is a good way to approximate the area of these curves.

So far the general idea I've had is to represent these curves parametrically and then use the rotation matrix to find the rotation of it. The isse I'm running into is how to find if a sample point is inside the curve. Is there are general algorithm for this that I could use?

Thank you

pj6444     2016-01-03 02:39:19

No need to answer this, I figured it out on my own. Turns out I was overcomplicating things quite a bit!

Please login and solve 5 problems to be able to post at forum