The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
0answers
20 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
46 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
46 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
41 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 ...
0
votes
1answer
148 views

How can i create a 3D Sphere(earth) 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
23 views

Customized editing of a 2D bitmap

Please excuse this basic question, as I'm new to computer graphics. Let's say I have a sprite that looks like below. I wish to programmatically transform the sprite such that the bitmap looks like ...
0
votes
0answers
42 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
25 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 ...
4
votes
1answer
46 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
58 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
227 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
84 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
111 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 ...
1
vote
1answer
33 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
90 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
121 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 ...
0
votes
2answers
69 views

Using transformations to get from A to B image

I try to solve this, First, I used scaling: $Scale(S_x,S_y)=S(\sqrt 5,\sqrt 5)$ So, I enlarge the bottom of the house and the sides, to the same size of B image. Later, I used rotation: $R(\theta)=...
0
votes
1answer
43 views

Define position and orientation in a local coordinate system

Suppose we have a world coordinate system W and a 3D model m1 defined in W. ...
0
votes
2answers
215 views

How to convert from Object space into World space (exercise from 3D Math Primer book)

This is not homework. I'm self studying Computer Graphics, using the book "3D Math Primer for Graphics and Game Development" (2nd edition). So there is the exercise 6 in chapter 3 which I can't figure ...
2
votes
1answer
59 views

My 2D translation matrix causes the box to be off screen when it shouldnt be

Now I know this isn't the way this is normally done so please bear with me. I am doing this this way so I know I have a solid conceptual understanding of everything that goes beyond example code. I ...
2
votes
0answers
30 views

Transforming arcs and perspective change

I have a SVG with group of independent arcs that move around common origin. On user event those arcs can change both their radii and start/end angles. On other user event the user can change view from ...
2
votes
1answer
254 views

Bump mapping with triangles and height maps

I'm trying to add bump mapping to my ray tracer, and I'm currently struggling to add bump mapping to it, as I don't seem to get the transformations from texture space to world space correctly. I have ...
3
votes
1answer
140 views

Need help with change of basis (world to camera frame)

I'm reading up on coordinate systems and geometric transformations but the change of basis topic still confuses me. I found this exercise but, honestly, I wouldn't know how to begin: Given a world ...
2
votes
1answer
60 views

Composition of decomposed transformations

Say I have a scene graph, and each node has a scale, rotation, and translation. Can I combine these into a single scale, rotation, and translation?
2
votes
2answers
208 views

Rotate a model or a view with mouse input to produce intuitive results

I am writing 3D graphics software in Java using the LibGDX framework (which is a front-end for OpenGL), and am baffled by a transformation problem. How do I rotate the orientation of the camera or ...
1
vote
1answer
91 views

preserving z-values during projection?

