Rotation of a point about vectors

In summary: However, you seem to have done a lot of calculations. It would be best if you were to ask a specific question about a particular step in your process.In summary, the conversation discusses finding the angle between the normal of a billboard and a vector from the camera to the billboard in order to rotate the billboard normal towards the camera. The dot product is used to find this angle, and the rotation can be expressed as a linear transformation. The speaker also mentions a possible issue with the rotation only being about the y-axis and suggests using only the x and z coordinates for the camera and billboard.
  • #1
Bucky
82
0
I have two points in 3d space, cameraPosition and billboardPosition. In addition to this i have their normals.

I want billboardPosition to be rotated so that its normal points at cameraPosition.

basically...I'm stuck.

I've found the equation of the vector that passes through both points using equation (18) on http://mathworld.wolfram.com/Line.html" (its the correct one to use yeah?).

So how do i go about finding the angle between billboardNormal and the line i found? also is this the easiest way to go about matters or is there a faster/easier method?
 
Last edited by a moderator:
Mathematics news on Phys.org
  • #2
For conciseness you have c and b (cameraPosition and billboardPosition). You also have n, the normal to the billboard. The vector from b to c is c - b. You can find the angle between c - b and n by using the dot product (this is how an angle can be defined in 3 dimensions):
[tex]x \cdot y = |x| |y| cos \theta[/tex] where theta is the angle between x and y so
[tex]cos^{-1} (\frac{x \cdot y}{|x| |y|}) = \theta[/tex]
So you can rotate the normal by the angle [tex]cos^{-1} (\frac{(c - b) \cdot n}{|c - b| |n|})[/tex]
The dot there is the dot product, and the || signs mean the length of the vectors, calculated by (x^2 + y^2 + z^2)^(0.5) if the vector is (x, y, z).

I don't know that rotation is exactly what you want though. Do you want other stuff to move with this vector when you rotate it? In that case you should express the rotation as a linear transformation with b at the origin.
 
  • #3
ok i had written out a long step by step of what I am doing but I've realized my problem is much simpler than what i thought it was.

i think my problem is I am only rotateing it about the y-axis (its "fixed" to only change in the x-z plane) but its calculations take into account the y-position of the camera...not good.

is there another method i can use to only use the x and z coordinates for the camera and billboard?
 
  • #4
You have not made clear just what it is that your program needs to do.
 

Related to Rotation of a point about vectors

1. What is rotation of a point about vectors?

Rotation of a point about vectors is a mathematical concept that describes the movement of a point in a two- or three-dimensional space around a fixed axis or line. It is a transformation that changes the position of a point relative to a given point or vector.

2. What are the different types of rotations?

There are three main types of rotations: counterclockwise rotation, clockwise rotation, and rotation about a specific point or axis. Counterclockwise and clockwise rotations are defined by the direction of the rotation, while rotation about a specific point or axis involves rotating a point around a fixed point or line in space.

3. How is rotation of a point about vectors calculated?

The rotation of a point about vectors can be calculated using mathematical formulas, such as the rotation matrix or the quaternion formula. These formulas take into account the angle of rotation, the axis or line of rotation, and the coordinates of the point to determine the new position of the point after rotation.

4. What are some real-life applications of rotation of a point about vectors?

Rotation of a point about vectors has many real-world applications, such as in computer graphics and animation, robotics, and navigation systems. It is also used in physics to describe the movement of objects in space, and in engineering for designing and building structures that require rotational movements.

5. How does rotation of a point about vectors differ from translation and scaling?

Rotation of a point about vectors is a transformation that changes the position of a point in space, while translation and scaling involve changing the size or location of an object. Translation involves moving an object along a straight line, while scaling involves changing the size of an object in one or more dimensions. In contrast, rotation involves changing the orientation or direction of an object in space.

Similar threads

Replies
3
Views
901
Replies
2
Views
1K
Replies
2
Views
1K
  • General Math
Replies
3
Views
2K
Replies
7
Views
907
  • General Math
Replies
11
Views
2K
Replies
4
Views
811
Replies
32
Views
1K
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
5
Views
1K
Back
Top