Stack Exchange Network

Stack Exchange network consists of 174 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 [mathematics]

The tag has no usage guidance.

4
votes
0answers
103 views

Ray tracing implicit surfaces using Sturm's theorem

I am trying to render implicit surfaces given by a polynomial equation $F(x,y,z) = 0$ using Sturm's theorem. Plugging the parametric ray equation $r(t) = o + td$, where $o\in\mathbb{R}^3$ is the ray ...
1
vote
1answer
67 views

How to simulate elastic material with restoring shape

I'd like to simulate a rubber-like material. This material if deformed would experience a restoring force to its original shape, a bit like a school rubber ereaser. I tried with a spring-mass system ...
1
vote
1answer
42 views

How different can the number of pixels in a straight line be to its real length?

I'm working on a game with a programmable robot. It uses a laser range finder to get the distance to walls. I'm using DDA to generate a line from the robot, going in the direction it is pointing, ...
0
votes
0answers
52 views

Smooth interpolation between quaternions

I have an array of quaternions representing a few orientations that my object has to go through. I am looking for a solution to smoothly interpolate between them such as the right mesh in this video. ...
0
votes
1answer
110 views

BRDF ray directions

The BRDF takes two directions, $\omega_{o}$ and $\omega_{i}$. I've heard that both directions should point away from the surface (one towards the camera, one towards the light), but iq's Oren-Nayar ...
0
votes
1answer
39 views

Linear independence of three points

What is the best way to prove if three points are linear dependent? This is my current way to do it: $$\mathbf{v_a} = \mathbf{b}-\mathbf{a} \\ \mathbf{v_b} = \mathbf{c}-\mathbf{a} \\ \mathbf{v_c} = \...
0
votes
0answers
21 views

Expressing dot density in a scene in terms of visual angle versus cm

When rendering random dot scenes, I sometimes see the literature express density as $n\ dots/degree^2$ of visual angle. Is there a way to convert this density to $dots/cm^2$? Or when I read that a ...
0
votes
0answers
41 views

B splines curve generation [duplicate]

I'm using the de boors's algorithm to generate b splines in matlab. I have managed to generate a curve based on the control points I have given. Unfortunately I have noticed spikes in the curve. I do ...
0
votes
1answer
65 views

How to compute volume of intersection of non-axis-aligned cuboids in 3D?

Given two cuboids in 3D space (8 vertex coordinates each) that are arbitrarily oriented, how can we find the volume of overlap between them in the fastest manner?
1
vote
2answers
389 views

Geometric interpretation of this bilinear interpolation equation?

