point

gnuplot matrix or plot : display both color and point value

谁都会走 提交于 2019-12-03 13:19:01
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 don't want to) or display number with different color.(color determined by point value) If you know the

c# - how to move point a given distance d (and get a new coordinates)

孤街浪徒 提交于 2019-12-03 10:48:33
问题 Hi I was wondering if there is any efficent way to calculating coordinates of point (which was moved distance d from it's original location). Let's say I have a point P(0.3,0.5) and I need to move that point random direction with distance d. So far I did it by random picking new x and y coordinates and I was checking if distance between old and new point equals d. I do realize that is't too eficient way to do that. How would You do it ?? 回答1: Given a point (x1, y1) , we want to find a "random

postgis distance between two points on a line

空扰寡人 提交于 2019-12-03 09:10:02
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 FROM (SELECT 'POINT(100 100)'::geometry As pt, 'LINESTRING (20 80, 98 190, 110 180, 50 75 )'::geometry As

Android, How can I rotate an arrow (image) around a fixed point?

橙三吉。 提交于 2019-12-03 07:42:25
问题 I have an arrow image that I want to rotate from 0 to 180 degree (like the needle in a meter.) One point of the arrow is fixed in middle and at bottom of the screen and head of arrow should move. Length of arrow is fix (it is image). Also I have two buttons and I want arrow to turn left when button left is touched and turn right when right button is touched. What is the logic of this process? 回答1: This is actually pretty simple if you are using a canvas to do your drawing(as you should in

How to find out Y coordinate of specific point in bezier curve in canvas?

烈酒焚心 提交于 2019-12-03 07:28:16
问题 I need to find out Y coordinate of specific point of bezier curve in canvas. Do you know, how to find it out? Thank you 回答1: Using de Casteljau's algorithm you can find the coordinates x and y of a bezier curve for any t, the percentage or interpolation step. So a t of .1 would give you the x and y at 10% of the curve from the beginning. A t of .9 would be 90% from the beginning, and so on. In our cubic bezier we have p0 (point 0), cp0 (control point 0), cp1 (control point 1), and p1 (point 1

Finding all points in certain radius of another point

不羁岁月 提交于 2019-12-03 06:52:58
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 million of points in total, but all of them would be very distant to each other? I'm trying to find a

mysql query points within polygon - no results

半城伤御伤魂 提交于 2019-12-03 06:03:24
I'm pretty sure that I'm doing multiple things wrong here but I'm not sure what... The table (minus a few fields): CREATE TABLE IF NOT EXISTS `stuff` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `lat` decimal(12,7) NOT NULL, `lon` decimal(12,7) NOT NULL, `location` point NOT NULL, UNIQUE KEY `id` (`id`), KEY `distance` (`distance`), KEY `lat` (`lat`), KEY `lon` (`lon`), SPATIAL KEY `location` (`location`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5; The triggers to automatically set the location point: DROP TRIGGER IF EXISTS `stuff_insert_defaults`;

Meaning of the word yield

瘦欲@ 提交于 2019-12-03 05:59:05
问题 Currently I'm reading "The Well-Grounded Rubyist" by David A. Black, and I stuck at 10.9 chapter (Enumerators and the next dimension of enumerability). My question is about yield method. What is the meaning of the word yield in Ruby context? My native language is Russian, and Google Translate shows me a bunch of translation variants, that are confusing me. There are some of them: give , bring , surrender ( give up ), produce , agree , comply and many others. UPD: please, pay attention to the

How do I find the center of a number of geographic points?

时光毁灭记忆、已成空白 提交于 2019-12-03 05:03:33
If I have a series of points as longitude and latitude, how would I calculate the center of all of those points? Geomidpoint covers 3 different methods for calculating this. Several people have answered to take the mean of the latitudes and longitudes. This is sort of the right idea, but means are more complicated on the sphere . The latitude/longitude representation is essentially artificial and has discontinuities (at the poles, and opposite the prime meridian if you aren't careful), so it taking means in it doesn't seem likely (to me) to have a sensible geometric interpretation. I think you

Pointtype command for gnuplot

会有一股神秘感。 提交于 2019-12-03 04:51:56
I'm having trouble using the pointtype command on gnuplot. I've tried several ways such as: set pt 5 set pointtype 5 plot " " w pt 5 plot " " w pointtype 5 And for some reason nothing seems to work. I tried using the "help" feature, and apparently my version of gnuplot doesn't have "pt" or "pointtype" as an option. Is this perhaps listed as some other feature. I know the points are there, when I plot multiple sets of data, the point type automatically changes, but I have no personal control over choosing the point type. Any help would be greatly appreciated. You first have to tell Gnuplot to