Consider this figure for projection. There are two equations that give value for the xp and yp coordinates: $x_p=x.\frac{(z_{vp}-z_{prp})}{h}+ x_{prp}.\frac{(z-z_{vp})}{h}$ and $y_p=y.\frac{(z_{vp}...
2
votes
1answer
79 views

What is the equivalent of rotation matrix in Euler angle space for Quaternions?

I have to load a mesh in Blender (which uses Z and Y as up and forward axes), modify it and export it (with setting up and ...
1
vote
1answer
61 views

How to rotate a shape in another 3D software so that the rotation matches with the rotation in Blender?

I import a mesh in Blender, export it with setting axis_forward='-Z', axis_up='Y', import in NVIDIA's FleX, rotate it and store it on disk; I call this mesh ...
0
votes
1answer
75 views

How to compute A and B in projection matrix

I'm trying to compute a projection matrix to transform from view space to NDC with a near clip plane at -1 and far plane at +1. The general form of this matrix (disregarding aspect ratio and focal ...
0
votes
1answer
98 views

How do I derive this transformation

If I had two right handed frames where one has vectors [i, j, k] and another with corresponding vectors [u v w], how would I derive the transform M[i j k] <-- [u v w] when applied to any point P in ...
2
votes
0answers
26 views

How can I register an articulated model to noisy predictions?

Given point sets $Y$ and $M$, I'd like to register articulated $M$ to $Y$ without changing the edge distances of $M$. The point correspondences between $Y$ and $M$ are known and points have a fixed ...
2
votes
1answer
137 views

Deciphering Affine/Projective Transformation Code

I've spent about 2 days trying to understand this piece of code (from here) that applies an affine/projective transformation to an image. I will link bits of the code that I'm struggling to understand ...
2
votes
0answers
45 views

What is wrong with my deformation gradient calculation?

I created two ellipses,$\hspace{150px}$,where the red ellipsis is as the blue one, except translated to the right and rotated by ${30}^{\circ} .$ Using rotation matrix, $$ \left[ \begin{array}{cc} ...
0
votes
3answers
203 views

Rotation of a random unit vector at a point in 3D space by an angle

I have a scenario where I need rotate a vector ( unit vector) at a point in space by an angle along Z-axis. Is it possible to help me to understand a procedure to achieve this. I'm using vb.net ...
1
vote
0answers
86 views

How to apply scale, translate, rotate with different origin and get new rectangle coordinates

I was reading other questions in this topic but I couldn't apply any viable solution to solve my use case. I have a crop area described with two dimensions (cropWidth, cropHeight) I can easly compute ...
2
votes
1answer
41 views

Correctness or otherwise of the procedure for generating an orbiting camera in WebGl

I have to create a orbiting camera. I created the model of sun (a sphere) around (0,0,0) , triangulated and Phong shaded it. I would have a camera that goes around the sun thus an orbiting camera and ...
1
vote
0answers
1k views

General fixed-point scaling

For general fixed-point scaling problem, If I want to scale twice about a fixed point (x, y), I need to first translate the object so that fixed point coincides with the origin, then do the scaling ...
1
vote
1answer
98 views

Rotating scene or complex object using center of AABB

All objects have two AABB (Axis Aligned Bounding Box), one in local space and one another in world space. The box in local space is calculated while importing scene from external source, and the box ...
3
votes
0answers
88 views

Linear bending of a mesh

I am trying to implement linear bending of a mesh by following what Alan H. Barr explained in his Global and local deformations of solid primitives paper (ACM link, Direct Link hosted on a faculty ...
4
votes
1answer
228 views

Canonical Space to Screen Space: Why do we have the strange -0.5?

When we convert from canonical space to screen space, To map x from -1 to 1 to 0 to width, ...
1
vote
1answer
330 views

Curve rotation in GLSL fragment shader

I'm trying to figure out the correct math to rotate and translate a curve displayed in a fragment shader. What I try to accomplish is to define a curve, for example a sine curve, in a local ...
1
vote
1answer
696 views

How do I build my tangent space matrix?

I'd like to understand how the process of building the "tangent space" matrix for normal mapping works. I'm following several tutorials, and other stackexchange questions, but I'm unfamiliar with the ...
1
vote
0answers
44 views

Transform a cube in a truncated pyramid

I have to calculate the modeling transformation that transforms a cube of side=1 centered in (0,0,0) in a rectangular truncated pyramid of height=2,sides of basic rectangle equals to 3 and 2, sides of ...
3
votes
1answer
957 views

Ray tracing: transforming ray to object's local space for intersection test

Im writting a raytracer, for which I want to be able to test intersections with implicit surfaces (in my case spheres). Without applying any transformation it works great, but I would like to upgrade ...
1
vote
1answer
150 views

What is the algorithm used in pbrt-v3 for triangle intersection?

Where's this algorithm come from? Any references? And a specific question, when the authors compute the transformation from world space to ray-triangle intersection coordinate space, what's the ...
1
vote
0answers
48 views

Tanget plane of an image

My problem is about tangent plane. I have an image (m by n). I obtain surface normal vector using machine learning methods. Then i would like to obtain tangent plane for this surface normal. To ...
1
vote
1answer
119 views

Back and forth rotation on Y-axis

I want to write code for a cube rotating 10 degrees back and forth on its y-axis in an OpenGL application. Right now I have this written in my display method, however it depends on processor speed, ...
2
votes
1answer
60 views

Do normals in obj files have to be changed into eye coordinate before being used?

Obj files give pre-calculated normals which are in model coordinates. So I wonder if they have to be transformed into eye coordinate (where I use them to calculate lighting)? I'm thinking yes because ...
3
votes
1answer
799 views

Why does this gl_FragDepth calculation work?

I am raytracing in GLSL. My gl_FragDepth calculation wasn't right, so I did some hunting and found this solution (P is the world-...
1
vote
2answers
118 views

Is there something wrong with a column camera matrix?

I am writing a simple ray tracer. I was working on my camera matrix when I encountered a problem. When I changed the look vector, so that it headed down, the image, which was supposed to go up, ...