triangulation

How to plot an equilateral color triangle?

爷,独闯天下 提交于 2019-12-11 11:59:28
问题 I would like to make a color plot in MATLAB similar to this plot: I have managed to create all the points [x,y] needed in order to create the vertexes and I have a map with colors of each vertex, so I can get the following. But I do not get it how to make the axis work. Code so far: % Equilateral grid tcorner = [0.0, 0.5, 1.0; 0.0, 1.0*sqrt(3)/2, 0.0]; tg = triangle_grid( 1/0.05, tcorner ); tgx = tg(1,:); tgy = tg(2,:); % Create triangles tri = delaunay(tgx,tgy); % Plot h = trisurf(tri, tgx,

Fastest way of converting a quad to a triangle strip?

穿精又带淫゛_ 提交于 2019-12-11 09:43:33
问题 What is the fastest way of converting a quadrilateral (made up of four x,y points) to a triangle strip? I'm well aware of the general triangulation algorithms that exist, but I need a short, well optimized algorithm that deals with quadrilaterals only. My current algorithm does this, which works for most quads but still gets the points mixed up for some: #define fp(f) bounds.p##f /* Sort four points in ascending order by their Y values */ point_sort4_y(&fp(1), &fp(2), &fp(3), &fp(4)); /*

Determining The Coordinates Of A Point Based On Its Known Difference From Three Other Points

落花浮王杯 提交于 2019-12-11 07:27:14
问题 I have the coordinates of three points on a plane. Let's call them X1,Y1, X2,Y2, X3 Y3. I need to calculate X4,Y4 but all I know is: X1,Y1 is 350 units in distance from X4,Y4 X2,Y2 is 200 units in distance from X4,Y4 X3,Y3 is 50 units in distance from X4,Y4 I Know The Exact Values For X1,Y1, X2,Y2, and X3,Y3 How can I determine the exact location of X4,Y4? 回答1: (x - x1)^2 + (y - y1)^2 = r1^2 ------ p (x - x2)^2 + (y - y2)^2 = r2^2 ------ q (x - x3)^2 + (y - y3)^2 = r3^2 ------ r Solve for

Send Multiple Pings without waiting for reply Windows C#

自闭症网瘾萝莉.ら 提交于 2019-12-11 00:49:05
问题 Im currently doing research towards my final year BSc project. The final product will include indoor location tracking functionality. The traditional, or most utilised method seems to be RSSI triangulation, but I am keen to attempt to improve the accuracy of the PING method as I think this would be better suited to locations that may suffer from signal attenuation (the locations I am intending to use the device may have a moderate ammount of radio interference). I was wondering if it was

Getting a proper Delaunay triangulation of an annulus (using python)

浪尽此生 提交于 2019-12-10 23:47:24
问题 I am trying to triangulate an annulus using the scipy.spatial.Delaunay() function, but cannot get the desired result. Here is my code: from scipy.spatial import Delaunay NTheta = 26 NR = 8 a0 = 1.0 #define base rectangle (r,theta) = (u,v) u=np.linspace(0, 2*np.pi, NTheta) v=np.linspace(1*a0, 3*a0, NR) u,v=np.meshgrid(u,v) u=u.flatten() v=v.flatten() #evaluate the parameterization at the flattened u and v x=v*np.cos(u) y=v*np.sin(u) #define 2D points, as input data for the Delaunay

Erratic data cursor behavior for triangulated 3d surfaces in MATLAB R2011b

为君一笑 提交于 2019-12-10 19:11:20
问题 I'm seeing erratic behavior from the data cursor in MATLAB R2011b when applied to plots of triangulated 3d surfaces: Clicking on certain points selects completely different points instead. Example with a cylinder: [r, phi, h] = meshgrid(1, 0:pi/10:2*pi, 0:0.05:1); x = r.*cos(phi); y = r.*sin(phi); z = h; xyz = [x(:) y(:) z(:)]; tri = delaunay(xyz); trimesh(tri, xyz(:,1), xyz(:,2), xyz(:,3), ... 'LineStyle', 'none', 'Marker', '.', 'MarkerSize', 30) view(-37, 28) Then enable data cursor mode

how can i get the camera projection matrix out of calibrateCamera() return values

荒凉一梦 提交于 2019-12-09 10:07:11
问题 I am trying to get a 3x4 camera matrix for triangulation process but calibrateCamera() returns only 3x3 and 4x1 matrices. How can i get the 3x4 out of those matrices? Thanks in advance!! 回答1: calibrateCamera() returns you a 3x3 matrix as cameraMatrix, a 4x1 matrix as distCoeffs, and rvecs and tvecs that are vectors of 3x1 rotation(R) and 3x1 transformation(t) matrices. What you want is ProjectionMatrix, which is multiply [cameraMatrix] by [R|t]. Therefore, it returs you a 3x4 ProjectionMatrix

Finding nearest neighbours of a triangular tesellation

旧街凉风 提交于 2019-12-09 07:46:15
问题 I have a triangular tessellation like the one shown in the figure. Given N number of triangles in the tessellation, I have a N X 3 X 3 array which stores (x, y, z) coordinates of all three vertices of each triangle. My goal is to find for each triangle the neighbouring triangle sharing the same edge. The is an intricate part is the whole setup that I do not repeat the neighbour count. That is if triangle j was already counted as a neighbour of triangle i , then triangle i should not be again

Mesh cutting + triangulation - how to identify holes

こ雲淡風輕ζ 提交于 2019-12-08 10:44:13
问题 I am in the research phase of my programming project. I have to cut a STL mesh with plane and "close" the holes which this cut made - so triangulate them - and make two new meshes this way. Cutting the mesh seems quite simple. I also read about a lot of algorithms which should do the triangulation and even some libraries which can do it (Triangle, poly2tri, CGAL) But, I can't understand how to identify those holes. And even if I would, when I looked into poly2tri algorithm, there is a

Triangulation algorithm using signal strength

主宰稳场 提交于 2019-12-08 09:14:45
问题 I want to have an estimation of the location of a user using the surrounding cell towers. For each tower, I have a location and a signal strength. Now I use a simple means of the coordinates but it is not very accurate (the user is not necessarily between the two towers). I guess the solution is to draw a circle around each tower (the less the signal strength is, the larger it will be) and them compute the intersection between the circles. I usually don't have more than 3 cell towers. Any