Skip to main content
11 votes
Accepted

Computing a rotation: complex numbers vs rotation matrix

Both methods end up doing the same calculations when you break it down. Rotating a vector $u$ with a matrix: $$\begin{bmatrix}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta\end{bmatrix} \...
Nathan Reed's user avatar
  • 25.2k
10 votes
Accepted

How can I check if a polygon can completely contain a circle of a certain radius?

This is likely more complicated than you would prefer, but: Compute the medial axis, which immediately yields the largest disks that fit inside the polygon: their centers are vertices (degree $\ge 3$) ...
Joseph O'Rourke's user avatar
6 votes
Accepted

How to project a 3D point onto a plane along another (axis) vector?

You can determine x by calculating line-plane intersection. Your line starts at P and has direction ...
JarkkoL's user avatar
  • 3,666
6 votes

How to build a 3d model from 2d pictures

This is a bit different from a conventional photogrammetry problem. You're not trying to estimate a 3D world from 2D projections. You have actual 3D information - you have the imaging slices - and you ...
Jacob Panikulam's user avatar
6 votes
Accepted

Minimum requirements to uniquely represent a 3D object in space

A rigid body has 6 degrees of freedom, in 3D- space. So that means you need 6 values to represent the object. The common way to do this is to store a position vector for position and 3 rotations. But ...
joojaa's user avatar
  • 8,447
6 votes
Accepted

results of Curved PN-Triangles algorithm has visible edges

As mentioned in the paper PN-triangles are only $C^0$ smooth with respect to adjacent triangles (although they are $G^1$ at vertices). This means that a PN triangle mesh is continuous in position, but ...
Reynolds's user avatar
  • 1,282
5 votes
Accepted

Apply distortion to Bézier surface

Edit: changed the answer according to new images and clarification. for every control point p(k, n) p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n) where <...
Cem Kalyoncu's user avatar
5 votes

Computational Geometry - Triangulation

What it means to "triangulate complex 3D objects" is not unambiguous. Just one possible interpretation: You have a 3D polygon in space, and you want to triangulate that. This is NP-hard: Barequet, ...
Joseph O'Rourke's user avatar
5 votes
Accepted

Convex non simple polygon?

For a polygon to be convex the outside angle of the polygon has to be more than or equal to 180 degrees. Now at intersection of 2 lines the outermost angle has to be less than 180 degrees for the ...
joojaa's user avatar
  • 8,447
5 votes

How to describe a position of a point w.r.t the position and orientation of 3 other points

FYI, the 3 other points lie on a plane Of course they do. Any set of three points defines a plane (except in the degenerate case joojaa mentions, where they lie on many planes). If the points are $p$,...
Dan Hulme's user avatar
  • 6,870
5 votes
Accepted

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

