Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [transformations]

Transformations are mathematical operations that can be applied to an object to change its scale, position and orientation.

6
votes
1answer
1k views

Why do I need to inverse the orientation matrix of a camera to be able to translate it in the direction it is facing?

I've been going over some OpenGL learning resources and one of them is this article: Modern OpenGL 04 - Cameras, Vectors & Input in which the author presents an approach to building a ...
2
votes
0answers
103 views

How is it possible to generate geometries using space folding?

There is a TED presentation, where we see really good looking geometries, which are generated using space folding. I get the general idea, that we start from a basic geometry like a cube, and then ...
3
votes
2answers
749 views

Inverse-Transpose of Vertex Normals

For the past month, I have been learning on my own and writing a little graphics library and am currently working on the transformation of vertex normals to soon support lighting/shading. I understand ...
3
votes
2answers
337 views

How to get camera Right vector when Front vector and WorldUp vector are collinear

Get the title problem when implementing a walkthrough camera. I use normlize(cross(WorldUp, Front)) to get Right vector. And when they are collinear, I get a zero vector. Is there any more robust ...
4
votes
3answers
595 views

Point of view and rotation

Two questions which cross over maths/3D imaging/computer science. I'm trying to describe a point of view of an item in a 3d space and subsequently its rotation in a paper I'm writing. Versions I've ...
3
votes
1answer
121 views

Image resize with pixel accumulation?

I have a grayscale image and want to "resize" it in terms of "pixel concentration". That means I divide the source image x_old * y_old into ...
7
votes
2answers
238 views

Color transform algorithm (that also works on saturation and value/lightness)?

To change particular colors in an image, generally you multiply the RGB by a transformation matrix. Image manipulation programs such as gimp & photoshop have a selective color change function that ...
4
votes
2answers
211 views

Suggested image preprocessing before applying threshold

I am trying to vectorize the contours (skewed rectangle) of the TV in the following original image. My first step is applying threshold. Tried selection of threshold values based on what skimage has ...
4
votes
1answer
88 views

Store 3d coordinates in a 2d image?

How can i store the X,Y,Z vertex points of a mesh into a 2d image, such that reading the image pixel values will correspond to the 3d coordinates? is it possible to just store x, y, values on a grid ...
5
votes
1answer
349 views

Rotation matrix for a 3D object in space

This is the follow-up question from here: Minimum requirements to uniquely represent a 3D object in space Assume I have 3 original points in a 3D object (in 3D space) as ...
4
votes
2answers
223 views

Minimum requirements to uniquely represent a 3D object in space

Let's assume we have a 3D object (in 3D space). We get a single representation vertex from this whole 3D object. Given the fact that the object can be moved and rotated in the space in any direction, ...
1
vote
1answer
74 views

Transformation between aspect ratio

I am trying to measure width of an object in image. The object size is 2D object 15cm X 15cm. When I capture a frame with resolution 1280 X 720 (16:9) I am getting that the object width is 50px. But ...
1
vote
0answers
231 views

Tilting a 3d object to face a camera and have it look like it's spinning on the y axis

I have a scene kit app I'm working on and at a certain point I move the camera under a list of objects and tilt it up to give a star wars type view of them. I then need to pull the objects up one at a ...
3
votes
1answer
31 views

Getting from the default view volume to an image on the screen

I don't completely understand the last part of the MVP matrix (projection). In orthographic projection we simply scale the view volume into the default view volume (+-1 on all axis). In perspective ...
4
votes
0answers
108 views

Calculate Camera parameters and HandEyeCalibration

I'm trying to calculate camera paramters and a hand eye calibration (Transformation from camera to eye (display) coordinates) for rendering on a see-through HMD. I have already calculated a ...
4
votes
1answer
165 views

Calculate a rotation around an arbitrary axis

Suppose I have two 3D triangles before & after a single rotation around an unknown axis. How would I go about finding this axis?
5
votes
1answer
140 views

Calculate Transformation between two point sets - but with constrained Degrees of Freedom

