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 chillypacman · May 26, 2012 at 04:09 AM · directionmathplanevector

Tranposing two 3D coordinates onto a 2D plane?

I have two 3D coordinates, say (0,5,2) and (1,2,3).

From those two I want to sort of 'rotate' them around until both their z planes are 0, thus they become (x,y,0),(a,b,0).

What I'm thinking should be done is that I would get the direction vector between the two 3D points (1,2,3)-(0,5,2) = (x,y,z), then I'll rotate that direction vector that will make it become (0,1,0) and using the difference in that rotation rotate the original vectors.

But I have next to no idea and i'm not even sure how I could do it the way I outlined above.

Does anyone have any ideas how I can do this?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Berenger · May 26, 2012 at 04:43 AM

Why not projecting those coordinates on the plane (x0y), or said otherwise (0,5,2) and (1,2,3) becomes (0,5,0) and (1,2,0).

If this doesn't fit what you want, tell me and I'll move my answer into comments.

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 chillypacman · May 26, 2012 at 04:46 AM 0
Share

But in such cases what if the coordinates are (0,0,5) and (0,0,9)? If I just remove the z component they will become (0,0,0) and it will appear there is no difference between them. Like ideally if the coordinates are (0,0,1) and (0,0,0) when I project them to a 2D plane they become (1,0,0) and (0,0,0) assu$$anonymous$$g (0,0,0) is the pivot point.

avatar image Berenger · May 26, 2012 at 03:22 PM 0
Share

Two points in a 3D space belongs to an infinity of planes. As if, in that picture, every pannels are a plane and the vector going through those two points is the rotation axis, but there is an infinity of planes in between as well.

$$anonymous$$y point is that your two points are already on a plane. But if you want a particular plane, z = 0 in that case, you'll have to project them onto it. The orthogonal projection is the simplest, where you ignore z. Using a rotation does seems a bit strange though.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Converting an Azimuthal Coordinate to Vector3D? 1 Answer

Calculate a new position instead of using Vector3.back 1 Answer

[2D] Angle to Vector conversion 1 Answer

Check if position is inside area? 2 Answers

Finding the difference between two directions? 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