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 7931453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:43:22+00:00 2026-06-03T20:43:22+00:00

I have a 3D unity vector pointing in a certain direction. Now I want

  • 0

I have a 3D unity vector pointing in a certain direction. Now I want to get a new unity vector which is 45 degrees tilted from the direction of that vector, in which direction exactly has to be random. Does anyone know a way to compute that new vector?

(Alternatively, this may be expressed as the rotation of a 3D point around the origin in a random direction by 45 degrees.)

To remove the ‘random’ component: I am happy if I can find ANY vector that is 45 degrees tilted from my old vector, because then I might be able to rotate the end point of that vector a random distance around the old vector.

  • 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-03T20:43:24+00:00Added an answer on June 3, 2026 at 8:43 pm

    Let’s say you have a vector v1. First, you should find a vector v2 which is perpendicular to v1. Then the vector you want to find out is half between v1 and v2, that is v3 = norm(norm(v1)+norm(v2)). And how to find v2? You can take a cross product of v1 and any vector which is not parallel to v1. So you can do something like this:

    v2 = cross(v1, (1,0,0));
    if (dot(v2, v2) < 0.001) v2 = cross(v1, (0,1,0));
    v3 = normalize(normalize(v1)+normalize(v2));
    

    Finally, the angle between v1 and v3 is 45 degrees.

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

Sidebar

Related Questions

I have a function that converts from my own implementation of a 3D vector
I have MVC webApi application which works with Unity . I have to resolve
I have a small 3D vector class in C# 3.0 based on struct that
Let's say I have two items: a unit direction vector, and another arbitrary vector.
I have a vector class that has it's Equals(object obj) method overridden so that
Suppose I have an object which is defined as an array of vector points,
I have a program that prints the cube and which can be rotated. Here's
I have the following piece of code for a graph: barplot(as.vector(t(mat1[1,3:ncol(mat1)])),las=2) that I would
Using Unity in an ASP.Net MVC 2 app I have various dependencies on Controllers
I have an configuration error with Unity. I am trying to implement http://unitymvc3.codeplex.com/ ,

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.