How can I calculate the rigid transformation [R|t] between two 3d triangles, but restricted to a given N degrees of freedom (for N = 1..6) ? I know for N=6 I can get a least-squares solution via SVD ...
2
votes
0answers
112 views

With OpenGL, is it correct to apply model transformation to rotate the camera?

Having taken a basic CG course, I remember that transformations are relative, so rotating the camera is identical to rotating the view in the opposite direction. Right now I want to implement camera ...
5
votes
2answers
291 views

Can a scene graph be stored in the GPU?

I am starting to learn WebGL. Can a scene graph be stored in the GPU? Or is that type of thing more for the main thread (or webworker)? For example, I want to calculate some layout, and apply it as a ...
2
votes
2answers
1k views

Correcting my “look-at” matrix so that it works on non-camera objects?

I'm familiar with the "look-at" matrix and the goal of being able to rotate a Camera at a specific location towards a specified target. When I tell the ...
4
votes
1answer
95 views

translate coordinates relative to line segment

I need to write a function (in Javascript) that accepts the endpoints of a line segment and an additional point and returns coordinates for the point relative to the start point. So, based on this ...
6
votes
1answer
334 views

How to convert decomposed transformations between different coordinate systems?

I am converting some Unity3D scenes to a proprietary json format to be used by my OpenGL renderer that uses a different coordinate system from Unity's. I have multiple sets of {translation, rotation(...
4
votes
2answers
257 views

What's a parent vector space or coordinate system?

After asking this question, a few new terms that I had never heard of came up. Note, I'm quite familiar with linear algebra, but I've never heard these terms in the context of linear algebra. ...
5
votes
2answers
339 views

How is that possible that matrices can be thought as coordinate systems?

I've been reading around that matrices (for example, rotation matrices, but not only) can be thought somehow as coordinate systems. My question is: how is that possible? I've seen for example that ...
4
votes
1answer
143 views

Detect a lossy matrix decomposition?

I am writing a plugin to export data from 3DS Max. 3DS Max's geometry pipeline is... interesting. As part of my plugin I decompose a transform matrix into a translation, (quaternion) rotation & ...
6
votes
2answers
750 views

Rotating object around its own center

I am trying to implement Blades of Waving Grass and I am still stuck at the point where I need to achieve texture arrangements like in the figure below (the first one). So my plan is to draw the ...
3
votes
1answer
110 views

Ladder to DNA using Transformation Matrix

In my last Graphic mid-term, the exam contained a Transformation Matrices problem, its statement was: Question Rotate the following ladder to form a DNA-shaped ladder using a transformation matrix....
12
votes
1answer
854 views

Is it possible to turn a 3d rotation matrix (4x4) into its component parts (rotation, scale, etc.)?

To be more concrete, I'm working on an iOS app, and have a CATransform3D struct (basically a 4x4 transform array). Is it possible to deduce all the different "...
4
votes
1answer
275 views

Inverted yaw angle in the view matrix

I'm trying to construct a FPS view matrix for my OpenGL renderer using yaw and pitch angles instead of the typical LookAt view matrix. The view matrix is the ...
2
votes
2answers
1k views

how to map rectangular coordinate system onto JavaFX GraphicsContext canvas

I am trying to figure out how to apply the proper sequence of translate and scale commands (or a single .transform command) so that the default pixel grid (0,0,1920,1080) for instance is setup so that ...
5
votes
1answer
1k views

What is the correct order of transformations scale, rotate and translate and why?

This is a rather primitive question coming from an electronic engineer. When applying rotate (about origin), scale (in which we shall translate towards origin and then back) and translate, does it ...
6
votes
2answers
209 views

Why if we rotate an object by R and then translate it with T, from the object perspective, we're actually applying $-T$ and then $-R$

I've been introduced to local coordinates in contrast to the global ones which I was used to work on, where we have basically the camera at the origin. For example, I've the following picture of a ...
5
votes
1answer
496 views

Normal 2D photo to VR-compatible spherical photo

How to turn a normal photo like this one : into a photo that I can use in my game development platform (Unity3D). I just wrap a 3d sphere model with the photo and then it can be all around me when I ...
5
votes
1answer
2k views

