# Questions tagged [transformations]

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

228 questions
Filter by
Sorted by
Tagged with
1 vote
33 views

### Animation issue using BVH data in OpenGL

I’m currently working on a project involving animation programming using OpenGL and BVH (Biovision Hierarchy) data for animation, and I am trying to get my head around it. I’ve run into some issues ...
1 vote
55 views

### Avoiding gimbal lock in spherical movement around an object - Python

I am programming a camera viewer in Python to move around an object on a sphere given YPR Euler angles (intrinsic) from the user. Everything seemed nice until I pitched the camera 90 degrees up/down. ...
53 views

### Computer Graphics Previous Year Question asked in UGC NET 2021

What is the transformation matrix M that transforms a square in the x-y plane defined by (1, 1)T (-1, 1)T (-1, -1)T (1, -1)T to a parallelogram whose corresponding vertices are (2, 1)T (0,1)T (-2, -1)...
17 views

### How can I generate a reflectance map using a perspective camera?

In simple words, a reflectance map is a function f(n) that map a surface patch with normal n to its reflected radiance given a ...
60 views

### Calculating world coordinates of a pixel from a camera picture

Sorry for this question. I know there are many similar questions but I really know nothing about math that involves this case. I have a picture taken from a camera. I know some information about this ...
1 vote
58 views

### Normal Map Under rotation Issue

I have been trying to apply normal maps to a rotating sphere with light shining directing from above the sphere (0,1,0). but lighting does not look correct under rotation as one side of the sphere ...
132 views

### Rendering light balls: Where to do perspective calculations?

After rewatching Bisqwit's starfield renderer video, I've decided to try to rewrite the program in order to learn more about compute shaders and shader programming in general. My knowledge at this ...
61 views

### Non Uniform Scaling vs Shear in Image Transformation

I am reading computer graphics. I am unable to distinguish between Non-uniform Scaling and Shear. Can someone explain the difference with two different examples?
1 vote
127 views

### Converting points, vectors, normals between world and object space for a ray tracer gives weird results

I'm writing a ray tracer but having trouble converting rays and normals between world space and object space. I am creating a Ray, then transforming it with transformation matrices, calculating ...
69 views

### How to apply transformation matrices from multiple primitives on a mesh

I'm working on some code to convert a 3d geometry from IFC to gltf/glb. One of the challenges I'm facing with this is that - IFC provides transformations for each primitive separately i.e., if I have ...
57 views

### Camera Perspective of 2D X/Y Plane

I'll start with the coordinate system I'm trying to use: If I were standing on the ground, facing north, the x axis is a line moving from the west to the east (positive X is east). Positive y is ...
1 vote
155 views

### How to apply a linear transformation to gltf data

I am trying to transform the mesh data in a gltf file and then modify the skin and animation data accordingly. Let's say we want to transform the data using a 4x4 homogeneous matrix. For ...
92 views

### OpenGL - How to increase view space coordinate range in X and Y axis

I'm trying to render some objects but apparently X and Y coordinates need to be really small in-order to get something on screen. See this example of 2 lines The world space coordinates for these ...
159 views

### Translation from object space to the world space

I’m stuyding computer animation with this book, Computer animation by The Morgan Kaufmann series. The explanation for translation from object space to world space is difficult to understand. In more ...
41 views

### Alignment of the plane coordinate system with the square is similarity transformation

I'm reading the book "Multiple View Geometry in Computer Vision" of Hartley and Zisserman. There was something I was unable to understand correctly. Here's the example where K denotes ...
1 vote
76 views

### Perlin noise is mysteriously ignored when the pattern is rotated 45 degrees

I am creating different coloring patterns for my CPU raytracer, such as checker, gradient, ring, stripe pattern etc. The problems started when I tried to create a perturbation pattern (of a subpattern)...
1 vote
416 views

### Confusion surrounding Gimbal Lock

I'm having difficult understanding the issue with gimbal lock, namely why so many diagrams show an aircraft in apparent gimbal lock unable to turn about an axis conventionally, using yaw/pitch/roll. ...
132 views

### Finding Camera projection matrix from known input and output

Lets say I have a rectangle with known coordinates in 3D scene, and I'm projecting it using pin point camera to the plane (screen). You can imagine it deforms on the screen per camera transformation ...
1 vote
186 views

### Understanding camera of a CPU raytracer from "Ray tracer challenge"

I am following a book "Ray tracer challenge" by Buck, but it doesn't explain anything. The code works, but I don't properly understand, why. The code is as follows: ...
145 views

### View rotation matrix

Im unsure about how I could describe what im trying to achieve in few words or a title so ill go on to describe it. So I have voxel, in 3D space, represented solely by its center. The voxel though, is ...
1 vote
447 views

### How to determine transformation matrix for an object given a graph?

