# Questions tagged [mathematics]

The tag has no usage guidance.

144 questions
Filter by
Sorted by
Tagged with
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 ...
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 ...
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 ...
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...
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 ...
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 ...
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 ...
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-...
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 ...
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 ...
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 ...
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 ...
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 ...
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?
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 ...
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? ...
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 ...
374 views

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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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: ...
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 ...
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. ...
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 ...
68 views

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 ...
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 ...
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 ...
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