api: sending GPS coordinates and viewing in the closest part of the route (Google Maps)

Using React-Native together with react-native-maps and the Google Map and Directions API, I am (currently) trying to make an Android application that shows a route with multiple waypoints on phone A and the user's location. I am able to do this so far. The next part is that I need phone B to see and get exactly the same route (this should not be a problem either), along with getting the position of phone A (I should be able to send coordinates periodically and receive them without problems on the SI phone).

My question is, I want to do it so that the B phone that uses a different version of the application can obtain the location of that user and show it in the NEAREST part of the specified route (in other words, select the route). How am I going to do this?

I am currently using the Google Maps API with Directions and Polyline along with Waypoints to draw a route. The basic idea is that the landmarks are bus stops, therefore, the application on phone B cannot show the bus off the route.

I have searched online, but I have not found anyone with this kind of similar situation. The best idea you could have is to calculate mathematically which route point is closest to the GPS location sent and adjust the marker to it.

graphics and networks: change of color and coordinates of vertices from a list or vertex

I am doing a visualization of a company's email network.
Each vertex represents a person and the color of the vertex represents its position (BOD, CEO, manager, leader).
The thickness of the edges according to the weight (number of emails sent from one person to another).
I also need to move the position of the vertex to be able to show the visualization of the grouping and also to improve the angles.
Here is my adjacency matrix with weights:

weightedNonSym = {
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
   {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
   {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
   {0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
   {0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
   {0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
   {0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0},
   {0, 0, 0, 5, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1},
   {0, 0, 0, 5, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0},
   {0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0},
   {0, 0, 0, 0, 4, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0},
   {0, 0, 0, 0, 5, 0, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 2, 0},
   {0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 5, 3, 0, 0, 0, 0, 0, 0},
   {0, 0, 0, 0, 4, 0, 0, 0, 0, 2, 4, 4, 0, 0, 0, 0, 2, 0},
   {0, 0, 0, 0, 5, 0, 0, 0, 0, 4, 3, 0, 3, 0, 0, 0, 2, 0},
   {0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
   {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0},
   {0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 0}
   };

This is what I have so far for the chart:

    edgeMappingToWeights = 
      Sort(<|Join @@ 
         MapIndexed(Rule @@ #2 -> # &, weightedNonSym/100, {2})|>, 
       Greater);
    edgeCount = 45;
    edge45 = Keys@Take(edgeMappingToWeights, edgeCount);
    color = {{1, 0.6, 0.8}, {1, 0.6, 0.8}, {0.9, 1, 0.7}, {1, 0.7, 
    0.2}, {1, 0.7, 0.2}, {1, 0.7, 0.2}
     , {0.9, 1, 0.9}, {0.9, 1, 0.9}, {0.9, 1, 0.9}, {0.9, 1, 
    0.9}, {0.9, 1, 0.9}, {0.9, 1, 0.9}
     , {0.9, 1, 0.9}, {0.9, 1, 0.9}, {0.9, 1, 0.9}, {0.9, 1, 
    0.9}, {0.9, 1, 0.9}, {0.9, 1, 0.9}
    };     
    GraphPlot(
 Graph(edge45, 
  EdgeStyle -> Thread(edge45 -> (Thickness(#) & /@ weights))), 
 VertexShapeFunction -> (Text(
     Framed(Style(#2 - 1, 8, Black), 
      Background -> (RGBColor(#((1)), #((2)), #((3)) &) & /@ 
         color)), #1) &))

What produces this output:
enter the description of the image here

However, the Vertex fund does not seem to work. And I'm still trying to figure out how to incorporate these coordinates for the vertex:

xcoor = {0, 0, 1, 6, 8, 3, 7, 5, 6, 9, 11, 7, 10, 11, 7, 4, 5, 4};
ycoor = {6, 5, 5.5, 0.5, 11, 5, 2.5, 2.5, 3.5, 6.5, 7.5, 7.5, 11, 10, 
   10, 6, 5, 4};

colors = {RGBColor(1, 0.6, 0.8), RGBColor(1, 0.6, 0.8), 
   RGBColor(0.9, 1, 0.7), RGBColor(1, 0.7, 0.2), 
   RGBColor(1, 0.7, 0.2), RGBColor(1, 0.7, 0.2)
   , RGBColor(0.9, 1, 0.9), RGBColor(0.9, 1, 0.9), 
   RGBColor(0.9, 1, 0.9), RGBColor(0.9, 1, 0.9), 
   RGBColor(0.9, 1, 0.9), RGBColor(0.9, 1, 0.9)
   , RGBColor(0.9, 1, 0.9), RGBColor(0.9, 1, 0.9), 
   RGBColor(0.9, 1, 0.9), RGBColor(0.9, 1, 0.9), 
   RGBColor(0.9, 1, 0.9), RGBColor(0.9, 1, 0.9)};
vertexLabel = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};

polar coordinates: the acceleration is parallel to the position vector in a constant angular velocity movement

This question is taken from Davis, H. F. and Snider, A. D. 1979. Introduction to vector analysis. Allyn and Bacon, Boston.

A particular movement in the plane with a constant angular velocity of $ omega $ but $ r $ varies so that the rate of increase of its acceleration is parallel to the position vector $ vec {R} $. Show that $ ddot {r} = r omega ^ 2/3 $

We know that the position vector in polar coordinates is

$ vec {R} = r vec {u_r} $ and the acceleration vector is

$ vec {a} = ( ddot {r} -r ( dot { theta}) ^ 2) vec {u_r} + (r ddot { theta} +2 dot {r} dot { theta}) vec {u_ theta} $

where $ vec {u_r} $ Y $ vec {u_ theta} $ They are vectors of polar units.

What I also understand from the question is that constant angular velocity means $ theta = omega t $, meaning $ dot { theta} = omega $ Y $ ddot { theta} = 0 $. Substituting in the acceleration equation I get:

$ vec {a} = ( ddot {r} -r omega ^ 2) vec {u_r} + (2 dot {r} omega) vec {u_ theta} $.
If this is parallel to the position vector $ vec {R} $, then

$ vec {a} = ( ddot {r} -r omega ^ 2) vec {u_r} + (2 dot {r} omega) vec {u_ theta} = alpha r vec { u_r} $

That means $ (2 dot {r} omega) = 0 $? Do I understand the question correctly? Where do I go next?

Thank you!!!!

Is there any proof that if 4 points in a parabola have x coordinates that add up to 0, then is there a circle that contains them all?

Thank you for contributing a response to Mathematics Stack Exchange!

  • Please make sure answer the question. Provide details and share your research!

But avoid

  • Ask for help, clarifications or respond to other answers.
  • Make statements based on opinion; Support them with references or personal experience.

Use MathJax to format equations. MathJax reference.

For more information, see our tips on how to write excellent answers.

How can I get the coordinates and radius of Incirle of the triagle with the length of three sides are `a, b, c`?

used to

Insphere(SSSTriangle(5, 7, 9)((1)))

and he got

Sphere ({11/2, Sqrt (11) / 2}, Sqrt (11) / 2)

But I can't get the result when I used

Insphere(SSSTriangle(a, b, c)((1)))

I only have

Insfera ({{0, 0}, {c, 0}, {(-a ^ 2 + b ^ 2 + c ^ 2) / (2 c),
Sqrt ((a + b – c) (a – b + c) (-a + b + c) (a + b + c)) / (2 c)}})

How can I get the correct result?

algorithms: creation of a priority search tree to find the number of points in the range [-inf, qx] X [qy, qy’] of a set of points arranged in coordinates and

A priority search tree can be constructed on a set of points P at the time O (n log (n)) but if the points are arranged in the coordinates and then it takes time O (n). I find algorithms to build the tree when the points are not ordered.

I discovered a way to do this as follows:

  1. Build a BST at points.
    As the points are ordered, it will take time O (n)

  2. Min-Heapify the BST at x coordinates
    This will take time theta (n)

Then the total time complexity will be O (n)

Is this a valid approach to build a Priority Search Tree in O (n) time?

differential geometry – Hesse matrix based on cylindrical coordinates

I have a scalar value function, f, defined in a Euclidean space of 2N dimensions. I want Taylor to expand this function on a point $ P $. I need to be able to explicitly write all the terms in the expansion of at least 2nd order.

If I were working on Cartesian coordinates, I would define a base such that $ P = (x_1 ^ prime, y_1 ^ prime, x_2 ^ prime, y_2 ^ prime, …, x_N ^ prime, y_N ^ prime) $, and Taylor's expansion would be given by
$$ f (x_1, y_1, …) = f (x_1 ^ prime, y_1 ^ prime, …) + sum_ {i = 1} ^ N Big ((x_i-x_i ^ prime) frac { partial f} { partial x_i} | _ {x_1 ^ prime, y_1 ^ prime, …} + (y_i-y_i ^ prime) frac { partial f} { partial y_i} | _ {x_1 ^ prime, y_1 ^ prime, …} Big) + \
frac {1} {2!} sum_ {i = 1} ^ N sum_ {j = 1} ^ N Big ((x_i-x_i ^ prime) (x_j-x_j ^ prime) frac { partial ^ 2 f} { partial x_i partial x_j} | _ {x_1 ^ prime, y_1 ^ prime, …} + (x_i-x_i ^ prime) (y_j-y_j ^ prime) frac { partial ^ 2 f} { partial x_i partial y_j} | _ {x_1 ^ prime, y_1 ^ prime, …} + (y_i-y_i ^ prime) (x_j-x_j ^ prime) frac { partial ^ 2 f} { partial y_i partial x_j} | _ {x_1 ^ prime, y_1 ^ prime, …} + (y_i-y_i ^ prime) (y_j-y_j ^ prime) frac { partial ^ 2 f} { partial y_i partial y_j} | _ {x_1 ^ prime, y_1 ^ prime, …} Big) + … $$

However, I want to work on polar coordinates, $ (r_1, theta_1, r_2, theta_2, …) $. So, I should define $ P = (r_1 ^ prime, theta_1 ^ prime, …) $, and Taylor's expansion, written explicitly in the first order, resembles the following (if I have this correct).

$$ f (r_1, theta_1, r_2, theta_2, …) = f (r_1 ^ prime, theta_1 ^ prime, …) + sum_ {i = 1} ^ N Big (( r_i-r_i ^ prime) frac { partial f} { partial r} | _ {r_1 ^ prime, theta_1 ^ prime, …} + r_i ( theta_i- theta_i ^ prime) frac { partial f} { partial theta_i} | _ {r_1 ^ prime, theta_1 ^ prime, …} Big) + … $$

I feel that this formula should be written somewhere, but I can't find it. I know that the second order terms can be written as a tensor product $ x ^ i H_ {ij} x ^ j $, where $ H_ {ij} $ it is the matrix of Hesse (tensor), which would be useful if I could find an explicit formula for the Hesse in a polar coordinate base.

Can anyone write the second order terms in Taylor's expansion, or equivalently, provide the elements of the Hessian on a polar basis? Keep in mind that I am an engineer, so ideally I am looking for a written response explicitly using polar coordinates, rather than covariant gradients, Levi-Civita symbols, etc. Although any help to make progress towards the explicit formula is greatly appreciated.

Analytical geometry: find the area of ​​a triangle, given three coordinates?

I have been trying the following question:

enter the description of the image here

I can get the answer to part (a) and part (b), but I am struggling to find the area of ​​the triangle from the three coordinates. Here is my work:

enter the description of the image here

I tried to show that the triangle is at right angles, and I used Heron's formula, but I can't seem to get the right answer. Any help would be greatly appreciated!

ag algebraic geometry: degree limits in point coordinates in a variety of zero dimension

Leave $ S = {f_1, dots, f_s in mathbb {Q} (x_1, dots, x_n) } $ have a zero dimension null set $ V subset mathbb {C} ^ n $and suppose that each $ f_i $ has a maximum total grade $ d $.

Is there a shared root? $ ( alpha_1, dots, alpha_n) in V $ such that some $ alpha_i $ has a maximum grade $ dn $ as an algebraic integer (i.e., such that $ ( mathbb {Q} ( alpha_i): mathbb {Q}) leq dn $)?

This goes vaguely in the line of this question, but asks about the "minimum" coordinate instead of the degree of extension necessary to contain all the coordinates. I know there is a limit of $ d ^ n $ (from the link, or through Bezout Inequality followed by Shape Lemma) but I wonder if you can say more after trying some examples and find nothing worse than $ dn $.

linear algebra: why $ frac { partial x} { partial r} = frac { partial r} { partial x} $ in this Jacobian matrix that converts from Cartesian coordinates to polar?

My question comes from Strang & # 39; s Linear Algebra and its Applications 4e, problem 4.4.39 (p. 257):

Strang 257

I don't understand your claim that $ frac { partial x} { partial r} = frac { partial r} { partial x} $. It follows from the conversion to polar coordinates that if $ r = frac {x} { cos theta} $, so $ frac { partial r} { partial x} = frac {1} { cos theta} = sec theta $, straight?

I can fake my way to the right answer by simply inverting the second matrix in problem 37, but I don't think that's the point of the exercise.