Your existing opinion is correct, though there's one extra detail. The geometric normal is the normal of the actual triangle, based on the vertices' positions (the cross-product of edge vectors, as ...
Dan Hulme's user avatar
  • 6,870
5 votes

Are some 3D objects "solid"? Do they have internal density? If so, when, and in which file formats?

Assuming what you’re referring to is this Slicer and the models are the ones produced by its Model Maker module: it looks like it’s creating hollow, surface-only models. Specifically, judging by the ...
Noah Witherspoon's user avatar
4 votes

Estimating the area of a triangle-circle intersection

Working Towards an Exact solution Just some quick thought before I must run! Ok, let us turn the problem on its head. What if one does not calculate the area of the triangle cut by the circle. ...
joojaa's user avatar
  • 8,447
4 votes
Accepted

Extract visible vertices from a 3D geometry model

Idea A: Draw an invisible mesh that will occlude the points we don't want. Create a mesh from the point cloud. Render that mesh to a depth buffer but not to the color buffer. Render the point cloud ...
Julien Guertault's user avatar
4 votes
Accepted

Triangulation of vertices of an ellipsoid

If you sample the two parameters $\eta$ and $\omega$ with steps $d\eta$ and $d\omega$, then you'll get a grid of points $v_{ij} = f(i\;d\eta,j\;d\omega)$. Any four adjacent points will define a ...
gilgamec's user avatar
  • 901
4 votes
Accepted

Creating a Smooth 3D Mesh from a 2D Outline

One algorithm that's pretty good for this, but very difficult to implement is to find the Medial Axis of the shape and then have various profiles that are based on the signed distance from the medial ...
user1118321's user avatar
  • 3,441
4 votes

How to compute normal in quartic Walton-Meek's Gregory patch in tessellation shader?

Computing exact derivatives of Gregory patches is hard due to the rational blending that occurs for the inner control points. Many people thus opt for an easier solution where the rational blending ...
Reynolds's user avatar
  • 1,282
4 votes
Accepted

Why is the valence of regular vertices 6?

If require that all faces have the same number of sides $s$ and require that all vertices also have a certain valency $t$. We see that the following relation between edges, and faces hold for a ...
Reynolds's user avatar
  • 1,282
3 votes

Fill the plane with pentagons as tightly as possible in a regular way

If I understand the general idea correctly, you are going to close the gaps which are appearing after further structure growth. I cannot do it algorithmically but geometrically it is quite easy to do. ...
Mikhail V's user avatar
  • 151
3 votes
Accepted

Mapping of cylinder to 2D plane

You already have a 2D parametrisation, don't you? One of the dimensions is the longitudal axis (in mm?) and the other is the circumferential axis (in degrees). The only problem I see is when you have ...
Supernormal's user avatar
3 votes

File format for swept profile with changing normal

Well realistically your choices are either IGES or STEP. IGES is slightly simpler but you will not successfully write either format without buying the standard (which in case of step is actually so ...
joojaa's user avatar
  • 8,447
3 votes

An algorithm to find the area of intersection between a convex polygon and a 3D polyhedron?

There are different numerical approximations you could use: A simple solution is to use brute-force Monte Carlo integration. Distribute $N$ random points on the polygon and calculate the number of ...
JarkkoL's user avatar
  • 3,666
3 votes

Extract visible vertices from a 3D geometry model

Conceptually simplest would be to treat it as a ray-casting problem, representing each point as a small sphere. It should work like the shadow rays in a conventional raytracer: iterate over all of ...
Dan Hulme's user avatar
  • 6,870
3 votes

How to describe a position of a point w.r.t the position and orientation of 3 other points

What you're looking for is closest point on a plane for the 3rd direction but since @DanHulme described this I would not repeat it. You can pretty easily use affine transformation matrices for this. ...
joojaa's user avatar
  • 8,447
3 votes
Accepted

human visual: relation of Distance and DPI

According to a review by Legge & Bigelow the arc or degrees of visual angle ($\alpha$) is, $$ \alpha = 57.3 \times S/D, $$ where S is height of object and D is distance to object. [1] $S/D$ is ...
joojaa's user avatar
  • 8,447
3 votes

Vertices of a regular polygon given the incircle radius

what is the relation between radius of the in-circle and circum-circle of a polygon? That is $cos ( \frac{2\pi}{n}*\frac{1}{2} ) = cos ( \frac{\pi}{n})$ The triangle with edges from the center to ...
ratchet freak's user avatar
3 votes
Accepted

Radiative Transfer Equation for Photorealistic Rendering

I suspect the answer to (a) is simply performance. Full volumetric path tracing / photon mapping based on the RTE can certainly be done (and I'm sure it sometimes is), but it's very expensive and ...
Nathan Reed's user avatar
  • 25.2k
3 votes
Accepted

Calculating the gradient of a triangular mesh

A function $f$ on your triangulated surface is an assignment of real numbers on the vertices of the triangulation and therefore $f \in \mathbb{R}^{|\mathcal{V}|}$. According to the continuous theory, ...
Futurologist's user avatar
3 votes
Accepted

Calculate normals from vertices

You are not too far off with your second averaging approach. The problem is, that the area is the wrong weighting factor for what you want to achieve. You want each of the 3 sides of the cube to ...
wychmaster's user avatar
  • 1,251
3 votes
Accepted

Dynamic Ray-Triangle Intersection

There are 2 ways to go about intersecting the triangle. Let the vertices of the triangle have positions $v_1, v_2, v_3$. Let the ray have origin $o$ and direction $d$. Let the model (4x4) matrix be $M$...
lightxbulb's user avatar
  • 2,226

Only top scored, non community-wiki answers of a minimum length are eligible