computational-geometry

Finding the intersection of the Circle and Infinite Cylinder in 3D space

孤者浪人 提交于 2021-02-20 04:32:04
问题 Finding the intersection of the Circle and Infinite Cylinder. (all in 3D) • Circle is defined by center, plane in which it lies and radius. • Cylinder is defined by axis and radius. how can i get the intersection of these two? 回答1: WLOG the cylinder has equation X² + Y² = 1 (if not, you can make it so by translation, rotation and scaling). Then the parametric equation of the circle is P = C + U cos t + V sin t where C is the center point and U , V two orthogonal vectors in the circle plane,

How to perform Boolean operation on thin surface using libigl?

为君一笑 提交于 2021-02-19 08:17:11
问题 I am currently working on libigl, and trying to grab the part of the a surface which locates inside another body. However, it seems than libigl only works with closed bodies: Here is the code which works for closed bodies. VA , VF is a triangular prism and VB , FB is a tetrahedron: #include <igl/readOFF.h> //#define IGL_NO_CORK //#undef IGL_STATIC_LIBRARY #include <igl/copyleft/cgal/mesh_boolean.h> #include <igl/viewer/Viewer.h> #include <Eigen/Core> #include <iostream> Eigen::MatrixXd VA,VB

Interpolating missing contour lines between existing contour lines

不问归期 提交于 2021-02-19 05:41:47
问题 Contour lines (aka isolines) are curves that trace constant values across a 2D scalar field. For example, in a geographical map you might have contour lines to illustrate the elevation of the terrain by showing where the elevation is constant. In this case, let's store contour lines as lists of points on the map. Suppose you have map that has several contour lines at known elevations, and otherwise you know nothing about the elevations of the map. What algorithm would you use to fill in

Generating equidistance points along the boundary of a polygon but CW/CCW

房东的猫 提交于 2021-02-08 06:15:36
问题 Suppose I have the vertices of a polygon and they are all oriented CCW. I wish to generate n equidistance points along the boundary of this polygon. Does anyone know of any existing package that does this, and if not, an algorithm one can use? I am working in Python. For example, here is what I would like if the polygon in question is a rectangle: enter image description here 回答1: shapely : import shapely.geometry as sg import shapely.affinity as sa import matplotlib.pyplot as P import numpy

Generating equidistance points along the boundary of a polygon but CW/CCW

╄→гoц情女王★ 提交于 2021-02-08 06:15:32
问题 Suppose I have the vertices of a polygon and they are all oriented CCW. I wish to generate n equidistance points along the boundary of this polygon. Does anyone know of any existing package that does this, and if not, an algorithm one can use? I am working in Python. For example, here is what I would like if the polygon in question is a rectangle: enter image description here 回答1: shapely : import shapely.geometry as sg import shapely.affinity as sa import matplotlib.pyplot as P import numpy

Generating equidistance points along the boundary of a polygon but CW/CCW

ε祈祈猫儿з 提交于 2021-02-08 06:15:08
问题 Suppose I have the vertices of a polygon and they are all oriented CCW. I wish to generate n equidistance points along the boundary of this polygon. Does anyone know of any existing package that does this, and if not, an algorithm one can use? I am working in Python. For example, here is what I would like if the polygon in question is a rectangle: enter image description here 回答1: shapely : import shapely.geometry as sg import shapely.affinity as sa import matplotlib.pyplot as P import numpy

How to correctly compute direct kinematics for a delta robot?

对着背影说爱祢 提交于 2021-02-07 06:03:19
问题 I'm trying to put together a simple simulation for a delta robot and I'd like to use forward kinematics (direct kinematics) to compute the end effector's position in space by passing 3 angles. I've started with the Trossen Robotics Forum Delta Robot Tutorial and I can understand most of the math, but not all. I'm lost at the last part in forward kinematics, when trying to compute the point where the 3 sphere's intersect. I've looked at spherical coordinates in general but couldn't work out

How to correctly compute direct kinematics for a delta robot?

痞子三分冷 提交于 2021-02-07 06:02:13
问题 I'm trying to put together a simple simulation for a delta robot and I'd like to use forward kinematics (direct kinematics) to compute the end effector's position in space by passing 3 angles. I've started with the Trossen Robotics Forum Delta Robot Tutorial and I can understand most of the math, but not all. I'm lost at the last part in forward kinematics, when trying to compute the point where the 3 sphere's intersect. I've looked at spherical coordinates in general but couldn't work out

How to find the farthest point (from a set of points) from a given point efficiently?

橙三吉。 提交于 2021-02-07 06:00:22
问题 I'm looking for an algorithm or data structure to solve the following problem: You are given a set of points S. And you are given Q queries in form of another point. For every query, find the farthest point in the set from the given point. There are at most 10^5 points in the set and 10^5 queries. All the coordinates for points are in range from 0 to 10^5. I am wondering if there is a way to store the set of points such that we can answer the queries in O(log n) or O(log^2 n) if necessary.

Convert polygons into mesh

♀尐吖头ヾ 提交于 2021-02-07 00:00:24
问题 I have a lot of polygons. Ideally, all the polygons must not overlap one other, but they can be located adjacent to one another. But practically, I would have to allow for slight polygon overlap ( defined by a certain tolerance) because all these polygons are obtained from user hand drawing input, which is not as machine-precised as I want them to be. My question is, is there any software library components that: Allows one to input a range of polygons Check if the polygons are overlapped