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
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,636
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,437
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,238
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,437
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,810
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,810
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

generate multiple border contour

Polygon offsetting is certainly possible to do yourself. It is not nearly as involved as Bezier or B-spline offsetting is. First you want to decide how to deal with: Areas with no info, in essence ...
joojaa's user avatar
  • 8,437
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,437
4 votes
Accepted

Closed form solution to a problem of tangent circles

First let us solve the radius of your circle. You can see that the centers of the circles form a triangle. There are 8 possible triangles, of which 4 are mirror solutions across the line that connects ...
joojaa's user avatar
  • 8,437
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,411
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,238
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,238
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,437
3 votes
Accepted

Solving a set of Geometry Constraints - What's that Method called?

Its called a geometric constraints solver (a good primer on subject). You can find a open source solver as part of Open Cascade but its a bit convoluted to get going. A simpler solution for just ...
joojaa's user avatar
  • 8,437
3 votes
Accepted

Can I run polygon insetting on the surface of a mesh?

This is more of a long comment Yes you can do this. The problem lies in how you measure the surface. I tried to do this manually by progressively extruding tubes along the edges, and finding their ...
joojaa's user avatar
  • 8,437
3 votes

OpenGL with SFML, create an n-pointed star?

Try starting at the origin, then dividing 360 degrees by n to find some useful angles for the points of your star. I hope this drawing will help you to find a solution. Now that you have the angle ...
Chara's user avatar
  • 283
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

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,636
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,810
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,437
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,437

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