I have a mesh (suppose it can be circle, or rectangular,square or an arc). The geometry of the mesh can be anything. I can click on mesh at any position. From relative to the clicked position, I want to get its right, left top and bottom position of the mesh. Maybe the picture explain it better then my words
Tag: Mesh
Setup Ubuntu as a router with Mesh, 4G, OpenVPN and WAN failover
I’m looking for advice on a rather complex Ubuntu 18.04 setup.
Primarily the router will just talk with other “nodes” on a local network using mesh and backhaul ‘internet’ data through 4G. If mesh is unavailable it should use 4G to talk to another node’s 4G for all traffic. This means all routers need to ‘listen’ on 4G in case another node is sending this way. Additionally, if a node does not have 4G but does have mesh is should use the mesh to connect to another node and use that particular nodes 4G connection. I have attached a few diagrams which hopefully make this more clear. In order to connect the 4G connections together we intend to use OpenVPN (server is already setup and configured).
The singleboard computer and transceiver hardware is:
Gateworks GW6200 with a 2.4Ghz transceiver (wanted as a local mesh radio) and Sierra Wireless 4G modem (for a WAN connection).
Image for all connected noted. The primary connection is mesh with 4G failover
A single mesh link is broken so AV1 will be used to route traffic between AV2 and AV 3. 4G is still used as some data is sent to the internet and only local data is sent over the mesh
Here mesh only exists between two nodes to AV3 gets all data sent and received via Wifi until it is back within mesh range.
Here AV1 has lost 4G signal so it uses it’s nearest mesh node to sent any internet connections and local traffic over the 4G tunnel
Segment 3d mesh into multiple 3d meshes with equal size
Given a 3d mesh, for example the stanford bunny, how can I segment the mesh in a way that each segment has a roughly equal size between them? Assuming the target number of segments is given as an input.
To keep things simple, let’s start with assuming the vertices are uniformly distributed in the mesh, therefore the problem can be simplified to segmenting the mesh so each segment has roughly the same vertices.
I’ve seen methods like finding a bounding box of the mesh, and divide the bounding box uniformly and segment the mesh based on that. But the problem with this method is the size of each segment can be quite different if the shape of the original mesh is irregular.
I’ve also seen a method based on Shape Diameter Function, but again the size of each segment can be different depends on the original mesh.
The problem is I am not sure what’s the right keyword to look up on Google to see what’s being done in the literature. I would appreciate any pointers.
Mesh a hollow cylinder
Questions seems to be simple answerde, but in Mathemtica v11.0.1 I didn’t find a solution
Needs["NDSolve`FEM`"]; scheibe =ParametricRegion[{ r Cos[\[CurlyPhi]], r Sin[\[CurlyPhi]], z}, {{r, 1/2, 1}, {\[CurlyPhi], 0, 2 Pi}, {z, 1, 1}}]; RegionPlot3D[scheibe, Boxed > False]
The region scheibe
is ok but meshing
ToElementMesh[scheibe] DiscretizeGraphics [scheibe]
fails in both cases.
What could be the reason? Is there a workaround? Thanks.
The purpose behind my question is, I want to solve poisson equation in cylindrical coordinates in a predefined mesh.
Generate triangular surface mesh of convex hull spanned by 8 points in 3DSpace
I am looking for a numerically efficient algorithm to get a triangular surface mesh of the convex hull given by 8 points in threedimensional space.
For context, the use case is the following:
I have a numerical Simulation calculating the time evolution of a field with three components on a lattice. Say we have lattice coordinates $ (i,j,k)$ , then every lattice point $ (i,j,k)$ has a field vector $ (\phi_1, \phi_2 , \phi_3)$ attached.
For relevant physics, I need to now take unit cells on my lattice, so the 8 corners of a little cube of my lattice. I take the field vectors $ (\phi_1, \phi_2 , \phi_3)$ of every corner of my unit cell and then interpret their convex hull as a closed volume in $ \phi$ space, with $ \phi$ space being the 3D space given by the $ (\phi_1,\phi_2,\phi_3)$ coordinates.
I am now interested if the volume spanned by these 8 points in $ \phi$ space does the following things:

