# Questions tagged [geometry]

The tag has no usage guidance.

90 questions
Filter by
Sorted by
Tagged with
0answers
19 views

### Boundary Smoothing Algorithms

I have a 2-manifold with boundary, built with marching cubes. Are there any well-known algorithms for smoothing its boundary edges? Most of the papers I found are concerned with smoothing the surface....
0answers
39 views

### Vertex positions from particle position

I have a question about Nvidia Flex or any particle based simulation in general: The particles are created by sampling the mesh, which can result in fewer particles than there are vertices in the ...
1answer
28 views

### How to scale primitive shapes [in Blender] so that they are within a [unit] sphere?

I wonder how is it possible to scale all shapes so that they are within boundaries of a [unit] sphere? I know how to do this for a cube: if radius of the sphere is S...
1answer
120 views

### Do straight lines always remain straight when projected with a perspective camera?

If I have a straight line in 3D space and I use a camera matrix to do a perspective projection into a 2D plane/screen will the resulting line always be straight too? If I project the start point and ...
0answers
52 views

### Intersecting Frusta

I am trying to determine whether two frusta intersect in 3D space and to quantify this intersection as a percentage of one frustum volume (eg. 100% intersection meaning that the two frusta occupy the ...
1answer
116 views

### Texturing an “infinite” plane

I am rendering an infinite plane as described in the following answers: https://stackoverflow.com/questions/12965161/rendering-infinitely-large-plane https://stackoverflow.com/questions/7380250/how-...
0answers
88 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 ...
2answers
107 views

### Should you measure mesh complexity in triangles or vertices?

I have seen people using either vertices or triangles as a quick heuristic to estimate mesh memory usage and mesh rendering time. I always thought vertices were better, because the number of vertices ...
2answers
844 views

### Why are oct trees so much more common than hash tables?

When reading papers I commonly find Oct tree implementations of geometry representations to sort the data. However whenever I think about the problem hash tables seem better overall. Hash tables have ...
1answer
71 views

### Given a picture of a unit square at an arbitrary angle and position, how can I reconstruct the distance and orientation?

To simplify, assume faces and corners of the square are labeled and the camera lens if whatever makes this simplest (a 90 degree field of view projection?) The application: using a known and labeled ...
0answers
269 views

### ray-triangle intersection precision - c++

I'm building a software renderer but I think there might be some problem with my ray-triangle intersection accuracy. I implemented the algorithm referring to ...
1answer
66 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 ...
1answer
59 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 ...
1answer
3k 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...
1answer
73 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] ...
1answer
114 views

### Computing perspective directly

Assume the screen is axis aligned with origin at 0 and there is absolutely no view transformation. in other words we will simply try to project the model onto the screen plane following perspective. ...
0answers
41 views

### Simulating vanishing points shader

How do I create a vertex shader that allows to choose 3 non aligned direction vectors and then allows to morph all vectors positions such that every vertex is remapped so that two vertices that are ...
0answers
54 views

### Sorting my geometry for alpha testing

Here is my predicament. I am trying to draw a multitude of dots that leave trails behind them real time. Heres the difficulty, that line fades. Each dot line has a defined z position and the goal ...
1answer
41 views

### Remove orphaned geometry after Constructive Solid Geometry operation

I have used a library to perform a Constructive Solid Geometry difference operation, which has left me with orphaned geometry as well as imperfections. Is there an approach/algorithm that will allow ...
0answers
47 views

### How to ensure that the raytrcing coordinate system is teh same as the projection one?

I have 2 shading models right now, one is using voxels the other one is the standard projection absed renderization method. Putting them side by side I have noticed that no matter what I do one is ...
1answer
45 views

### Pathtracing line and point primitives?

So I'm in the midst of implementing a path-tracer. I have chosen to use Assimp library to load models and scene information. According to it, it will provide mesh data and meshes may contain point, ...
0answers
28 views

### How are non-triangular wavefront meshes handled?

I have a wavefront loader, however it only works with triangular meshes. I have been trying to think how to handle faces with arbitrarily many vertices but I have no idea how they are to be handled ...
1answer
76 views

### how to draw mesh equal distance from irregular shape geometry bounding box

I am given an irregular geometry shape with its vertices, bounding box information. How to draw a smooth mesh equal distance from that irregular geometry shape's bounding box? Please refer to the ...
1answer
83 views

### Path Tracer - Model loading Libraries?

so I am in the process of making my own GPU path tracer based on OpenCL as part of my bachelor thesis. I have already made a CPU and a GPU ray tracer based on OpenGL compute shaders but all I have ray-...
0answers
44 views

### Transform a cube in a truncated pyramid

I have to calculate the modeling transformation that transforms a cube of side=1 centered in (0,0,0) in a rectangular truncated pyramid of height=2,sides of basic rectangle equals to 3 and 2, sides of ...
1answer
96 views

### Subdivide a triangle along its UVs