Zoom in orthographic vs perspective projection

I have read through this article about perspective and orthographic projection matrices. I started playing with the perspective matrix and as expected if I either increase/decrease the field of view ...
5
votes
2answers
117 views

Correctness of logical steps for create the matrix of viewing transformation

In general, I understand the creation of viewing transformation matrix, but I have my doubts. For example, let's say that a world coordinate (called $A$) has a center at $(1,1,1)$, and the view ...
4
votes
1answer
293 views

Rotating an Object Around an Axis

I have a circular shape object, which I want to rotate like a fan along it's own axis. I can change the rotation in any direction i.e. dx, dy, dz using my transformation matrix. The following it's ...
2
votes
0answers
131 views

Transform a centered isosceles trapezoid in a rectangle in 2-D

I must convert a isosceles trapezoid to a rectangle in 2-D with a shearing transformation (or with 2 shearing transformations). The isosceles trapezoid is centered in the origin of axes. It is right ...
2
votes
1answer
351 views

Transforming fragment-to-camera to tangent space for parallax occlusion mapping

I'm trying to implement POM using this tutorial. As stated, I need to transform fragment-to-camera to tangent space and then pass it to a function. tangent space is computed using Assimp. Well I ...
4
votes
2answers
503 views

Rotate a cylinder from XY plane to given points

I am given geometry of a cylinder which lies on the XY plane with 1 unit radius. And given coordinates of 2 points in 3D I need to move the cylinder so that it connects the two points. What I tried ...
5
votes
2answers
746 views

Screenspace Normals - Creation, Normal Maps, and Unpacking

I'm trying to condense my Deferred Rendering G-Buffer. So I have some questions about getting 2-component Screenspace Normals. I know Frostbite and Killzone (the only two AAA company's G-Buffers I ...
7
votes
1answer
519 views

Animating a smooth linear transformation

After watching this video on matrices, I tried to make a simple animation of 2D linear transformations. Starting with a set of 2D points in a grid, I applied a 2x2 matrix to each point and obtained a ...
4
votes
1answer
139 views

Transformations about a Plane

I need to find the transformation matrix (homogeneous coordinates) that flips an object about a plane whose normal is directed towards (-2 2 0), and intersects the y-axis at y=2. I know how to do ...
4
votes
3answers
2k views

Computing a rotation: complex numbers vs rotation matrix

A 2D vector can be rotated by an angle $\theta$ using the rotation matrix: \begin{bmatrix} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} Or, it can be rotated by ...
5
votes
1answer
242 views

Transformation Matrices

Consider the following problem and its answer: Given 3 points in 3D: $A=(A_x,A_y,A_z); B=(B_x,B_y,B_z) ; C=(C_x,C_y,C_z)$ Find the transformation matrix (in homogeneous coordinates) that ...
2
votes
0answers
49 views

detect blurred zones after conversion to black & white

I'm working on a document storage project and i found a problem. After converting/compressing a scanned document to black & white sometimes, some areas of the document are unreadable because ...
7
votes
2answers
246 views

Is there a objective reason for matrix naming conventions?

I'm probably going to screw this up but.... In all the graphics libraries I've seen various matrices are often called something along the lines of ...
9
votes
1answer
278 views

Apply distortion to Bézier surface

I am trying to simulate the image warp effect, that is used in Adobe Photoshop. The rectangular image is warped according to a cubic Bézier surface (in 2D, all Z components are 0). Having any Bézier ...
4
votes
1answer
801 views

How to deform some mesh so that it fits along a spline curve? [closed]

Given a set of vertices, transforming them to fit onto some spline curve. For example 3D modelling software has extrude along curve and Unreal Engine has a spline mesh component that takes some mesh ...
1
vote
0answers
193 views

How to do keyframe interpolation on matlab?

I want to do keyframe interpolation in matlab. If I understand correctly, it uses splines to approximate the the motion of specific pixel points within the frames(through transforms). Correct me if I'...
3
votes
1answer
370 views

Object rotating around origin instead of object center?

I am implementing simple rotation but the object is not rotating around the local center instead it is rotating around world origin. This is the code: ...