I want to find a random generated point inside a sector from a circle in R. For example, if I have 90º sector from a circle and point is located inside it, I would like to obtain a given result.
I'm not familiar with the random number generator in R software, but a basic approach to solve your issue is:
Consider a circle (or sector) of unit radius with center at (0, 0) in x. y coordinates
A 90 degree sector would be located in the top right quadrant and any point on the circumference given by x^2 + y^2 = 1. This sets the bounds for y given any x.
Generate a random number between 0 and 1 to the required number of terms. This is your x coordinate. Calculate the y corresponding to this (sets the top limit for y) according to the formula above- call this z. Generate a new random number between 0 and z. This is then the random y coordinate for your random x-coordinate.
Repeat the steps above
If you have a sector then this simply reduces the available angles, Conversely a full circle of unit radius with 4 quadrants will have x from - 1 to +1 and y from -1 to + 1 also