Questions tagged [transformations]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
9 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 ...
0
votes
1answer
26 views

Parallel projection is special case of perspective projection

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

Difference between transformation and projection?

We know that world co-ordinate $(x_w, y_w)$ transforms to viewport co-ordinate $(x_v, y_v)$ which is physical device co-ordinate. And during projection any point $(x, y, z)$ projects to $(x, y)$ into ...
1
vote
1answer
48 views

Why shearing coefficients multiplying by y?

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 ...
5
votes
2answers
1k 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 ...
0
votes
1answer
50 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'...
0
votes
0answers
41 views

Reorder mesh triangles

Good Morning! My problem is: I need to get the vertices of a mesh and send them to a shader. Inside the shader I will reassemble the mesh from its vertices. So far so good, I send the information and ...
0
votes
1answer
27 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 ...
0
votes
0answers
13 views

How to get the surface alignment

How can I get the surface alignment of a 3D object in screen space? I found this example which, I believe, is aligning the UV coordinates to the 3D vectors (which are determined by their current ...
1
vote
0answers
40 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, ...
3
votes
1answer
63 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 ...
0
votes
1answer
76 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 ...
0
votes
1answer
88 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
2answers
152 views

What is this graphical effect called?

I was watching this trailer: https://www.youtube.com/watch?v=pWh5388AEHw and at 1:22, the player used a magic trick that created a sphere that warped the projection of the scene. Does anyone know ...
1
vote
1answer
57 views

How to use trackball for rotating an camera matrix in eye frame

I have a QOpenGLWidget where I use camera transformation matrix(4,4), FOV and vectors Position(4), Up(4), Forward(4). I also have an ArcBall which I can use. I managed to implement zoom and pan by ...
0
votes
0answers
17 views

Translate the camera with Pan gesture (when it is rotated )

I am new here I am not good in math SO what I need is I need to translate the 3D camera with Pan gesture on 2d Screen With below code it is working But if camera has some Euler Angle (rotated ) then I ...
0
votes
0answers
26 views

Using 2D point/polygon algorithms on polygons lying on a arbitrary plane

Is there an efficient method to apply 2D point/polygon algorithms on general planar points. For example, I need to triangulate a polygon where the input is a list of ordered points. The algorithm ...
1
vote
2answers
64 views

Why is browser-resized image crispy and manually-resized image blurry?

I've come across this problem several times now and I can't really understand what causes it; my background is in Wordpress, not really in computer graphics. I hope this is the right place to ask, I ...
0
votes
1answer
51 views

Path tracing: How to ensure we are sampling a direction vector within the visible hemisphere of a surface?

Given a surface Normal vector of an intersection point, how can one generate a random direction vector that is guaranteed to be in the visible hemisphere? The way I ...
0
votes
1answer
233 views

Transforming a ray from camera space to world space

I am writing a Raytracer and generating rays from the camera. I have a working program but slightly confused about the linear algebra concepts involved in transforming the ray from camera space to ...
0
votes
1answer
81 views

Rotate a Bitmap with Shearing

I am rotating a bitmap using the three shear algorithm documented in these articles [1][2]. From about 0-90°, the quality is acceptable, but beyond that it gets progressively more distorted until it's ...
0
votes
1answer
33 views

rotate objects like a trackball

I know how to rotate objects around the center and there are rotation matrices for that as well, but, how do we rotate the object like a trackball, below is the example: firstly I rotate around the y ...
1
vote
1answer
149 views

Rotating a Bitmap

I would like to rotate an bitmap image using math. I have two issues with my current implementation: the pixel-by-pixel rotation of the copied bitmap is extremely slow and it is leaving gaps between ...
0
votes
0answers
77 views

Help me understand the derivation of this tangent space to object space matrix

I was trying to follow this http://foundationsofgameenginedev.com/FGED2-sample.pdf But had problem understanding formula 7.33. $$p_i-p_j=(u_i-u_j)\mathrm{t}+(v_i-v_j)\mathrm{b}$$ * $p_i,p_j$ being ...
0
votes
0answers
43 views

3D Bouncing Cube

I'm trying to write a little program with a bouncing cube but I can't find the right x, y, z and angle for it. I have these lines: ...
0
votes
0answers
91 views

Model View Projection Matrix Multiplcation Order

I'm working on a simple software renderer and have a working implementation so far. I'm curious as to why it's actually working since I would expect the multiplication ordering for my world, view and ...
0
votes
0answers
55 views

Matrix transforming with translation/rotation/scale at center of screen

I'm trying to create a camera using matrix transforms, the gist as follows: ...
0
votes
1answer
350 views

THREEjs: updating an object's matrix doesnt change it's position and rotation params

I want to set a transformation matrix to an object upon creation and then control it by position, rotation and scale, but while changing the matrix does change the object in world space, it's position ...
0
votes
0answers
31 views

How to "preserve texture" when transforming vertices

Maya has a feature called preserve texture. It allows you to transform vertices of an object and basically have the texture "stay in place" in object space. Say I have a plane with unwrapped ...
0
votes
1answer
47 views

Could the Tetradic color pattern be expanded to allow /dev/random be "pretty" for cryptographic key purposes?

Is there a way to take a random value (or set of values), and cause them to create a "pretty" pattern (as a thumbprint), and that array of thumbprints might have a rendering mask on just for ...
1
vote
0answers
44 views

What's the name of the transformation that can remove horizontal convergence from a picture?

Say that you are taking pictures from a street like this one: As you can see, the picture is taken perpendicular to the direction of the street. The problem is that cars at the left look as if they ...
3
votes
1answer
113 views

Interpolate vertex attributes with $z$ AFTER homogeneous divide

Usually, if we want to interpolate some vertex attributes, say $A_1$, $A_2$ and $A_3$, we have to first divide them by their corresponding $z$ in view space, then we interpolate them using barycentric ...
2
votes
1answer
146 views

Transformations and change of basis in CG

Sometimes in CG literature a transformation is equated to a coordinate system change. This is fine as long as the transformation includes only a rotation and a translation. When scaling is involved, ...
1
vote
0answers
80 views

Why does my self-written rendering engine make further away objects look larger?

I am writing a very simple rendering engine. I have already made a few tests, but somehow the images it creates look wrong. Objects that are further away from the camera look larger than objects ...
0
votes
1answer
64 views

Converting Vertex and Index buffers to a File Format

I have many sets of vertex and index buffers that I’d like to render on to the screen. Ideally each model in different locations with-in world space. I’m actually doing a statistical study on spatial ...
3
votes
1answer
278 views

How to keep an object constant in screen space?

If you open the modern Blender UI and select for example scaling, and then you use the scroll wheel to "zoom" (move the camera along the radial axis). You will notice that the size of the 3D widget ...
0
votes
0answers
37 views

How to transform x-y-z red-green-blue arrows and draw them on 2D screen?

I'm making a raytracer and want to print debug arrows Blender example: Old version of 3d max: How do I do the same having camera forward, up and right vector? I think I need some kind of matrix ...
0
votes
0answers
71 views

Consistent Video Depth Estimation from Monocular Lens to approximate LiDAR?

If the iPhone had LiDAR sensors, it would be possible to generate a 3D point cloud that you could theoretically use to furnish a 3D AR reconstruction of your surroundings. E.g. you could create an AR ...
0
votes
0answers
29 views

Does rotating object inside unit cube [-1,1] by homogenous matrix move it outside unit cube

I am just trying to rotate my pointcloud object which is inside the unit cube ([-1,1] in all x,y,z axis). What I did is use the basic rotation matrix from wiki and extend it to homogenuous 4x4 matrix (...
0
votes
1answer
76 views

Apply Projective Transformation 2D Rectangle

I want to write code from scratch about Projective Transformation in order to apply this transformation to 2d rectangular. I searched about this transformation, but I could not figure out completely. ...
0
votes
2answers
259 views

What kind of transformation when the aspect is changed for a rotated shape?

I have a geometric shape (assuming that is a rectangle). I want to rotate it about it geometric center by an angle of 45° and plot the result using matplotlib with an equal aspect ratio, I get ...
0
votes
0answers
62 views

Estimate 3D cube pose after camera rotation

I have some photos of 3D cube. I also know the 3D pose of the cube in each photo (yaw, pitch, roll). I want to estimate the new pose (yaw, pitch, roll) of the cube after performing 2D rotation to the ...
0
votes
0answers
50 views

Transformation for aligning 3D object with reference frame of 3D turtle graphics

The problem I'm using a 3D extension of the well-known "Turtle graphics" to draw plants. My system works by maintaining a position $\vec{p}$ and three vectors: The heading $\vec{H}$ The "up" ...
1
vote
0answers
120 views

Apply transformation to single vertices in OpenGL in order to deform mesh

I'm making a 2D cell simulation game. The mesh for my cell is basically just a manually-generated triangle fan that looks like this. I would like to reproduce the wobbling/vibration effect on the ...
5
votes
3answers
244 views

Visualize the interpolated unit quaternion on the surface of the unit sphere

My major is mechanical, please forgive me for asking questions that may seem trivial to you. First, I'm reading the following paper: Dam, Erik B., Martin Koch, and Martin Lillholm. Quaternions, ...
0
votes
1answer
107 views

Compute Speed of Spheres in 3D animation

I have created two animations: One where a "camera" moves towards the spheres creating an optic flow (1st GIF).The code can be found here. One where spheres move randomly in a 3D coordinates space (...
0
votes
0answers
111 views

What quad will fill the screen, which can be inverse-projection-view transformed to map to the near frustum plane?

I've been experimenting with raytracing using GLSL. I had success rendering a cube which encloses the object. Now I want to do a full-screen raytrace, and I want to construct a quad which covers the ...
0
votes
1answer
312 views

Can pixels on the image plane be mapped to world space coordinates?

I'm trying to learn the fundamentals of 3d computer graphics by writing a toy framework in WebGL. I'm currently working on mouse based camera controls. There are plenty of good resources in the ACM ...
1
vote
0answers
226 views

Help with understanding the look-at function (the view matrix)

I've been reading this article about the look-at function. I don't understand the part when they're trying to inverse the matrix N. They say that R is orthogonal because all its row and column ...
2
votes
1answer
301 views

Use glTranslatef and shaders?

In newer OpenGL it's encouraged to use shaders and pass the model-view-projection as parameters. But what if I drew a complex object, and wanted to translate/rotate it and draw many copies? For ...