Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8869217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:26:04+00:00 2026-06-14T17:26:04+00:00

I tried to look around for a solution for this kind of a problem,

  • 0

I tried to look around for a solution for this kind of a problem, but I was not able to find one. Hence I thought of asking.

PROBLEM:

I have a center and I would like to find a point on the circumference of the circle. Now the constraint is, I would like to be near the “Players position”. The players position could be anywhere from the center and always would be less than the radius ‘r’ from the center. Now as I said ‘near’, I would like to brief that a bit. Lets dividend a circle into quads. If the player lies at 1st Quad then any point on the circumference except 3rd quad is good.

I hope I was clear.

The image representation of the problem is here.

ILLUSTRATION OF THE IMAGE :
Considering the above diagram, lets say the radius of the circle is ‘r’ and the player lies at ‘Pl’. Now just being random, I would like to get a Vector2 co-ordinates anywhere near ‘x’ (red in color). Again here, they are highly arbitrary but they are within the adjacent quads. The required co-ordinates are a vector2 co-ordinates.

THANK YOU very much!!!

regards,

Karsnen

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:26:05+00:00Added an answer on June 14, 2026 at 5:26 pm

    In polar-coordinates you just have to calculate a random angle in the considered area (due to position of the player)

    For example position of the player is somethin like (R,theta) in polar-coordinates you could generate a random value for the angle of your searched position between -pi and pi and add it to angle theta of the position of the player.
    Or if you really want to do this just according to those “quads”: If player is in 1st quad calculate a random value between -pi/2 and pi, if player is in 2nd quad, calculate a random value between 0 and 3pi/2 and so on..

    After this you just have to convert into cartesian coordinates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've tried to look around for a solution to this, but I simply can't.
I have tried to look everywhere for a solution but I can't seem to
I've tried to look for an answer to this, but none of the other
Really tried to look around, used search. Used Google, tried many ways, but I
What should data look like before data encoding in: urllib2.Request(someurl,data) I tried [('name1','value1'),('name2','value2'),...] but
I have tried this example http://www.bennadel.com/blog/1056-ColdFusion-CFPOP-My-First-Look.htm , but it retrieve emails from POP server.
I tried to look around for a best-practice to load an XML-File from the
I've had a good look around this site and others on how to set
First of all, the question is very simple, but I have tried to look
I have tried to look around all over the place to edit the joomla

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.