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 [mathematics]

The tag has no usage guidance.

3
votes
0answers
29 views

NURBS Weights De Boor's Algorithm

I am having trouble implementing an algorithm for 3rd degree NURBS. I have been able to program 2nd degree ones from the equations described here but I am not able to derive an equation for Rational B-...
2
votes
0answers
63 views

Constraining a Polyline to Look Smooth

What are the mathematical constraints required for a polyline, i.e., a piecewise linear curve, to appear as a smooth curve to human vision? I've discovered one document that specifies only that the ...
1
vote
3answers
215 views

How to calculate ray

In ray-tracing technique critical point is to calculate rays which came out from eye $E$ to target $T$ through pixel $P_{ij}$ on viewport. The "viewport" is represented as rectangle divided to square ...
3
votes
0answers
85 views

How can you avoid thin triangles in a parametric shape in a smart way?

I have created a closed 3D mesh using a parametric function. The shape is constructed by taking an arbitrary closed b-spline and scaling it based on one of the parameters (similar idea to a parametric ...
1
vote
1answer
140 views

Translate an arcball camera upwards or left-right

This problem is giving me a really hard time. I'm always looking at the origin and have a camera that moves around it in an arcball mode. That part works beautifully: I'm calculating the camera ...
1
vote
1answer
169 views

How to match Blenders polynomial lens distortion model with GLSL?

I'm trying to re-implement Blenders (libmv) polynomial lens distortion model using shadertoy, in order to apply the lens distortion in another application ideally by generating a STMap for that. I ...
2
votes
1answer
48 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
56 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 ...
1
vote
1answer
72 views

Wrong tangential directions for cubic bezier curve

I am well aware that there are several ways to find the tangents to a Bezier curve. However, I choose to just substitute the result of differentiating the Bezier curve equation. So, given four ...
3
votes
1answer
1k views

How to convert Euler angles to Quaternions and get the same Euler angles back from Quaternions?

I am rotating n 3D shape using Euler angles in the order of XYZ meaning that the object is first rotated along the X axis, then Y...
5
votes
1answer
66 views

How to randomly draw Quaternions within a specific range of Euler angles for rotation?

I am pretty new to Quaternions so please bear with me. I want to draw random Quaternion samples so that their Euler angle equivalent would range within [-30, +30] ...
1
vote
1answer
73 views

How are the three plane equations derived in the NVIDIA's CG Tutorial chapter 8?

I'm reading the chapter 8 of the Cg tutorial and I could not understand 8.4.1 : Because all these coordinates lie in the plane of the same triangle, it is possible to derive plane equations for x, ...
5
votes
0answers
151 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
88 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
43 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
1answer
121 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
43 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
1answer
85 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
479 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
227 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
113 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
278 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
1answer
63 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
199 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
128 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
49 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
96 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\...
4
votes
2answers
88 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
573 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
58 views

Hashing a point on cubic sphere

Let's say I have a point on a potential cubic sphere inflated using this: ...
1
vote
1answer
65 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
73 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
118 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
587 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
191 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
57 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
59 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
182 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
319 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 ...
3
votes
1answer
213 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
79 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. ...
8
votes
3answers
845 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
329 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
77 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
100 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
214 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
310 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
106 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
134 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 ...
6
votes
1answer
90 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$ $\...