I am given this image: and asked to determine the transformation matrix that took me from ΑΒΓΔΕ(let's call it ABCDE for convenience) to Α'Β'Γ'Δ'Ε' (A'B'C'D'E'). I am also given the solution, so as to ...
204 views

### Convert one triangle to another in matrix4x4?

The context openGL instances learning. I want to transform a reference triangle to another one. So final goal is to have one triangle and the instance being a transformation of that initial triangle. ...
1 vote
869 views

### What are viewport transformation matrixes for this coordinate system?

I have a set of vertexes (x, y, z) in normalized device coordinates. Its x, y, and z values are in the range (-1, 1). Normalized device coordinates use the left-handed coordinate system, as shown ...
1 vote
55 views

### What is view transformation and model transformation respectively? How do I implement each transformation in simple opengl program?

I want to know what is view transformation, and what is model transformation respectively, and what methods/functions in opengl could be applied to implement each transformation. Just simple ways to ...
1 vote
71 views

### What fields should a camera class have?

For a good and scalable project structure, what fields would you add to a camera class, apart from its position and orientation? Should I add the near and far planes? Or should that be global, what ...
1 vote
132 views

### Confused with Coordinate Transformations

I'm studying coordinate transformations from the book Fundamentals Of Computer Graphics - Peter Shirley, Steve Marschner The book first shows It then says: "We call this matrix the frame-to-...
143 views

### How to translate screen coordinates of a 3d point as the viewport size changes assuming camera state remains constant?

Okay, so let's say I have a point in 3d. And I have a camera state. That is, I know the camera position, the camera target and the camera up vector. I am using the perspective projection to get the ...
1 vote
452 views

### Raytracing and transformation

So I'm looking at incorporating instancing to my ray tracer. However what I would like some insight on is what to apply the transformation to?. Most suggest to apply the inverse transformation to the ...
1 vote
117 views

### How bits transformed into graphics?

recently i started studying computer science and computer graphics, and one question really haunts me. Mby someone can explain this. How bit patterns become translated into (for example ) text. I know ...
26 views

### Is it possible to separate or split original images (or videos) from a blend image (or video)

The title says it all. Blended image or video contains multiple image or video blended on top of each other. I am looking for any software or tools that can separate the original images or videos. ...
1 vote
246 views

### Receiver plane depth bias - matrix explanation / derivation

This source on slide 38 on receiver plane depth bias I can find compute a matrix (Jacobian of screen space uv derivatives) which is used to transform the screen space depth derivatives from screen ...
53 views

### Can an aspect ratio be shortened to one value, best practise

I want to make a program that, for starters, list all image files in a folder and writes a warning if one dimension is (i.e.) double (2x) the other dimension, regardless of "image orientation&...
337 views

We know that any 2D point $(x, y)$which represents as 3D homogeneous coordinates is of the form $(x, y, 1)$ which is the points of projective plane $P^2.$ If I use the same concepts for 3D points $(... 0 votes 1 answer 276 views ### Perspective transformation is perspective projection? [duplicate] I know that ( Reference )in transformation source and destination has same coordinates dimensions. But in projection destination coordinate system has fewer dimensions than the source coordinate ... 1 vote 5 answers 2k views ### Existence of vanishing point Consider the following example of perspective projection: I have one railway track with two parallel lines meeting at the point$X$at infinity which is the theoretical approach. This X is called the ... 1 vote 0 answers 62 views ### 3D shearing w. r. t$x$-axis [closed] Shearing in$X$axis is achieved by using the following shearing equations-$X_{new} = X_{old}, Y_{new} = Y_{old} + Sh_y × X_{old}, Z_{new} = Z_{old} + Sh_z × X_{old}.$My question is during$Y_{new}... 652 views

### Difference between 2D and 3D pipeline

2D transformation and viewing: The camera projects the 2D world co-ordinate $(x_w, y_w)$ on its projection plane which co-ordinates $(x_v, y_v)$. 3D transformation and viewing: The camera projects the ... 102 views

### How to Achieve Radial Rendering

I'm making a POV fan and would like to display some simple graphics in real-time on it. I have a working naive solution with OpenGL, but I'm maxing out at 7 fps rending a simple cube on a raspberry pi ...
226 views

### Parallel projection is special case of perspective projection

I synchronized with @David k's first and second answer regarding perspective and parallel projection. From the first question I understand that the image on the screen is typically described in ... 714 views

### Difference between transformation and projection? [closed]

We know that world coordinates $(x_w, y_w)$ transform to viewport coordinates $(x_v, y_v)$ which are the physical device coordinates. And during projection, any point $(x, y, z)$ projects to $(x, y)$ ... 1 vote
77 views

### Why shearing coefficients multiplying by y? [closed]

We know that shear is transformation that distorts the shape of the object. Shear relative to X-axis that is $y=0$ line can be written as: $x'=x+sh_x.y, y'=y$ My question is why $sh_x$ is multiplying ... 2k views

### Gimbal lock confusion

I am trying to understand exactly what is happening when Gimbal lock occurs. I have read many explanations now which provide the high-level idea, in that Gimbal lock occurs when two axes are aligned ...
212 views

### How do I perform a perspective transform on a straight line?

I'm trying to make a software renderer, but I want to avoid creating extra triangles with clipping. For this I want to transform lines which compose triangles, instead of individual points. However I'...
43 views

### Efficient algorithm for mesh scale adjustment based on the scale of another mesh

I have a mesh (Mesh-A) with a bounding box of some arbitrary size defined by X,Y,Z scale. In runtime I import another mesh (Mesh-B),which has an overall topology similar to the Mesh-A, but it can have ...
1 vote
49 views

### Proprietary 3D Format Reverse Engineering: What Could These Numbers And Matrices Represent?

I'm trying to reverse engineer a model format from an older Russian game (Pathologic) with limited success. It is a proprietary model format not recognized by any converters/editing tools (believe me, ...
654 views

### Why perspective division ( div by w) when applying the inverse to a perspective transformation?

For example, when you want to compute the world space position of a fragment in the fragment shader, you can construct the fragment's NDC coordinates, then multiply by the inverse of whatever ...
166 views

### Simulate projection matrix deformation in two camera setup

For educational purposes I'm trying to simulate what a scene would look like with a perspective matrix deformation (before everything is brought to NDC) but I'm unsure how to do this. I'd like to do ...
124 views

### How compute new camera parameters given a velocity vector?

My goal is to update camera parameters given a velocity vector so that the camera points in the direction of the velocity vector. How should one compute the update matrix for the camera parameters?
1 vote