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

  • Home
  • SEARCH
  • 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 4017406
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:51:25+00:00 2026-05-20T09:51:25+00:00

This is basically just a math question. Heres what I am having troubles with…

  • 0

This is basically just a math question.

Heres what I am having troubles with… I am having a difficult time coming up with how to phrase the question, so bear with me. Basically I think I need to use some advanced math to accomplish this, but I do not know what I need.

I will use some illustrations to make this clear. Spam prevention doesn’t let me post pictures… Here’s a simple concept image though: http://radleygh.com/images/gimp-2_2011-057-00-57-26-40.bmp

Objective: Determine if several objects lie within a cone on a 2D plane

Cone Properties:
Position (x, y)
Angle (0-359)
Spread (0-359, aka Width)
Distance (0++)

I can decide the brownish lines using a simple bit of math:

Angle_A = Angle + (Spread / 2)
Angle_B = Angle – (Spread / 2)
Angle_Target = Point_Direction(origin, object_position)

Now I thought of comparing these with the position of each object with a simple if/then statement:

If (Angle_A > Angle_Target) && (Angle_B < Angle_Target) Then Angle_Target is between A and B

This works… untill Angle_A or Angle_B pass the 0-360 threshold. 0* is between 45* and 315*… but the above if statement wouldn’t work. We can then determine which direction to check based on the size of the cone…

And what if the cone effect is larger than a 180* cone?

I’m not sure of the answer. I’m pretty sure I should be using Radians… But I do not understand the concept of Radians. if someone can point me in the right direction, perhaps show me an example somewhere, that would be wonderful!

I will continue to do my own research in the mean time.

  • 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-05-20T09:51:25+00:00Added an answer on May 20, 2026 at 9:51 am

    You may consider a simple transformation which sets your coordinate system such that Angle_B is zero. In other words, instead of testing

    Angle_B < Angle_Target < Angle_A
    

    you may also use

    0 < Angle_Target - Angle_B < Angle_A - Angle_B
    

    If you apply a modulo 360° to all terms you’re logic should work:

    0 < (Angle_Target - Angle_B) % 360 < (Angle_A - Angle_B) % 360
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not really sure how to title this question but basically I have an
Well basically I have this script that takes a long time to execute and
Im trying do this basically: var tr = document.createElement(tr); var td = document.createElement(td); td.appendChild(document.createTextNode('<input
What are the different types of encapsulation? Am I right in thinking this basically
I know that in C#, if you write ~MyClass() , this basically translates to
Basically this code below returns the right information, but I need to add the
I have written a secure TCP server in .NET. This was basically as simple
I basically want to do this: grep 'example.com' www_log > example.com.YYYY-MM-DD-H:i:S.log ...with of course
Basically what I want to do it this: a pdb file contains a location
Basically you have two ways for doing this: for (int x = 0; x

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.