coordinates

Draw 2 parallel lines between any 2 coordinates on the stage in AS3

不羁岁月 提交于 2020-02-02 13:00:52
问题 I am developping a web application, basically its a simple version of Illustrator/Flash. So soccer trainers can make schemes. I made different tools like in Photoshop (line tool, rectangle tool, ..). All of these work. However now i need to develop a tool where the user can draw a double parallel line . I would like to be able to define the distance between those 2 lines in a variable . I need to draw 2 parallel lines between any 2 points on the stage. Like the line tool in Photoshop

OpenGL coordinates to match screen coordinates?

梦想与她 提交于 2020-02-01 04:41:45
问题 Android opengl-es view question. So in openGL, the default position of the camera and view is at 0,0. How do you set the view and camera so that it acts basically the same as computer screen coordinates with 0,0 at the top. I've called gl.glOrthof(-screenWidth/2, ScreenWidth/2, -ScreenHeight/2, ScreenHeight/2). But I think this is wrong. I also need to set the camera to view the entire field. I'm not sure how to use gl.glFrustumf to accomplish this task. 回答1: To use your vertex coordinates as

coordinate location based off pixel color

感情迁移 提交于 2020-01-30 08:22:06
问题 I am trying to get specific coordinates in an image. I have marked a red dot in the image at several locations to specify the coordinates I want to get. In GIMP I used the purist red I could find (HTML notation ff000 ). The idea was that I would iterate through the image until I found a pure shade of red and then print out the coordinates. I am using python and opencv to do so but I can't find any good tutorials (best I could find is this but it's not very clear...at least for me). Here is an

coordinate location based off pixel color

一笑奈何 提交于 2020-01-30 08:22:05
问题 I am trying to get specific coordinates in an image. I have marked a red dot in the image at several locations to specify the coordinates I want to get. In GIMP I used the purist red I could find (HTML notation ff000 ). The idea was that I would iterate through the image until I found a pure shade of red and then print out the coordinates. I am using python and opencv to do so but I can't find any good tutorials (best I could find is this but it's not very clear...at least for me). Here is an

Converting Latitude Longitude Coordinates to Image Map Coordinates

做~自己de王妃 提交于 2020-01-30 03:30:36
问题 I'm almost positive this has been answered already; however, unable to find it since XY coordinates are overloaded due to their relative definition. What I am trying to find/figure out is how to take latitude/longitude coordinates (e.g. 12.121212, -12.323232) and convert such so they can be mapped onto a 2-dimensional plane such as a point on an image map. Has anyone solved this issue and know of a script or another SO question that they can point me to? Ideally I'm seeking a solution in

fabricjs.com stickman: move the lines and affect the related circles

。_饼干妹妹 提交于 2020-01-25 11:18:06
问题 using the stickman example of http://fabricjs.com/, I have been trying to achieve moving the related circles when a line is moved. The code in the example is not well structured, heavy & with errors :), as I can not to move the the related circles symmetrically. If in the //move the other circle part is used next line obj.set({ 'left': (s.calcLinePoints().x1 + _l), 'top': ( -s.calcLinePoints().y1 + _t) }); the difference is in the sign of collected information for y1 and we move some

How to plot latitude/longitude points over netcdf map

本小妞迷上赌 提交于 2020-01-25 05:05:57
问题 I have read in a netcdf file of observed climate data (global surface temperature) to R and would like to plot some species locality data (latitude/longitude coordinate points) over the top of this but am having difficulties doing so. I have generated my map of temperature using: obsula.pdclann <- open.ncdf("obsula.pdclann.nc") temp_var <- "temp_mm_1_5m" temp <- get.var.ncdf(obsula.pdclann, varid=temp_var) image.plot(temp) My species occurrence data are read in via the following: speciesall <

How to use AffineTransform with very little coordinates?

ⅰ亾dé卋堺 提交于 2020-01-24 12:58:06
问题 I have a set of two dimensions points. Their X and Y are greater than -2 and lesser than 2. Such point could be : (-0.00012 ; 1.2334 ) . I would want to display these points on a graph, using rectangles (a rectangle illustrates a point, and has its coordinates set to its point's ones - moreover, it has a size of 10*10). Rectangles like (... ; Y) should be displayed above any rectangles like (... ; Y-1) (positive Y direction is up). Thus, I must set the graph's origin not at the top-left hand

Getting coordinates of a component in java

倾然丶 夕夏残阳落幕 提交于 2020-01-24 12:27:09
问题 I have a JLayeredPane, and inside the JLayeredPane is a JInternalFrame. What I need are the bounds (x position, y position, width, height) of the content pane in the JInternalFrame. The bounds need to be in relation to the JLayeredPane. My problem is the borders, title bar, and I'm not sure what else of the JInternalFrame are messing with my calculation. It's a few pixels off. Here is how I try to calculate it. This code is in the JInternalFrame: Rectangle area = new Rectangle( getX() + 2, /

Getting coordinates of a component in java

假装没事ソ 提交于 2020-01-24 12:26:32
问题 I have a JLayeredPane, and inside the JLayeredPane is a JInternalFrame. What I need are the bounds (x position, y position, width, height) of the content pane in the JInternalFrame. The bounds need to be in relation to the JLayeredPane. My problem is the borders, title bar, and I'm not sure what else of the JInternalFrame are messing with my calculation. It's a few pixels off. Here is how I try to calculate it. This code is in the JInternalFrame: Rectangle area = new Rectangle( getX() + 2, /