# Questions tagged [mathematics]

The knowledge of the numbers, formulas, shapes and quantities. In the computer graphics, almost exclusively linear algebra is being used.

216 questions
Filter by
Sorted by
Tagged with
35 views

### How can I render implicit equations in JavaScript on JSFiddle (which imports three.js)?

just as the title says, I'd like to experiment with 3D surfaces which are defined by implicit functions. For instance, let's say I have an implicit curve of the form x^2 + y^2 + z^2 = 50^2, where &...
1 vote
59 views

### Understanding what Arvo meant about "Total Phase Space Density"

In James Richard Arvo's 1995 PhD thesis "Analytic Methods for Simulated Light Transport" at Stanford University, he introduces on page 26 "total phase space density" and states ...
• 203
15 views

### Approximation/Trick for rendering wormholes as simple objects

Is there a know trick/approximation used to render a simple wormhole effect such as this one: https://www.shadertoy.com/view/4dccRr I was thinking of some formula given: An outer effect radius, Ro ...
• 101
1 vote
58 views

### PBRT - Transforming between Distributions (Section 2.4)

In the 4th edition of "Physically Based Rendering" here: pbrt book 4th ed Section 2.4 in Section 2.4 "Transforming between Distributions", it is said "Suppose we are given a ...
• 203
1 vote
62 views

### How is this transmittance derived?

In PBRT 4ed https://www.pbr-book.org/4ed/Volume_Scattering/Transmittance#eq:volume-attenuation-differential How is this transmittance equation transformed from 11.9 to 11.10? \int_0^d ...
• 11
50 views

### Pose representation using rigid transformations

In literature (3D graphics, computer vision, 3d deep learning etc.) I notice that often an object's pose is represented using a rigid transformation, i.e a member of the group SE(3) combining a ...
• 133
1 vote
75 views

### Is there a quicker way to draw a symmetric, scale-invariant (declining color) gradient around an ellipse?

The goal is to generate a picture like this: A symmetric color gradient around an ellipse which is rotated by $\theta$, has $(x_\circ,y_\circ)$ as center and and major and an minor axis $a,b$. The ...
• 13
1 vote
30 views

### How to morph a enclosing mesh according to the enclosed mesh?

I am quite new to meshing and mesh manipulation. I am working on a problem consiting of meshes $A$, $B$, and $C$. The mesh $C$ completely encloses the meshes $A$ and $B$ as shown in the attached ...
• 11
1 vote
63 views

### Measure (or Jacobian) conversion for direction sampling

