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.

1
vote
1answer
67 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 ...
0
votes
2answers
52 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
63 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
0answers
44 views

Rectifying the Environment Map (How it works)

Hello everyone I am currently reading a paper of Disney research, Zurich, for my exam, and I really don't understand a thing in this paper... The main issue of this paper is to create a ...
0
votes
1answer
48 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 ...
0
votes
1answer
33 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. ...
2
votes
1answer
49 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
29 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
57 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 ...
-1
votes
0answers
23 views

Understanding threshold finding in the Hough space in Python

I am following a tutorial on writing a Hough algorithm in Python: to my understanding it is very well written but I am new to computer graphic algorithms (not really used to thinking in terms of ...
3
votes
1answer
109 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
2answers
83 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 ...
2
votes
1answer
40 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?
1
vote
1answer
65 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}...
4
votes
1answer
191 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, ...
0
votes
1answer
95 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 ...
1
vote
1answer
52 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 ...
2
votes
1answer
45 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 ...
0
votes
1answer
46 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
3answers
150 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 ...
8
votes
2answers
213 views

What transformations should I apply to a model to produce this 3D effect?

I saw a video on YouTube where a person uses a transparant, knotted pyramid to display "holograms" using their smartphone. (I have not been able to reproduce this yet, so I can't tell for sure if it ...
2
votes
0answers
25 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
0answers
44 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} ...
1
vote
2answers
109 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, ...
1
vote
0answers
43 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 ...
3
votes
1answer
477 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 ...
2
votes
1answer
432 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-...
2
votes
1answer
39 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
712 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
72 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
86 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 ...
1
vote
1answer
161 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 ...
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: ...
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 ...
1
vote
1answer
161 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 ...
3
votes
1answer
102 views

How can I implement GIMP's “Colorize” function?

I have an RGB pixel that I'd like to colorize in my program (I'm using GLSL) very similar to how the GIMP "Colors > Colorize" function works. In my program, I can easily convert between RGB and HSV. ...
4
votes
1answer
483 views

Choosing & Using a Projection Matrix

I'm looking into the graphics pipeline processes and at the moment in particular, perspective projection matrices. After looking in several different sources, and across the breadth of previous ...
3
votes
1answer
1k views

OpenGL : How to translate an object with it's own axis

I'm working with OpenGL to try to rotate / translate my 3d object : a cow. The requirement is simple : If I toggle key 'r'. The cow spinning around and random axis. If I drag the cow with mouse, it ...
2
votes
1answer
59 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 ...
4
votes
2answers
74 views

Supporting multiple camera types in a deferred renderer without specializing the shaders or in the shaders

Perspective Camera A (row-major) perspective transformation matrix has the following format: $$\begin{align} \mathrm{T} &= \begin{bmatrix} \mathrm{T}_{00} &0 &0 &0 \\ 0 &\...
4
votes
2answers
151 views

Software to compose separate models into an articulated model?

I've inherited a system which animates a humanoid avatar by loading various models and manually calculating transformations for each one. I'm in the process of porting part of this system to Three.js, ...
1
vote
0answers
36 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 ...
1
vote
1answer
108 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
46 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 ...
2
votes
2answers
328 views

OpenGL : How to rotate an object around viewing space x-axis

I have an object(cow). This cow was translated and rotated(with arbitrary axis) in the modeling space for several times. And I can't know how much cow is translated or rotated. Only I can obtain is ...
7
votes
1answer
97 views

implementing right handed coord system APIs on top of a left-handed rendering engine

I am trying to plug in a 3D game engine as the rendering engine for an existing graphic API system that uses a right-handed coordinate system. Game engines often uses a left handed coordinate system ...
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
2answers
751 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 ...
1
vote
1answer
70 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, ...
1
vote
1answer
101 views

What technique would I use to create fake 3d walls as seen in Realm of the Mad God

I wanted to make a little demo for a console with Realm of the Mad God esc graphics to brush up my C and SDL skills. One problem I'm running in to is creating the 3D walls. The console I'm ...