Questions tagged [mathematics]
The mathematics tag has no usage guidance.
172
questions
0
votes
2
answers
30
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 ...
1
vote
1
answer
41
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 ...
0
votes
0
answers
16
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 ...
0
votes
0
answers
26
views
Getting something close to the convex full of SDFs using CSG operations
Inigo Quilez has an explanation of smooth operations to join sdfs.
I am trying to get something close to the convex hull of multiple sdfs. For starters let;s consider a simple case of 3 cubes int eh ...
1
vote
1
answer
54
views
Is it possible to make a projection matrix to not project in the center?
I have the following projection matrix:
and I need to make a hole in the center of my matrix, something like that: (I don't want to project a custom W and H)
Is that possible ? Thanks.
1
vote
1
answer
64
views
Defining the proper sdf for this structure
I am making a procedural sdf (just a bunch of cubes) based of an image. The idea is very simple. We have a stencil image:
Each texel in the image corresponds to a 3D cube. So to ray trace what I am ...
0
votes
0
answers
30
views
Error in equation 2.1. in Ray Tracing Volume Densities
I am reading through Kajiya - Ray Tracing Volume Densities paper. And I've already got stuck into section 2. I wonder if there's a mistake in that equation.
I'll quote the relevant bit
The quantity ...
0
votes
0
answers
23
views
Can you estimate the shadow in a plane of an SDF?
I have an SDF and a plane. I want to generate either a square or a circle on the plane such that the orthogonal projection of the sdf on the plane (i.e. its orthogonal shadow) is guaranteed to be ...
2
votes
0
answers
77
views
physics/math of lighting gradient of a 3D object
Consider a monochrome ball. The colours of the pixels is a function of the point height, the light intensity, the light angle, and the surface material (reflection).
What is the simplest formula ...
2
votes
1
answer
203
views
vulkan perspective matrix vs opengl perspective matrix
Hi I have a slight confusion in using the opengl perspective matrix in vulkan.
glm's perspective matrix works directly in vulkan just by multiplying the "[1,1 term by -1 but when I compared the ...
2
votes
1
answer
148
views
Having trouble implementing distance transform with jump flood
I'm attempting to use the jump flood algorithm to compute distance transforms of an arbitrary texture derived from a canvas2d context, roughly following the explanations detailed here/here.
In the ...
1
vote
1
answer
105
views
Conflicting definitions for the distribution of normals $D$ in microfacet BSDFs
Please do not confuse this question with this one. In Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs, Eric Heitz defines the distribution of normals as.
There, the footnote. ...
1
vote
2
answers
200
views
Half Edge criterion to check if an edge flip is illegal?
I am trying to determine if and when flipping an edge is topologically valid.
The current criterion I have is that it is only valid if there is no edge connecting the opposite vertices of the edge.
I....
2
votes
1
answer
101
views
Deriving formula for perspective correct interpolation
I am trying to derive the formula for perspective correct texture interpolation on my own while implementing my own software rasterizer (projecting an arbitrarily rotated triangle in camera space on ...
3
votes
1
answer
150
views
Cubic Splines - Do Parametric and Explicit representation give different curves?
I asked a similar question here before but since the previous post original question was different, I think it was confusing people. So I've voted to close that and asking the new question here. I'm ...
1
vote
1
answer
64
views
Help understanding tangent from dot product and max distance from component wise vector multiplication
I am looking through this code and seeing two things which confuse me (well, the whole functions does) in the top functions.
First, dir * p where ...
0
votes
1
answer
92
views
How compute new camera parameters given a velocity vector?
My goal is to update camera parameters given a velocity vector so that the camera points in the direction of the velocity vector. How should one compute the update matrix for the camera parameters?
1
vote
0
answers
115
views
Fake cubic Hermite spline interpolation with smoothstep
When scaling an image with Bicubic Interpolation, the Cubic Hermite spline interpolation is used. smoothstep is one of the four basis/blend functions of this kind ...
0
votes
1
answer
40
views
Computing heat diffusion creates weird results
I am trying to model heat diffusion on the surface of a mesh. I annexed the most important bits of theory about this topic as screenshots on the question see the bottom.
The crux of the issue is we ...
3
votes
0
answers
39
views
Is this way of transforming QMC samples into barycentric tri coordinates agnostic to mesh-topology?
While I'll try my best to give all relevant info in all possible brevity below, please refer to the spoiler and link at the bottom of the post for the (more lengthy) original description if needed.
...
0
votes
2
answers
881
views
understanding SDF[Signed Distance Functions] for a torus
This topic would contain a lot of sub questions because I have one for each shape but for today I just want to understand the function for a torus and a capped torus
This is the article for all shapes ...
2
votes
1
answer
37
views
Understanding inequality to equality in the Hartmann & Gribbs frustum planes extraction method
I've been reading this article on how to extract the plane equations from the view and projection matrices. And I can understand most of it. However, the only thing that is unclear to me (and that ...
3
votes
0
answers
395
views
How to implement PCSS correctly?
I'm trying to implement PCSS in OpenGL/GLSL, but I have problems understanding the details especially the conversions between the coordinate spaces. The existing implementations are so different from ...
0
votes
1
answer
23
views
Plotting points along a 3D line segment
I'm trying to plot some points along a 3D line segment and could really use some help. In 2D, I've found success getting the angle of the line, the sine & cosine of the angle, and then adding the ...
0
votes
0
answers
52
views
How do I figure rotation from the difference between two vectors?
I've been playing around with an idea, but I'm struggling with some of the math involved.
Now, each face of a mesh has a normal vector, and that the normal map fragment shader modifies that face ...
0
votes
1
answer
63
views
Moving a vertex through the cursor
There is a way to move a selected point in a mesh with a cursor(assuming a camera that doesn;t change between frames).
The way I remember the algorithm (but seems to be wrong) is:
Unproject the ...
0
votes
1
answer
55
views
Calculating Material/Texture Placement from Bitmap to 3D Model
everyone!
I am currently developing a program that converts a 3D model to 2D isometric pixel art. Part of my program extracts the texture from an FBX file (as FBX files can have textures built in), ...
2
votes
1
answer
59
views
Determining the function of a radial gradient fill with midpoint
Recently I have been trying to create a shader that imitates a shader within Affinity Photo. It is used in the radial gradient fill and essentially you set your endpoint colors and then set the ...
0
votes
1
answer
95
views
Stylized math like rendering?
How can I render plots and graphics that mimic how mathematicians draw diagrams?
For example Look at this shirt:
The diagrams represent 2D and 3D shapes, however they have characteristics of human ...
1
vote
1
answer
40
views
Subdivision scheme where the faces and edges have weights (not necessarily scalar weights)
Subdivision schemes work by considering the vertices and their connectivity information to calculate averaging weights.
However, other than specifying which vertices are connected, and perhaps which ...
1
vote
0
answers
132
views
Model View Projection Matrix Multiplcation Order
I'm working on a simple software renderer and have a working implementation so far. I'm curious as to why it's actually working since I would expect the multiplication ordering for my world, view and ...
0
votes
1
answer
126
views
Calculate the position and rotation of a quad in 3d space given a 2d projection of that quad from a camera
I am trying to build a VR tracking system with a laptop webcam, and I have succeeded in identifying, and tracking paper markers I put in front of my webcam. For context I am using OpenCV with the ...
3
votes
1
answer
221
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 ...
0
votes
0
answers
100
views
Explanation of converting a look-at / direction vector to quaternion rotation?
Can someone please explain the math behind converting a direction-vector or lookAt-vector into a quaternion rotation?
What I am trying to do?
I am trying to create a custom aim-constraint for a DCC (...
0
votes
1
answer
37
views
In place sorting of a half edge DS?
Cross posting from SO because I didn;t know where to put this question.
I have an implementation of the half edge and I am trying to sort the edges such that edge n+1 is the pair of edge n.
Setup
I ...
2
votes
1
answer
116
views
Improve accuracy of mesh gradient?
So to make it simple. I currently use a method I found online to compute the gradient of a scalar field of a mesh.
To test how accurate this is, I made a sphere and followed the gradient direction of ...
1
vote
0
answers
24
views
Finding a flat plane within iPhone depth data
I have real time depth data coming from an iPhone and I want to identify flat objects within the point cloud so that I can highlight the Hard edges in the images. The objects can be at any angle and I'...
3
votes
1
answer
58
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 ...
4
votes
1
answer
100
views
Gradient descent (Not ML) on arbitrary meshes
So I am doing a gradient descent like algorithm on the surface of a mesh and I just noticed something:
The above is the geodesic gradient (the distance to a single vertex)
Look at where the ear ...
1
vote
2
answers
187
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
2
answers
79
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 ...
0
votes
1
answer
83
views
Is the laplacian operator for meshes just the sum of the differences of neighbouring vertices?
I am starting to learn about the laplacian operator $\Delta = \nabla \cdot \nabla\phi(p)$
Which can be described as the divergence of the gradient of a scalar function $\phi$. This is equivalent to ...
0
votes
0
answers
46
views
Are there algorithms besides Canny edge detection that can create consistent width edges?
Sobel edge detection is pretty much the quintessential way to get edges out of an image. It however suffers from certain quirks.
One example is, because it's gradient, based certain surfaces exhibit ...
1
vote
1
answer
87
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 ...
0
votes
1
answer
56
views
Fast and exact Geodesics on meshes, Backtracking confusion
The following is an excerpt from a 2005 paper on geodesics on triangular meshes, taken from section 3.5
In this case $p$ is a point on some arbitrary face in a mesh, $p'$ is a point on one of the 3 ...
1
vote
1
answer
61
views
Finding geodesics on a mesh?
What are some state of the art methods/algorithms to find geodesics on arbitrary manifold meshes?
1
vote
0
answers
85
views
Why does my self-written rendering engine make further away objects look larger?
I am writing a very simple rendering engine. I have already made a few tests, but somehow the images it creates look wrong. Objects that are further away from the camera look larger than objects ...
0
votes
1
answer
58
views
Closest sphere on segment
I am trying to get a segment closest point on a surface and display a circle (or sphere in this case) at that position.
I actually get the correct position but I can't get a uniform sphere based on ...
2
votes
1
answer
50
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 ...
0
votes
0
answers
49
views
What are some uses for the vector triple product in computer graphics?
I have just learned about the vector triple product (Lagrange formula) from a math for computer graphics textbook, however the book does not mention any use cases for it beyond the fact that it's a ...