Bilinear interpolation can be achieved by interpolating two values across the x axis, and then interpolating between the results across the y axis, like in the image below (from https://blog.demofox....
3
votes
1answer
136 views

GLSL shapes signed distance field implementation explanation?

I'm trying to understand all primitives In this article.After hard work I just learn Sphere and Cube , I wrote description here. I could draw 2D shapes but I have trouble understanding 3D below codes:...
4
votes
1answer
98 views

Can someone explain this formula for parse RGB to HSL?

Im trying to complain the algorithm to calculate the HSL value form a RGB color. I understand the algorithm for the Hue, but im lost with the Lightness and saturation. Someone can explain why? There ...
3
votes
1answer
133 views

Delta angle of two vectors about positive x axis

How do I calculate angle C? I can only know what angle between vector and x positive vector {1, 0} Angle between green and red is 60 degrees. Angle between blue ...
2
votes
0answers
62 views

What does different tangent basis mean for a normal map

What does it mean that a normal map was computed with a different tangent basis and is the reason why the normal map does not render correctly. I used the following code (very generic) for my ...
2
votes
1answer
59 views

How can I draw regular polygons along the horizontal axis?

I drew simple triangle wave (that you can see It on graph toy). f1(x) = frac(x/(PI+5))*(PI+5) f2(x) = frac(-x/(PI+5))*(PI+5) f3(x) = min(f1(x),f2(x))*1.5 ...
4
votes
2answers
116 views

What is a Gaussian Lobe concerning BRDF and NDF?

I was reading a paper about voxel cone tracing and came across this term. So, what is a Gaussian Lobe or a Lobe in general? I am asking in the context of Computer Graphics, BRDF and NDF.
1
vote
1answer
81 views

Changing sin frequency smoothly in shader

In my vertex shader I am using a sin function to offset vertices. But as I change the frequency of my sin function I notice some ...
5
votes
2answers
45 views

Modulo vs Scaling vs Capping when performing filters

I'm currently taking a graphics course and we've recently covered cross-correlation with regards to using a filter matrix that is applied to a region of pixels in a sort of continual raster-type scan ...
1
vote
1answer
90 views

Why are BRDF and the lighting uncorrelated?

In relation to this question, in the accepted answer I have a trivial question probably. W.r.t. the following integral $$ L_o(x\rightarrow \Theta) = \int_{\Omega_x} f_r(x,\Psi\rightarrow\Theta)L_i(x\...
3
votes
2answers
83 views

Why is the approximation valid, in the formula provided by Brian Karis?

I'm sorry I'm bringing this topic up again, but I need to expound some of the topics. With reference to this question, I was wondering if someone can help me out in expanding some of the details. In ...
5
votes
1answer
372 views

Microfacet shading for diffuse materials

I recently replaced the Lambertian BRDF in my path-tracer with Oren-Nayar, under the assumption that I could adjust it to use the GGX distribution model with appropriate masking/shadowing. PBR ...
1
vote
0answers
53 views

Hashing a point on cubic sphere

Let's say I have a point on a potential cubic sphere inflated using this: ...
1
vote
0answers
27 views

How to obtain a parametric equation out of a part designed in Autodesk Inventor?

Whenever you make a part in inventor, the software calculates de properties of the whole body given a constant density. Then, automatically, it shows the inertial tensor. As you can recall from math, ...
3
votes
1answer
67 views

Paper for the approximation formula provided by Brian Karis

In these slides, specifically page 11, the following formula is reported: $$ \frac{1}{N} \sum_{k=1}^N \frac{L_i(l_k)f(l_k,v)\cos(\theta_{l_k})}{p(l_k,v)} \approx \left( \frac{1}{N} \sum_{k=1}^N L_i(...
1
vote
2answers
93 views

AABB bounding boxes

Here's a constructor to construct a axis-aligned bounding box given two opposite vertices on the bounding box, from Pharr's Physically Based Rendering, Third Edition. ...
3
votes
1answer
360 views

Probability density function while using spherical coordinates

I'm following this tutorial where at somepoint the derived PDF for spherical coordinates for a Lambertian surface is \begin{array}{l} p(\theta, \phi) = \dfrac{\sin \theta}{2 \pi}. \end{array} But as ...
4
votes
1answer
156 views

Where does the cosine factor comes from in the GGX PDF?

The GGX NDF, as it appears on the paper where it is presented is: $$D(m)=\frac{\alpha_g^2\space\chi^+(m\cdot n)}{\pi\cos^4(\theta_m)(\alpha_g^2+\tan^2(\theta_m))^2}$$ It is equivalent, in the range $...
1
vote
1answer
55 views

Is there any free software to visualize a texture mapped to a sphere? [closed]

I am trying to study the texture deformations caused when mapping a rectangle to a sphere, if I had a software that took an image as an input and displayed how it looks like when texture mapped to a ...
1
vote
1answer
23 views

Matlab scatter hotmap [closed]

I have two columns of data, x(angle) and y(distance), they are my experiment results(figure 1). How can I use these results to make a ‘hotmap diagram’ by matlab? The z axis is the density value of xy ...
6
votes
1answer
130 views

Logarithmic spiral with equal vertex spacing, what equations?

I need to draw a logarithmic spiral (or close approximation) whose vertices are equally spaced, such that the lines between any two consecutive vertices are of equal length. (Actually, that spiral is ...
1
vote
1answer
214 views

Hooke's Law vector form

I'm studying spring model. There is a suggested equation (Hooke's Law vector form) But, I couldn't understand how to derive that equation. I'm reading 'Computer Animation Algorithms and Techniques ...
2
votes
1answer
182 views

Barycentric coordinates for 5-sided polytope of two triangles and three trapezoids

I have a triangle that is extended in space and each edge is refracted differently, creating a 5 sided polytope. The initial and final triangles are the view radii segments of a frustum. We need to ...
1
vote
0answers
74 views

How to derive the formula@NathanReed answer [duplicate]

Thanks! A very simple but great way to estimate mean curvatures@NathanReed answer. For my case, I also need an estimate of triangular mesh curvature, and I support this is what i was looking for. ...
7
votes
3answers
633 views

Does premultiplied alpha give order independent transparency?

I've heard that pre-multiplied alpha gives you order independent transparency but when I sit down and do the math, it doesn't seem to be working. Is that untrue, or am I doing something incorrectly? ...
4
votes
1answer
172 views

What does it *mean* to scale in an arbitrary direction?

My graphics text explains rotating along the cardinal axes, then generalizes the math to show how to make a rotation matrix for rotating around an arbitrary vector. That all makes sense and I can both ...
1
vote
0answers
64 views

Round Box SDF scaling issue

I am using the Inigo Quilez SDF function to generate a round box shape. The aim is to be able to control the shape scale, smoothness and roundness. I've achieved a pretty good result but I am facing ...
1
vote
0answers
81 views

Algorithm for clipping convex quadrilaterals

I'm dealing with hardware that uses quads as its polygonal primitive. Not triangles. A triangle can be expressed by setting 2 of the 4 vertices equal to each other for a degenerate quad. For the 3D ...
1
vote
2answers
126 views

How to find vertices on borders of geometry

I trying to highlight vertices which are on "borders", imagine half of sphere for example. Also for example I added image geomtry with triangles and highlighted necessary vertices. Any ideas? Thanks
1
vote
3answers
212 views

Return x; y; coordinates of vertex C of triangle

I would like to return the XY coordinates of vertex C using math formula. I have 5 input data what I always know and can be used for solution (green in the image): I know X; Y; coordinates of point A ...
6
votes
1answer
88 views

Monte Carlo Integration

Let $I$ = the value of integration and $p$ = probability distribution. The estimator is denoted as $\left\langle I \right >$ and is $$\left\langle I \right >=\frac{1}{N}\sum_{i=1}^{N}\frac{f(...
7
votes
1answer
129 views

2D sampling with multidimensional transformations

I'm currently learning mathemetical concepts of distribution and the way to use them in a ray tracer with the book "Physically Based Rendering". Let's start by uniformly sampling an hemisphere: As ...
5
votes
1answer
87 views

The variance for the Monte Carlo estimator

I was wondering about the variance for Monte Carlo. The book (Advanced Global Illumination 2ed, p.60) writes the equation as follows: $\sigma^2 = \frac{1}{N} \int(\frac{f(x)}{p(x)} - I)^2p(x)dx$ $\...
5
votes
2answers
486 views

How am I able to perform perspective projection without a near plane?

I'm learning about 3D computer graphics, but I'm having a hard time understanding why the near plane of a viewing frustum can not be placed at z position $0$ (right at the camera). I can understand ...
5
votes
1answer
87 views

Best way to group 3d points into planes, if any

If I have some 3d points, how can I discover parallel planes within them (not just arbitrary planes). I want to know how many "levels" or "floors" something can travel within, after it has done so, ...
6
votes
2answers
142 views

Why is $pdf(\Psi) = \frac{1}{2\pi}$ when picking from hemisphere uniformly?

I'm trying to figure out why the probability density function for picking a direction uniformly on the hemisphere is $\frac{1}{2\pi}$. Something tells me this is related to the number of steradians ...
7
votes
1answer
791 views

Understanding Jump Flooding Algorithm (JFA) for Voronoi Diagrams

I'm having trouble understanding the JFA. As far as I understood the algorithm, it walks log(n) times through every pixel (no matter if it is a seed or not) and looks at that pixel's neighbors in $(x+...
4
votes
1answer
121 views

Calculate a rotation around an arbitrary axis

Suppose I have two 3D triangles before & after a single rotation around an unknown axis. How would I go about finding this axis?
5
votes
1answer
134 views

Calculate Transformation between two point sets - but with constrained Degrees of Freedom

How can I calculate the rigid transformation [R|t] between two 3d triangles, but restricted to a given N degrees of freedom (for N = 1..6) ? I know for N=6 I can get a least-squares solution via SVD ...
1
vote
1answer
235 views

Beginner CG Research Project [closed]

This summer I will be working with a professor on a research topic of my choice, in the field of graphics & simulation. While my professor is knowledgeable in the area he is being very hands off ...
6
votes
1answer
115 views

Correct post-displacement normal calculation (Y-component and epsilon)

I often use a 2D Perlin noise texture to displace a grid in the vertex shader (e.g. terrain, ocean). However, every time I google the method to calculate post-displacement normals there is a slight ...