I'm looking into a problem that first occured very trivial to me, but i got stuck and it's becoming a major issue right now. I'd like to subdivide a triangle by its given UVs, e.g. if the UVs are ...
1answer
405 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 ...
1answer
142 views

### Triangulation of vertices of an ellipsoid

I have the parametric model of an ellipsoid like this: \begin{cases} x=a_1\,cos \,\eta \:cos\,\omega & -\pi\leq\omega\leq\pi \\𝑦 = 𝑎_2\,cos\,\eta\:sin\,\omega \\ z=a_3\,sin \,\eta & -\frac{...
0answers
47 views

### Tanget plane of an image

My problem is about tangent plane. I have an image (m by n). I obtain surface normal vector using machine learning methods. Then i would like to obtain tangent plane for this surface normal. To ...
1answer
157 views

### What's wrong with my computation of the intersection of a ray with a sphere

I am learning GLSL and trying to raytrace a sphere. Here is a fragment shader. It correctly discards fragments which are not on the sphere, but when I try to calculate the point of intersection (and ...
1answer
51 views

### calculating size of rectangle which fully obscures a sphere

I am learning GLSL and want to raytrace a sphere. I am rendering rectangles which sit between the camera and sphere, and do a ray-sphere intersection test in the fragment shader. It almost works: As ...
2answers
398 views

### Euler Angles - Gimbal lock, why non-orthogonal axes

Already asked this question on mathexchange but didn't got any promising answers so posting it here Since I'm from a CG background. I really can't understand how and why gimbal lock occurs using ...
0answers
37 views

### Which vertices to use to create side of model

I hope I'm asking on the right StackExchange site. Apologies if I'm not. I want to generate 3D triangulated models of optical lenses, circular in shape. I can create the meshes for the front and back ...
1answer
104 views

### Heirarchy in Euler rotations

Why is there necessarily a hierarchy in Euler rotations? For example I need to decide that I want x to affect y and z z to affect y y to affect nothing. What if ...
1answer
91 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, ...
1answer
137 views

### Rounding a corner formed by Arc and Line

Given shapes like these, which contain just Arcs and lines, I want to round all its corners with certain radius. I know the vertices of the lines & arcs these shapes. I can round the corners of a ...
0answers
37 views

### 3D reconstruction using 2D matched points

I have 2 images, called left and right images. I have some matched points $[c_l,r_l]$ and $[c_r,r_r]$ in both of them (these points are in pixel coordinates). For a 3D point in the real world, they ...
1answer
65 views

### Are there LOD Algorithms that work through removing objects?

I want to implement a LOD algorithm that reduces the number of objects rather than the number of vertices of the objects. Imagine a forest, then close up I want to see all the trees but moving away ...
1answer
238 views

### Visualizing the Lane-Riesenfeld Algorithm

Ok so, I keep reading papers about this and non of them have pictures. The lane Riesenfeld algorithm provides a way to subdivide set of points with B-spline conversion. The quesiton is simple HOW? If ...
1answer
651 views

### Rounding the edges in a mitered line segment inside of a fragment shader

As some of you may know drawing line segments between sets of points is really difficult especially when you want wide lines or variable widths. Because I am looking to draw a few hundred of these ...
0answers
34 views

### Program to visualize geodesics and linear projection of an ellipsoid simultaneously

I am trying to solve a problem in computer graphics but to do it I need to be able to see a comparison of geodesic lines and straigth line projections on the ellipsoid. I have not been able to ...
1answer
219 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 ...
0answers
104 views

### How is it possible to generate geometries using space folding?

There is a TED presentation, where we see really good looking geometries, which are generated using space folding. I get the general idea, that we start from a basic geometry like a cube, and then ...
1answer
726 views

### What's the difference between geometric surface normal and shading surface normal?

In my opinion, geometric surface normal is the cross product of triangle edge vectors, and shading surface normal is the interpolation of the predefined normals at the three vertexes. I used Mitsuba ...
1answer
52 views

### Is it possible to draw the intersection of two squares of known dimension using only x,y coordinates and without an if statement?

Say I have two squares, both 10x10, with some small, unknown overlap. Is there a way to draw the intersection of these two squares using the width, height and x,y coordinates of each square, while ...
0answers
108 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 ...
1answer
57 views

### constrain based dynamic geometry generation [closed]

I have a bounding box of 1000m x 1000m. I randomly generate 10000 points (sites) inside it. Now, how can I create 'n' polygons (geometries) within the bounding box based on a given constrain. The ...
1answer
216 views

### List of triangles to minimum amount of convex polygons

I'm in search for an algorithm that takes the left side of the following graphic as an input and outputs a minimal amount of convex polygons as seen on the right side of the graphic. The input mesh ...
0answers
44 views

### Rectangle bounds of isometric object to isometric bounds

This might sound confusing, but this is what I'm trying to achieve: project to: I already have an algorithm in my mind, where we simply detect the corners touching the Cartesian rectangle and ...
1answer
171 views

### Convex non simple polygon?

Existence question: Can there exist a convex polygon witch is not a simple polygon?