Questions tagged [mathematics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
81 views

Expressing a reflected ray at a point as a function of the incoming ray and the normal to the surface at that point

Said L the incoming ray (at a point $P$). $R$ is the reflected ray. $N$ is the normal to the surface at the point $P$. $\alpha$ is the angle between $N$ and $L$ (and $N$ and $R$ also). It is assumed ...
3
votes
1answer
131 views

Fastest way to put a point on the circumference of a circle

My goal is to take a point that is inside of a circle with a given radius and put it on the circumference. Recently I have been normalizing the vector between the point and the center of the circle ...
3
votes
1answer
37 views

Mis understanding of the Heat Method

I have been trying to understand a paper in CG for a while, called the Heat Method by Ken Many things have clicked but I don't fully understand it yet. In particular. In the following $u$ is a vector ...
3
votes
1answer
9k 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...
3
votes
1answer
383 views

Rotating an Object Around an Axis

I have a circular shape object, which I want to rotate like a fan along it's own axis. I can change the rotation in any direction i.e. dx, dy, dz using my transformation matrix. The following it's ...
3
votes
1answer
72 views

How can I draw a tube on basis of position and angle between two 3d points?

I'm struggling with this idea of creating two particles in 3d and draw a tube between them. I can't figure out how to properly set the angle of the tube. I've used two approaches: calculating the ...
3
votes
0answers
93 views

Procedural Generation of 4D Shapes

I'm curious if anyone has any insight into how one might procedurally generate 4D objects, as showcased in Miegakure (or the developer's other game, 4D Toys ). I built a program a while back to do ...
3
votes
0answers
49 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-...
3
votes
0answers
105 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 ...
3
votes
1answer
342 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 ...
3
votes
1answer
1k 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 ...
3
votes
1answer
276 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 ...
3
votes
0answers
83 views

What is a good algorithm, and framework, to calculate centres of gravity or mass (cog)?

I'd like to take an photograph, subdivide it into a tesselation, either of squares, or (ideally), hexagons, and then find the centre of gravity (or, if you prefer, centre of mass) of each cell of the ...
2
votes
1answer
99 views

How do people come up with subdivision schemes?

Be it chaikin subdivision, loop subdivision, catmull-clark subdivision... How do people come up with the coefficients for an arbitrary subdivision scheme?
2
votes
1answer
69 views

Determining Rational Quadratic Bezier Curve Weights for Circle

I am trying to create a spherical interpolation with 3 points. I'm currently using Quadratic Bezier Interpolation but have been told I should use Rational Quadratic Bezier Curve in order to get a ...
2
votes
1answer
251 views

Unwinding an image on a spiral to make it long and flat

Here's an odd intellectual puzzle. Something I was daydreaming about on a train - but the maths are somewhat beyond me. How would someone go about un-winding a spiral to produce a long flat image? ...
2
votes
1answer
38 views

Interpreting Image Processing Math Equation

I am reading "Image Processing and Analysis" by Chan and Shen, c 2005 SIAM. They introduce some notation I'm not 100% sure how to interpret: $$ u_0(x)=u(x)+n(x), x=(x_1,x_2) \in \Omega $$ They ...
2
votes
2answers
374 views

Average point on sphere between 3 other points (spherical triangle)

I am trying to get a normal of a triangle on a sphere, however the normal equations (straight line) give the wrong answer. For the points: $$(-986.786743, -93.348259, -132.439041)\\ (210.731644, -...
2
votes
1answer
188 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 ...
2
votes
1answer
84 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(...
2
votes
1answer
91 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 ...
2
votes
1answer
102 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, ...
2
votes
0answers
47 views

When should operations on 4D (homogeneous/projective) vectors use the w-coordinate?

Various operations on 2D vectors naturally generalise to 3D vectors simply by including the $z$-coordinate. The ones that come to mind are: Vector sum and difference Dot product Magnitude (Euclidean ...
2
votes
1answer
77 views

Estimating the position of vertexes in a 3D model

Introduction to my project: We are machine learning scientists and working on a biomedical system for tracking tongue for speech pathology using a technology called EMA (Electromagnetic ...
2
votes
0answers
74 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 ...
2
votes
0answers
170 views

Transform a centered isosceles trapezoid in a rectangle in 2-D

I must convert a isosceles trapezoid to a rectangle in 2-D with a shearing transformation (or with 2 shearing transformations). The isosceles trapezoid is centered in the origin of axes. It is right ...
2
votes
0answers
57 views

Compute angles and thereby endpoints in a raster grid?

I am at the moment having some issues with computing an endpoint in a raster grid that is also a valid position in a graph. I am trying to draw a line between these two points, but as the point I am ...
1
vote
2answers
283 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. ...
1
vote
1answer
371 views

Why does substracting -1 in shader fail for a float data type?

I am loading a texture in a WebGL fragment shader (GLSL version 1.00). This is my working code: ...
1
vote
3answers
2k 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 ...
1
vote
1answer
43 views

Enter/Exit of unit cube representable as 4 numbers?

In the paper Real-time Reflection using Ray Tracing with Geometry Field , it mentions this: A ray is represented by its two intersection points (in,out) with the bounding box of the surface. ...
1
vote
2answers
67 views

Heat Method (Crane et Al) How do we pick u?

The heat method is a very interesting paper for distance computation: https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/paperCACM.pdf The idea behind the paper is that, heat travels along the ...
1
vote
1answer
68 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} = \...
1
vote
2answers
611 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....
1
vote
1answer
233 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 ...
1
vote
1answer
629 views

Ray tracing - tangent space for a point on a sphere

In a ray tracer, given a point on a sphere (point_of_intersection with a ray) and its normal for that point (point_of_intersection - center_of_sphere) how do I calculate the tangent space for that ...
1
vote
1answer
85 views

How to handle Half edge boundary edge iteration from vertex?

Ok so let's say we have a portion of a mesh that looks somewhat like this: A triangle fan with one of the triangles removed. If that triangles was not removed, we could get all the edges adjacent to ...
1
vote
1answer
89 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, ...
1
vote
2answers
61 views

Discrete Gradient?

I am trying to understand how to get the discrete gradient of a mesh that is being used as the input of some function $f$. In other words for every vertex $v$ there is a scalar quantity $s$ associated ...
1
vote
1answer
73 views

Approximating Geodesics in a half edge DS, how can I refine my mesh to get good approximations

I implemented Djikstra's shortest path algorithm to approximate Geodesics on arbitrary meshes. Djikstra's works, but I noticed a problem inherent to the discretization of my meshes. Consider the ...
1
vote
1answer
49 views

Finding geodesics on a mesh?

What are some state of the art methods/algorithms to find geodesics on arbitrary manifold meshes?
1
vote
2answers
160 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 ...
1
vote
1answer
149 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
101 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\...
1
vote
1answer
63 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
173 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 ...
1
vote
1answer
590 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 ...
1
vote
2answers
511 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
1answer
336 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 ...
1
vote
1answer
946 views

OpenGL C++ Camera Rotation Problem

Currently for a university assignment I have been given a 3D rendering engine, capable of rendering a 3D world. One task is to create a first person camera for it (I know with OpenGL you don't have a ...