What would the rotation vectors be for a torus using simple toroidal coordinates (toroidal and poloidal coordinates)? - rotation

https://en.wikipedia.org/wiki/Toroidal_and_poloidal_coordinates
For example, I see there are the basic rotation matrices for each axis shown in 1 but how would I find that in toroidal coordinates?

Related

Using a homography matrix and decomposing it to find the orientation of a plane fixed in the centre

I currently have two images of a plane in real life from straight above. One to use as a reference image, and another when the plane has undergone a rotation fixed at the centre of the plane thus changing its orientation. The camera stays at a constant position.
I was wondering if I found the homography matrix of this rotation in opencv and then decomposed the homography matrix in order to find the rotation matrix whether this would yield accurate results and I would be able to find the three angles needed to describe the planes rotation in euclidean coordinates to a reasonable degree of accuracy.
Thanks

How to compute 3D rotation matrix by user movement of control point

I have a projected view of a 3D scene. The 2D points are computed by multiplying the 3D points in homogenous coordinates by a view matrix (which includes a translation and rotation) and a perspective matrix. I want to allow the user to move control points which describe the three axes, and update the rotation matrix based on this.
How do I compute the new rotation matrix given a change in projected 2D coordinates, assuming rotation around the origin? Solving for the position of the end of the single axis has a large degeneracy in the set of possible, but maybe solving for rotation in the axes perpendicular to the moved axis might work.

how to plot 3D spheres around points with different radius and different origin in Matlab

I have matrix A with size 5x3 which includes 3D (X,Y,Z) coordinates of some points and these points should be center of the spheres. and a vector B with size 5x1 which includes radius of each sphere. How can I plot the spheres around the points with defined radius in vector B and defined center in Matrix A?
Form Matlab docs
Description
The sphere function generates the x-, y-, and z-coordinates of a unit sphere for use with surf and mesh.
sphere generates a sphere consisting of 20-by-20 faces.
sphere(n) draws a surf plot of an n-by-n sphere in the current figure.
You'll need to scale those points by the radius of your sphere and translate them to the appropriate centre. Then plot them. 10 seconds of searching matlab documentation gave me the code to do that as well as to plot the spheres using the surf command.
surf
Create 3-D shaded surface plot

Perspective transform given point (x,y) in quadrilateral plane to Rectangle plane's point (x', y')?

I am trying to transform quadrilateral to rectangular plane And need to extract coordinate of 1 specific point (in quadrilateral plane), to that in respect to rectangular plane..
I'm using EmguCV for image processing purpose in my .NET project
What I've tried is:
1) Calculate Homography matrix between quadrilateral and rectangular plane (specifying points in clockwise order from left top corner for both planes)
2) Multiply above Homography matrix by 3 x 1 matrix [x,y,1] to get final coordinates.
However, the resultant coordinate (x', y') does not seem in concordance with given point (x,y).
As Micka suggested, after having resultant matrix (3x1), all that is needed to solve this problem was this: p' = (x'/z', y'/z')
Steps as below:
Calculate Homography matrix between quadrilateral and rectangular plane
Multiply this homography mat. with candidate point [x,y,1]T and get [x',y',z']T
Now, Dehomogenize above [x',y',z']T i.e. [(x'/z'), (y'/z'), 1]T
thus, the required final coordinate of rectangular plane.

How to get rotation angles of Image Plane relative to the World Plane?

So we have such situation:
In this illustration, the first quadrilateral is shown on the Image Plane and the second quadrilateral is shown on the World Plane. [1]
In my particular case the Image Plane has 3 quadrilaterals - projections of real world squares, which, as we know, have same size, lying on the same plane, with same rotation relative to the plane they are lying on, and are not situated on same line on plane.
I wonder if we can get rotation angles of Image Plane to World Plane knowing stuff described?
In my case as input I have such data structures: original image (RGB pixels), objects (squares) with angles points in pixels (x,y) on Image Plane.
Take a look at Sections 2 and 3 of Algorithms for plane-based pose estimation.
The methods described there assume that you know the (x,y) coordinates of the features in question - in this case the red squares.
The problem you are describing is generally known as pose estimation - determining the 3D orientation and position of an object relative to a camera from a 2D view. For you, the object is a plane. Googling 'pose estimation plane' should give you more sources.

Resources