If it contains the origin, $ (0 ,0 ,0 )$

If a Ray traveling from the origin in $ (1,0,0)$ direction pierces my given volume
The idea to evaluate both 1.) and 2.) at the same time is to decompose the surface of the convex hull into triangles. For a triangle in 3Dimensional space, it is easy to evaluate whether it is pierced by my given Ray in $ (1,0,0)$ direction. I can then count how many triangles are pierced. If exactly two triangles are pierced (because of convexity), I know the cell satisfies condition 2.). If exactly one triangle is pierced, I know the origin has to lie inside my volume, that is condition 1.) is satisfied. Lastly, when no triangles are pierced, none of the above apply.
I think this approach is probably relatively fast. Speed is critical, because I have approximately $ 10^6 … 10^9$ cells to evaluate per sweep across my lattice.
I’d be interested in any other approaches as well, though.
Update: So, I think possibly a 3DGiftWrapping algorithm would atleast produce the required result, because it creates the convex hull by consecutively finding triangles on the surface? I will have to try that out tomorrow.
Can I do better than that in terms of efficiency?
Apple, TPLink deco mesh network
I recently hooked up a deco mesh network from TP link. I’m having an issue with apple devices losing connection frequently, showing connection but no internet access, or it randomly coming up and saying wrong password. I’m wondering on the deco m5’s I have 3 of them if the problem is that the 2.4ghz and 5 ghz I can’t give them differ names and passwords. I’m wondering if this is part of the problem. When the devices aren’t connected they get a wierd 169.xxx.x.xxx address with a subnet 255.255.0.0. When they are working properly they have a 192.168.0.xxx. I’ve tried everything with the devices as far as resetting network settings, forgetting the network, all that kinda stuff. Happens on all apple devices. Every other device works fine no issues. Also wondering if it is something with all the Qualcomm stuff going on in the news. Thanks for any advice.
area of the projection of a mesh
Given:
 a quadrilateral mesh that forms the surface of a sphere
 a linear projection from 3D to 2D (a 2×3 matrix)