If in the path tracing use case, I have some sampling strategies to sample a scattering direction in a 2D space ($\theta, \phi$). Of course, I need to convert it to a 3D direction vector (with length ...
• 1,142
1 vote
34 views

### How to determine the transformation matrix from given initial and transformed co-ordinates?

How to determine transformation matrix for an object given a graph? This is a problem indeed similar to this one. And I've approached it in the same way like there. Given: A line AB A(0,0),B(1,1). It ...
• 111
444 views

### Degree for Computer Graphics : Computer Science or Mathematics?

I want to learn graphics on a lower level but I have no clue where to start. I know that I will need some hard mathematics (linear algebra, vectors, matrices, transformations...) rooted inside my head....
190 views

### How can I determine ideal NURBS surface control points for a multi-patch sphere?

I would like to know how to "parameterize" the control points for the 6 faces of the commonly used NURBS mutli-patch sphere ("Cobb sphere"), for an arbitrary-size control point ...
142 views

### What are the exact math steps to convert sRGB (D65) to Lab (D50) colorspace?

I've been struggling to implement the correct steps (matrices, white-points, etc) to convert some sRGB (RGB) values (already in 0-1 range) to Lab/CIELAB color space. I've tried following guides on ...
51 views

### GLSL reflect function math correct?

In the documentation of GLSL - reflect given a surface normal $N$ and an incident vector $I$ the calculation being performed is reported as $$\text{reflect}(I,N) = I - 2\text{dot}(I,N)N$$ I wonder ...
• 566
63 views

### Pixilate/Quantize UV coordinates in world space?

The effect I'm trying to achieve is to have it so that the texture is pixilated/quantized, but the "grid," stays aligned to world coordinates even as the object with it's own UV coordinates ...
64 views

### value range in CIEXYZ space

When converting from sRGB to CIEXYZ I seem to be off by a factor of 100 I'm trying to convert from sRGB to CIELAB. Calculation First I need to go from sRGB to CIEXYZ. Using this formula I get i.e. ...
• 23
115 views

### Extrapolating geometry across a triangle mesh?

Say you have 2 parametric cylinders represented as triangle meshes with very different geometries and you connect them together. Is there a method that allows you to join them together such that the ...
• 1,746
1 vote
65 views

### Piecewise smoothing of a mesh?

Kobbelt et al. published a paper some 20 years ago where they specified how solving Poisson equations on the positions of a mesh lead to removing noise. This can be used for reconstructing mesh ...
• 1,746
20 views

### How is re projection usually implemented in remeshing?

I was reading "Polygon Mesh Processing" and in chapter 5 the authors present this little algorithm: ...
• 1,746
1 vote
73 views

• 125
101 views

### With a light source at (0,2,0) and unit cube (from [-1,1]) using a given shading formula, how is the r,g,b for each surface calculated?

The above problem is from a past Computer Graphics exam. I am particularly confused about the explanation given, firstly for the top and bottom planes (since the direction of normal for top plane ...
240 views

### Parametric equation for Catenary curve between two Points

I have two points in 3D space, A and B. I need to have a parametric equation of the catenary curve such that: Cat(0) = A, Cat(1) = B, Cat(t)= f(t, A, B) How can I derive the function f
279 views

### Whats the best way to render (2D) parametric curves with uniform stroke width?

I want to create a rendering engine that mostly renders parametric curves on a 2d screen. As far as it seems, todays graphics are all dependent on vertices and matrices, so not sure where to start or ...
1 vote
168 views

### How to compute discrete partial derivatives in 3D

I'm supposed to compute partial derivatives for 3D volume rendering (in ray tracing). I'm bad at math and so I can't understand what $f$ is in my case. In reviewing examples, I'm seeing the $f$ ...
• 111
184 views

### Splitting Floats To Texture Channels

I know, this is a silly question, but since I need this so often, I just want to double check that I made no mistake. Working with most shader languages, a texture can store $8$ bits per channels, ...
• 127
921 views

### Can you explain to me the Bresenham's line algorithm in simple terms?

I've been trying to wrap my head around this algorithm, and I need it for my drawing function. But I can't seem to understand it. The Wikipedia page gives this piece of code right at the end: ...
• 41
40 views

### Approximate compass bearing of a normal

Let's say I have a 3D model that represents a small real-world space; it could be bounded by a 10" by 10" by 10" box. I know the real-world compass bearing for an observer in the center ...
• 121
199 views

### Can you encode a reflection in a quaternion?

Say we have the transformation: \begin{bmatrix} 1 & 0 & 0\\ 0 & 0 & 1\\ 0 & 1 & 0\\ \end{bmatrix} i.e. the matrix that encodes swapping the z and y axes. This is equivalent to ...
• 1,746
153 views

### Point a normal vector towards a point in 3D-Space

Given a normal vector in 3D-Space, how can I rotate the vector, such it points to a point in 3D-Space. I tried couple of ways doing this, which ended up looking completely wrong.
154 views

### Plot inverse of emulated double-precision floats

I need to accurately plot a line chart using WebGL. The numbers have a precision of around 33 bits - that's too many to fit into a single-precision float's mantissa. WebGL does not support the double-...
• 101
19 views

### Automate Image resize, scale, position for best quality (size)

I have a process where a web user selects a photo for a profile image. User is then presented with a canvas to zoom, rotate and move their image within a square viewport. Once satisfied, the user ...
• 101
1 vote
56 views

### How do I convert pathtraced distance to value that is usable by OpenGL's depthbuffer?

I was hoping someone could check my understanding. I've got a pipeline that does some path tracing, and then draws some debugging rays using standard rasterization. I'm trying to get depth to work ...
• 113
218 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
735 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 ...
1 vote
545 views

### What projection matrix and world transformation do I need to have an isometric projection?

I'm doing my own engine in college to display a wireframe on screen with an isometric projection but I literally can't find any literature about maths behind doing it by hand just for game engines ...
• 111
1 vote
108 views

### 3D to view plane projection

I am trying to draw points of a 3D sphere onto my monitor as if I was looking out into space. Me, the viewer, is at (0, 0, 0). The plane of my monitor is at (x, y, 1) and I have a sphere out in ...
• 21
144 views

### Converting a Bezier Path with variable width stroke to an outline?

I started working on a "stylus annotation program", and as part of it I need an algorithm that convert a path with width indicators to an outline. This is similar to the Advanced Outline ...
• 101