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
62 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
84 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
146 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
51 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
15 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
25 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
63 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
50 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
164 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
48 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
30 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
74 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
40 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
84 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
46 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
170 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
26 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
45 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
99 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
122 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
79 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
55 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
186 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
33 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
69 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
74 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
208 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
61 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
48 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
113 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 ...
4
votes
3answers
209 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
103 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
84 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
273 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
213 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
282 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 ...
-1
votes
2answers
620 views

How can i wrap the earth image around a 3D Sphere using OpenGL, GLFW, GLAD, GLM?

Please help me out with this thing and currently i am a little more than a beginner so please tell me in that context. i don't need any obsolete methods for creating this like using GLUT or GLEW.can ...
0
votes
0answers
87 views

Moving a sphere in a basic ray tracer

I have written a really basic ray tracer. It generates primary rays and sets the colour of the pixel to the colour of the object that I have set myself. The code for which can be seen below. ...
0
votes
0answers
58 views

How to find matrix that projects 3d points into 2d plane centered in the origin?

I have a list of 3D points defined by Cartesian coordinates, i.e. [(x1,y1,z1), (x2,y2,z2), ..., (xn,yn,zn)]. I want to project them to a 2D plane which has origin in the center (0,0,0) but which is ...
5
votes
1answer
196 views

What are affine covariant regions

I am trying to understand this seminal paper. I read this post on what affine transformations and my understanding is that affine transformations are transformations that preserve parallelism of lines ...
0
votes
1answer
126 views

Inflate 3D mesh into sphere

I am after a simple (not necessarily efficient) algorithm to "continuously" transform a closed surface mesh into a sphere. It seems that Blender is able to do this quite well: https://docs.blender....
1
vote
1answer
3k views

What is the difference between world coordinate, viewing coordinate and device coordinate in computer graphics?

The 2D pipeline involves with the construction of world coordinate scene followed by converting world coordinate to viewing coordinate, then transforming viewing coordinate to normalized coordinate ...
1
vote
2answers
219 views

How to calculate interpolation between multiple skeleton poses?

I found out that I should use spherical linear interpolation to blend two poses of a joint. I cannot find what to do if I have hundreds of poses to blend except applying the SLERP iteratively. What ...
4
votes
1answer
397 views

Camera Model View transformation in Ray Tracing

I am implementing my own simple ray tracing and I came across some sort of confusion. When defining the verticies in the world I multiply them by the modelView transformation system (the matrix ...
0
votes
1answer
80 views

How to scale primitive shapes [in Blender] so that they are within a [unit] sphere?

I wonder how is it possible to scale all shapes so that they are within boundaries of a [unit] sphere? I know how to do this for a cube: if radius of the sphere is S...
0
votes
1answer
130 views

Ray tracing the next week: understanding Instances

My question is not about the code, but it's about the approach used by the author Peter Shirley (and apparently common practice in ray tracers) of handling Instances. To understand the question it's ...
0
votes
2answers
400 views

transformation from cartesian coordinates to spherical coordinates without calculations

Given this graph in the 3d cartesian coordinates i should figure out the spherical coordinates representation but without the use of calculations . I've been trying to solve this the whole day but i ...