The mesh is not convex in general, but it is regular enough that we know that the projected image of the mesh in the plane is a polygon without holes (the image is simply connected).
Is there a fast method for computing the area of this polygon ?
I can compute an approximate area by scan converting all the quadrilaterals, but maybe there is a clever algorithm that can give a more precise number. A method for computing this polygon explicitly would be OK.
What is the difference between Heterogeneous Wireless Networks and mesh Heterogeneous Wireless Networks
I’ve read about the Heterogeneous Wireless Networks, but I cant understand what’s the main differences between Heterogeneous Wireless Networks and mesh Heterogeneous Wireless Networks.
Problems generating procedural mesh
I have this code below that I found on catlikecoding that generates a procedural grid that I want to apply noise to, however once I go over a certain value it does expand vertically. Can anyone see why it wouldn’t?
For example, 100×100:
However, 500×500 is clearly wrong:
Code used:
using UnityEngine; [RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] public class Island : MonoBehaviour { public int xSize, ySize; private Mesh mesh; private Vector3[] vertices; private void Awake () { Generate(); } private void Generate () { GetComponent<MeshFilter>().mesh = mesh = new Mesh(); mesh.name = "Procedural Island"; vertices = new Vector3[(xSize + 1) * (ySize + 1)]; Vector2[] uv = new Vector2[vertices.Length]; for (int i = 0, y = 0; y <= ySize; y++) { for (int x = 0; x <= xSize; x++, i++) { vertices[i] = new Vector3(x, y); uv[i] = new Vector2((float)x / xSize, (float)y / ySize); } } mesh.vertices = vertices; mesh.uv = uv; int[] triangles = new int[xSize * ySize * 6]; for (int ti = 0, vi = 0, y = 0; y < ySize; y++, vi++) { for (int x = 0; x < xSize; x++, ti += 6, vi++) { triangles[ti] = vi; triangles[ti + 3] = triangles[ti + 2] = vi + 1; triangles[ti + 4] = triangles[ti + 1] = vi + xSize + 1; triangles[ti + 5] = vi + xSize + 2; } } mesh.triangles = triangles; mesh.RecalculateNormals(); } }
2D Finite element code that creates a mesh for voltage distribution [MATLAB]
I am trying to create a finite element code that describes the voltage along a coaxial cable. I have pasted an image of where the boundaries are located but I do not think you need to know much about the finite element method.
Here is the code:
function FEM2D % % This function demonstrates how the 2D Laplace equation with prescribed % essential boundary conditions is solved by the finite element method. % clc, clear, close all; % geometric parameters of a rectangule domain % These are in cm % *** SPLITTING IN QUARTER SIZE REDUCES # OF ELEMENTS *** % *** WHEN LEFT AS FULL SIZE AND IN mm # OF ELEMENTS CREATES A PROPER % MESH** Length = 12.5e3; Height = 10e3; % Element Size ElementSize = .001; % Number Of Elements NumberOfElementInX = 2*(floor(0.5*Length/ElementSize)+1); NumberOfElementInY = ceil(Height/ElementSize); display(NumberOfElementInX); display(NumberOfElementInY); ElementSizeInX = Length/NumberOfElementInX; ElementSizeInY = Height/NumberOfElementInY; display(ElementSizeInX); display(ElementSizeInY); % Node coordinates NumberOfNode = (NumberOfElementInX+1)*(NumberOfElementInY+1); NumberOfElement = 2*NumberOfElementInX*NumberOfElementInY; X = zeros(NumberOfNode,1); Y = zeros(NumberOfNode,1); for j = 1 : NumberOfElementInY+1 for i = 1 : NumberOfElementInX+1 n = (j1)*(NumberOfElementInX+1)+i; X(n) = (i1)*ElementSizeInX; Y(n) = (j1)*ElementSizeInY; end end % element node connectivity ElementNode = zeros(NumberOfElement,3); for j = 1 : NumberOfElementInY for i = 1 : NumberOfElementInX n = (j1)*NumberOfElementInX+i; if i <= NumberOfElementInX/2 ElementNode(2*n1, 1) = (j1)*(NumberOfElementInX+1)+i; ElementNode(2*n1, 2) = j*(NumberOfElementInX+1)+i+1; ElementNode(2*n1, 3) = j*(NumberOfElementInX+1)+i; ElementNode(2*n, 1) = (j1)*(NumberOfElementInX+1)+i; ElementNode(2*n, 2) = (j1)*(NumberOfElementInX+1)+i+1; ElementNode(2*n, 3) = j*(NumberOfElementInX+1)+i+1; else ElementNode(2*n1, 1) = (j1)*(NumberOfElementInX+1)+i; ElementNode(2*n1, 2) = (j1)*(NumberOfElementInX+1)+i+1; ElementNode(2*n1, 3) = j*(NumberOfElementInX+1)+i; ElementNode(2*n, 1) = (j1)*(NumberOfElementInX+1)+i+1; ElementNode(2*n, 2) = j*(NumberOfElementInX+1)+i+1; ElementNode(2*n, 3) = j*(NumberOfElementInX+1)+i; end end end % ElementNode = delaunay(X,Y.*(1+0.001*ElementSize*sin(pi*X/Length))); % %ElementNode = delaunay(X,Y); % show mesh trimesh(ElementNode,X,Y); axis equal end
So here is the mesh I get:
The problem is that I need to find a way to create a rectangular hole in my mesh. This problem would be applicable to a normal plate if the boundaries were on the outsides of my square but in this problem the boundaries are restricted. Basically, how can I remove the smaller rectangle in my problem? I have posted a screenshot of the dimensions of the problem I’m analyzing. Any tips would be appreciated.