Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by NoUJoe · Jan 12, 2015 at 02:01 AM · mathvector2pointcircleclosest

Maths: Given a point on a circle and a fixed length line. Find the next closest point on the circle.

This one's got me. Look at the image, I have the green X and the blue line's length, but I need the red X's position. Not sure if I need to be calculating a direction or not? Thanks in advance.

http://oi59.tinypic.com/6pc8wg.jpg

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Owen-Reynolds · Jan 12, 2015 at 05:00 PM 0
Share

Like you wrote, it's a math problem. $$anonymous$$ath sites will give better answers. There's a good chance the solution is in your old High School trig textbook.

avatar image NoUJoe · Jan 12, 2015 at 07:07 PM 0
Share

I tried various searches but nothing came up. It's hard to word my problem to search for.

I'm also british, so high school doesn't exist. We have terrible education, we did very basic trigonometry, never made it past SOH CAH TOA sort of stuff. They also made it seem so very very boring, no one was interested, they never once mentioned what fun things you could actually do with it. We all just saw letters and numbers together and were like "noooo". Even when we asked what can be done with trigonometry, the $$anonymous$$chers said "a lot". When it came to the actual $$anonymous$$ching, we were just made to do like 50 very slightly different problems at a time. Just to get the pattern fixed in our heads, no explanation as to what the results mean, what they are used for etc. I was in the highest class aswel so I hope that says something. We were hardly ever given textbooks, and when we were, they were given out in class, and only for use in class, never outside of class.

Sorry for the rant!

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by dagon · Jan 12, 2015 at 02:54 AM

you need have circle center postion O

you should calculate angle bettween O-Xred and O-Xgreeen angle A = 2*arcsin((blue line's length/2)/(O-Xgreeen length))

last you can calculate O-Xred by rotate O-Xgreeen angle A by multiply O-Xgreeen with quaterion euler of A

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Kiwasi · Jan 12, 2015 at 03:03 AM 0
Share

Yeah that beats my solution. Didn't think to approach it that way.

avatar image NoUJoe · Jan 12, 2015 at 06:59 PM 0
Share

Perfect! Thank you!

Bored$$anonymous$$ormon you provided some good reference tho, good stuff to know!

avatar image
0

Answer by Kiwasi · Jan 12, 2015 at 02:45 AM

This problem is the equivalent of finding the intersection of two circles. Try googling that and see if you come up with a suitable algorithm.

Note that there are two solutions to this problem, you will have to do a sanity check to figure out which one is correct.

This link looks pretty decent.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

28 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Find distance around a circle, from center point and another point 2 Answers

Calculating a point on the edge of a circle 1 Answer

Closest point on multiple lines? 2 Answers

Find point on line given x and z coordinates 2 Answers

Dotted line bouncing on Unity 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges