point

gnuplot matrix or plot : display both color and point value

十年热恋 提交于 2019-12-04 20:58:31
问题 I'm using gnuplot to analysis data. And I frequently use palette and matrix. However whenever I use that, precision is always problem. If I increase precision by define many color, it is difficult to remember and to read. If I decrease number of color to clear comparison, precision become decrease. So I'm thinking matrix with plot number. If I can display both color and number, it will be more easy to see and analysis. At least I want display only number,(Just use excel is a one choice but I

Points appear on map google python code

守給你的承諾、 提交于 2019-12-04 20:42:20
I'm using python to develop a map (Google Maps) and add some points in specific location. After searching I found it can be done using pygmaps . So I installed it using pip , then I wrote this code and I need to add points and open a webpage for the map find the points there. import pygmaps import webbrowser mymap = pygmaps.maps(37.428, -122.145, 16) mymap.setgrids(37.42, 37.43, 0.001, -122.15, -122.14, 0.001) mymap.addpoint(37.427, -122.145, "#0000FF") mymap.addradpoint(37.429, -122.145, 95, "#FF0000") path = [(37.429, -122.145),(37.428, -122.145),(37.427, -122.145),(37.427, -122.146),(37.427

Given two points (x1,y1) (x2,y2), how can I compute N different points evenly lying on the line between the given points

六月ゝ 毕业季﹏ 提交于 2019-12-04 19:02:54
I have two points and I would like to compute n evenly distributed points on top of the line created by the given line. How could I perform this in c++? Linear interpolation (affectionately called lerp by the Graphics community) is what you want. Given the end points it can generate the points lying in between with a parameter t . Let the end points be A (Ax, Ay) and B (Bx, By) . The vector spanning from A to B would be given by V = B − A = <Vx, Vy> L(t) = A + tV This essentially means that starting from the point A , we scale the vector V with the scalar t ; the point A is displaced by this

Defining an “inside room point” from wall points

那年仲夏 提交于 2019-12-04 18:07:12
I need help with one tricky thing that I've tried to solve for a couple of days now. It feels like it should be relatively easy and that I am simply missing something somewhere. I have an array defining each wall point (black dots) and I want to create a new inside point (green dots) for each wall point. The distance between each wall point and inside point should be 600. I made a picture to show what I mean: I'm writing this in javascript with aid of WebGL (ThreeJS). I'm going to propose a solution similar to David's, but using vertices rather than line segments. My solution also requires a

postgis distance between two points on a line

纵饮孤独 提交于 2019-12-04 15:58:07
问题 I have a route (as a LINESTRING) and two vehicles with a position (as a POINT). I need to calculate the distance between the two points over the route. As an added difficulty I think I also need to measure the distance from the point to the closest point on the line in the case that the vehicle is not on the route at that moment. I'm using this to find the closest point on the route: SELECT ST_AsText(ST_ClosestPoint(pt,line)) AS cp_pt_line, ST_AsText(ST_ClosestPoint(line,pt)) As cp_line_pt

Find Coordinates for point on screen?

非 Y 不嫁゛ 提交于 2019-12-04 14:04:48
The thing is I have some graphics shown in a form, rectangle for example, and I want to capture when the point gets over thees fields. So I Thoght I try to find the corrrdinates for thees rectangles, but as thay are the coords in the form it dose not match the ones with the mouse location. So I wonder is there a way to find what coord on the screen a Point has on the screen and not in the form or controller? Each control hs PointToFoo methods for conversion. Note that you should call this from the parent of the object who's location you want: Point scrPos = this.PointToScreen(panel1.Location);

Solving a cubic to find nearest point on a curve to a point

蹲街弑〆低调 提交于 2019-12-04 13:01:51
Ok, I have a projectile that has its position defined such that: a.x = initialX + initialDX * time; a.y = initialY + initialDY * time + 0.5 * gravtiy * time^2; I want to be able to predict which obstacles in my environment this projectile will collide with. I plan on checking the distance from A the closest point on the curve to the point P . I figure that at the point A the tangent to the curve will be perpendicular to the vector AP , and that the tangent to the curve at A will simply be the velocity V of the projectile at that point. AP dot V = 0 ap.x = initialX + initialDX * time - p.x; ap

Finding all points in certain radius of another point

拟墨画扇 提交于 2019-12-04 12:21:10
问题 I am making a simple game and stumbled upon this problem. Assume several points in 2D space. What I want is to make points close to each other interact in some way. Let me throw a picture here for better understanding of the problem: Now, the problem isn't about computing the distance . I know how to do that. At first I had around 10 points and I could simply check every combination, but as you can already assume, this is extremely inefficient with increasing number of points. What if I had a

How to test if a point inside area with lat/lon and radius using Java?

扶醉桌前 提交于 2019-12-04 11:44:17
I've to write a method that has the following signature public class Position { double longitude; double latitude; } boolean isInsideTheArea(Position center, double radius, Position point); So if point is inside the area that has the center as its center and radius as its radius in miles , this should return true , false otherwise. Use the Haversine formula to compute the distance between center and point . If that distance is greater than radius , return false ; otherwise return true . Pseudocode: def haversineDistance(a, b): # snip... return foo def isInsideTheArea (center, radius, point):

Algorithm to generate equally distributed points in a polygon

↘锁芯ラ 提交于 2019-12-04 10:37:22
I am looking for an algorithm to generate equally distributed points inside a polygon. Here is the scenario: I have a polygon specified by the coordinates of the points at the corners (x, y) for each point. And I have the number of points to generate inside the polygon. For example lets say I have a polygon containing 5 points: (1, 1) ; (1, 2) ; (2, 3) ; (3, 2) ; and (3, 1) And I need to generate 20 equally distanced points inside that polygon. Note: Some polygons may not support equally distributed points, but I'm looking to distribute the points in a way to cover all the region of the