Search Results

Search found 22128 results on 886 pages for 'point in polygon'.

Page 2/886 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • A simple algorithm for polygon intersection

    - by Elazar Leibovich
    I'm looking for a very simple algorithm for computing the polygon intersection/clipping. That is, given polygons P, Q, I wish to find polygon T which is contained in P and in Q, and I wish T to be maximal among all possible polygons. I don't mind the run time (I have a few very small polygons), I can also afford getting an approximation of the polygons' intersection (that is, a polygon with less points, but which is still contained in the polygons' intersection). But it is really important for me that the algorithm will be simple (cheaper testing) and preferably short (less code). edit: please note, I wish to obtain a polygon which represent the intersection. I don't need only a boolean answer to the question of whether the two polygons intersect.

    Read the article

  • Matlab Simulation: Point (symbol) Moving from start point to end point and back

    - by niko
    Hi, I would like to create an animation to demonstrate LDPC coding which is based on Sum-Product Algorithm So far I have created a graph which shows the connections between symbol nodes (left) and parity nodes (right) and would like to animate points travelling from symbol to parity nodes and back. The figure is drawn by executing the following method: function drawVertices(H) hold on; nodesCount = size(H); parityNodesCount = nodesCount(1); symbolNodesCount = nodesCount(2); symbolPoints = zeros(symbolNodesCount, 2); symbolPoints(:, 1) = 0; for i = 0 : symbolNodesCount - 1 ji = symbolNodesCount - i; scatter(0, ji) symbolPoints(i + 1, 2) = ji; end; parityPoints = zeros(parityNodesCount, 2); parityPoints(:, 1) = 10; for i = 0 : parityNodesCount - 1 ji = parityNodesCount - i; y0 = symbolNodesCount/2 - parityNodesCount/2; scatter(10, y0 + ji) parityPoints(i + 1, 2) = y0 + ji; end; axis([-1 11 -1 symbolNodesCount + 2]); axis off %connect vertices d = size(H); for i = 1 : d(1) for j = 1 : d(2) if(H(i, j) == 1) plot([parityPoints(i, 1) symbolPoints(j, 1)], [parityPoints(i, 2) symbolPoints(j, 2)]); end; end; end; So what I would like to do here is to add another method which takes start point (x and y) and end point as arguments and animates a travelling circle (dot) from start to end and back along the displayed lines. I would appreciate if anyone of you could show the solution or suggest any useful tutorial about matlab simulations. Thank you!

    Read the article

  • 12.04 WiFi issue on a particular access point

    - by user71706
    I have a WiFi access point that I connect to a PC to share its Internet connection with multiple machines, in a training environment. All the machines with 11.04 connect to this access point with no problem, and can access any server on the Internet. These machines have an Intel Wireless -N 1030 BGN chipset (as reported by lspci). Now, my problem is that I don't manage to connect 12.04 machines to this wireless network. The systems I tried do manage to connect (confirmed by Network Manager), but when I try to access a website like http://kernel.org, the browser shows "Connecting to kernel.org...", but displays a "The connection has timed out" error page. Other symptoms: Name resolution works (for example 'nslookup kernel.org') finds kernel.org's IP address 'ping kernel.org' doesn't work The same 12.04 machines have no problem at all with other wireless networks. So there is probably something weird in my access point (though the 11.04 machines are not impacted). Would you have any suggestions for investigating this issue? Thanks, Michael.

    Read the article

  • Huge dataset point in polygon in .net (collision detection)

    - by Rickard Liljeberg
    I have a pretty big mesh with polygons, usually triangles but sometimes rectangles. Each point in my mesh has a value (value has nothing to do with coordinates). Now I am creating a second mesh in the same coordinate-space as the old mesh. I now want to interpolate out values for all points (vertices) in the new mesh using the values from the old mesh. Now I could loop each polygon in the new mesh and detect which old vertices are in each polygon by making 2d collision detection (altho even this I don't get to function properly so if anyone has simple and fast code for 2d collision detection (triangle is enough) I would gladly see it). However to my main point again. looping each old vertice for each new polygon seems less than efficient. is there a better way?

    Read the article

  • Java2D: Fill a convex rounded polygon (QuadCurves)

    - by Martijn Courteaux
    Hi, If I have a QuadCurve like this (+ = node): + + \ ./ +--?? And I fill it in Java 2D the result is something like this: (x = colored) +xxxxxxxxx+ \xxxxxx./ +--?? But I want to color the other side: + + x\ ./x xxx +--??xx xxxxxxxxxxx This succeeds by drawing a rectangle around the curve in the color I want to color the other side and then fill the curve with the background color. But this isn't good enough to fill a convex rounded (based on QuadCurves) polygon. In case of some coordinates for the rectangles (as explained in the trick I used) overlap other pieces of the polygon. Here are two images (the green area is my polygon): So, the question is simple: "How can I color a shape build of curves?" But to the answer will not be simple I think... Any advice would be VERY VERY appreciated. Thanks in advance. Maybe I'm going to make a bounty for this question if I don't get an answer

    Read the article

  • Mysql retrieve polygon data

    - by dskanth
    Hi, i have been developing a site that stores spatial data in mysql database, like that of buildings, gardens, etc. in the form of polygons (latitudes and longitudes). I want to know how to retrieve polygon data in mysql. I have seen this sample query to insert a polygon data: http://amper.110mb.com/SPAT/mysql_initgeometry2.htm But now i want to know how to retrieve data from the table, based on certain constraints like: "where latitude < 9.33 and longitude > 22.4" Also how do i find whether a point lies inside or outside of a polygon

    Read the article

  • Finding distance to the closest point in a point cloud on an uniform grid

    - by erik
    I have a 3D grid of size AxBxC with equal distance, d, between the points in the grid. Given a number of points, what is the best way of finding the distance to the closest point for each grid point (Every grid point should contain the distance to the closest point in the point cloud) given the assumptions below? Assume that A, B and C are quite big in relation to d, giving a grid of maybe 500x500x500 and that there will be around 1 million points. Also assume that if the distance to the nearest point exceds a distance of D, we do not care about the nearest point distance, and it can safely be set to some large number (D is maybe 2 to 10 times d) Since there will be a great number of grid points and points to search from, a simple exhaustive: for each grid point: for each point: if distance between points < minDistance: minDistance = distance between points is not a good alternative. I was thinking of doing something along the lines of: create a container of size A*B*C where each element holds a container of points for each point: define indexX = round((point position x - grid min position x)/d) // same for y and z add the point to the correct index of the container for each grid point: search the container of that grid point and find the closest point if no points in container and D > 0.5d: search the 26 container indices nearest to the grid point for a closest point .. continue with next layer until a point is found or the distance to that layer is greater than D Basically: put the points in buckets and do a radial search outwards until a points is found for each grid point. Is this a good way of solving the problem, or are there better/faster ways? A solution which is good for parallelisation is preferred.

    Read the article

  • Breaking a concave polygon into convex ones.

    - by Bart van Heukelom
    I'm using a game physics library (Box2D) which only supports convex polygon shapes. However, I'd like the level builder to be able to just specify concave polygons without having to worry about that. So, how can I automatically break apart a concave polygon into convex ones (or even all triangles). Speed would be cool, but ease of implementation is more important. The breaking apart will only be done on game initialization. (My language is Flash/ActionScript 3, but that shouldn't matter)

    Read the article

  • How do I arbitrarily distort a textured polygon?

    - by Archagon
    I'd like to write a program that lets me arbitrarily distort a textured polygon by dragging its vertices. I want the texture to distort fluidly and without overlap, assuming the new polygon doesn't intersect itself. I should also be able to repeat the process with the new shape, and with a minimum amount of loss. Are there any algorithms for doing this?

    Read the article

  • GPC Polygon Initialization

    - by Dan
    I am using the GPC Polygon Clipping lib (http://www.cs.man.ac.uk/~toby/alan/software) and want to create a polygon programatically. I only see code for how to create one from a file. How can I do the initialization in my code?

    Read the article

  • Drawing a polygon around groups of datapoints in MATLAB

    - by Hossein
    Hi, I have a set of datapoints each of which belongs to a certain cluster(group).I need to draw a polygone around each of these clusters.Does anyone knows how to do it? PS: It doesn't matter if I use or not use the actual datapoints for drawing the polygon. I just need them to be wrapped in a polygon. Thanks

    Read the article

  • Suspended Sentence is a Free Cross-Platform Point and Click Game

    - by Asian Angel
    Do you want a fun point and click game to play on your favorite operating system? Then get ready to play Suspended Sentence! In the game you are woken from cryogenic sleep to assist in repairing the ship you are traveling on. Can you successfully complete the repairs and get your prison sentence suspended in return? Note: Suspended Sentence is available for Linux, Windows, and Mac. Suspended Sentence Homepage [via OMG! Ubuntu!] Access the Walkthrough for Suspended Sentence Latest Features How-To Geek ETC How To Remove People and Objects From Photographs In Photoshop Ask How-To Geek: How Can I Monitor My Bandwidth Usage? Internet Explorer 9 RC Now Available: Here’s the Most Interesting New Stuff Here’s a Super Simple Trick to Defeating Fake Anti-Virus Malware How to Change the Default Application for Android Tasks Stop Believing TV’s Lies: The Real Truth About "Enhancing" Images The Legend of Zelda – 1980s High School Style [Video] Suspended Sentence is a Free Cross-Platform Point and Click Game Build a Batman-Style Hidden Bust Switch Make Your Clock Creates a Custom Clock for your Android Homescreen Download the Anime Angels Theme for Windows 7 CyanogenMod Updates; Rolls out Android 2.3 to the Less Fortunate

    Read the article

  • Missing Wireless access point

    - by nvcnvn
    I have an: Ubuntu 12.04 with proprietary Boardcom STA Wireless driver installed BCM43224 802.11a/b/g/n wireless card TP-LINK TD-W8101G 54Mbps Wireless ADSL2+ Modem Router Yesterday before I went to sleep, I still connect to my wireless access point, this morning when I start my laptop I don't see it in the list - there are some neighbors listed but not mine. The WLAN is green, with my old Nokia E72, I still see my access point with 100% signal. I have tried to restart my laptop and turn the firmware off/on by the switch but no help. I have read the WirelessTroubleShootingGuide but I can do anything. Here is some of my card info: *-network description: Wireless interface product: BCM43224 802.11a/b/g/n vendor: Broadcom Corporation physical id: 0 bus info: pci@0000:04:00.0 logical name: eth1 version: 01 serial: c0:cb:38:06:5d:53 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=wl0 driverversion=5.100.82.38 latency=0 multicast=yes wireless=IEEE 802.11abgn resources: irq:17 memory:f0500000-f0503fff *-network description: Ethernet interface product: RTL8111/8168B PCI Express Gigabit Ethernet controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:09:00.0 logical name: eth0 version: 03 serial: f0:4d:a2:42:ab:e4 size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8168d-1.fw ip=192.168.1.3 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s resources: irq:42 ioport:5000(size=256) memory:f0404000-f0404fff memory:f0400000-f0403fff memory:f0420000-f043ffff

    Read the article

  • Extending home network using multiple access point originating from another access point

    - by cyberjar09
    I have a home network with the current setup (RJ45 running from main router to access point) : +-------------+ +--------------+ | 192.168.2.1 | |192.168.2.2 | | router +--------------->access point 1| +-----^-------+ +--------------+ | | +-----+--------+ | 192.168.1.1 | | modem | +-----^--------+ | | | | +--+--+ | ISP | +-----+ However I would like to extend the network to two more floors in the house via the existing Access Point (router is too far and not reachable using a network cable, hence I need to extend using current access point). Please see diagram below : +-------------+ +--------------+ +----------------+ | 192.168.2.1 | |192.168.2.2 | | 192.168.2.3 | | router +--------------->access point 1+----------> access point 2 | +-----^-------+ +--------+-----+ +----------------+ | | | | +-----+--------+ | | 192.168.1.1 | | | modem | | +-----^--------+ | +----------------+ | +----------------> 192.168.2.4 | | | access point 3 | | +----------------+ | +--+--+ | ISP | +-----+ Q1 : is this setup possible? Q2 : if possible, will I have to do anything different from what I did to setup access point 1? edit 1 : I am trying to study the dd-wrt documentation to see which would be the correct mode of operation for me Linking Routers but Im confused because I dont see any info on how to use an existing Access point to extend the signal of the SSID. If anyone could point me to the correct wiki for how I should setup AP2 and AP3 based on AP1, it would be very helpful. For AP1, I did the following Use static IP and setup same SSID as primary wireless router use same security as primary wireless router make AP1 point to 192.168.2.1 (primary router) for DHCP Thanks in advance.

    Read the article

  • Script to setup Ubuntu as a wireless access point on a bridge mode

    - by nixnotwin
    I use the following script to make my netbook a full-fledged wireless access point. It creates a bridge with eth0 and wlan0 and starts hostapd. #!/bin/bash service network-manager stop ifconfig eth0 0.0.0.0 #remove IP from eth0 ifconfig eth0 up #ensure the interface is up ifconfig wlan0 0.0.0.0 #remove IP from eth1 ifconfig wlan0 up #ensure the interface is up brctl addbr br0 #create br0 node hostapd -d /etc/hostapd/hostapd.conf > /var/log/hostapd.log & sleep 5 brctl addif br0 eth0 #add eth0 to bridge br0 brctl addif br0 wlan0 #add wlan0 to bridge br0 ifconfig br0 192.168.1.15 netmask 255.255.255.0 #ip for bridge ifconfig br0 up #bring up interface route add default gw 192.168.1.1 # gateway This script works efficiently. But if I want to revert back to use Network Manager, I cannot do it. The bridge simply cannot be deleted. How can I modify this script so that if I run bridge_script --stop, the bridge gets deleted, network manager starts and interfaces behave as if the machine had a fresh reboot.

    Read the article

  • Implementing hitbox polygon

    - by Delusional Logic
    I'm creating a shooter, it's still very early, but i'm implementing some polygon hitboxes. So far i have created a polygon class, and i'm looking into how i can hook it onto my player. I'm trying to stay away from having a Tick() function in my polygon class, and I would rather not update the position every tick (it would clutter up my tick functions). At the same time I would really like to have the positions in there somehow (it has a drawing function, and i will be using it for hit detection) How would i go about implementing this polygon object into my entities?

    Read the article

  • How can I locate empty space next to polygon regions?

    - by Stephen
    Let's say I have the following area in a top-down map: The circle is the player, the black square is an obstacle, and the grey polygons with red borders are walk-able areas that will be used as a navigation mesh for enemies. Obstacles and grey polygons are always convex. The grey regions were defined using an algorithm when the world was generated at runtime. Notice the little white column. I need to figure out where any empty space like this is, if at all, after the algorithm builds the grey regions, so that I can fill the space with another region. Basically what I'm hoping for is an algorithm that can detect empty space next to a polygon.

    Read the article

  • How to spawn a character at certain point and walk to a set point

    - by Robert H.
    I am making a game where I have a background image of a neighborhood. Each location has a different number of customers that are generated to walk on sidewalks. They all walk to a specific location (like a stand or cart that sells stuff), after they get to location I want them to interact with the cart. However, if another customer is already in a sale interaction then the others get in line in order of arrival. After the transaction the customers walk off screen. Any information on how I can do this and what game engine would be needed? Any one have any idea where I should go for this. I already have my game done up through Eclipse/Java without any game engine.

    Read the article

  • Distance from a point to a polygon

    - by clwen
    I am trying to determine the distance from a point to a polygon in 2D space. The point can be inside or outside the polygon; The polygon can be convex or concave. If the point is within the polygon or outside the polygon with a distance smaller than a user-defined constant d, the procedure should return True; False otherwise. I have found a similar question: Distance from a point to a polyhedron or to a polygon. However, the space is 2D in my case and the polygon can be concave, so it's somehow different from that one. I suppose there should be a method simpler than offsetting the polygon by d and determining it's inside or outside the polygon. Any algorithm, code, or hints for me to google around would be appreciated.

    Read the article

  • function which given a point and a value of the area of a square as input parameter returns four squ

    - by osabri
    in this code i don't understand why teacher used sometimes +value, - value; /******************************************/ // function void returnSquares(POINT point, int value) void returnSquares(POINT point, int value) { SQUARE tabSquares[4]; // table of squares that we are creating int i; // getting points of 4 squares // for first square input point is point C tabSquares[0].pointA.dimX = point.dimX - value; tabSquares[0].pointA.dimY = point.dimY + value; tabSquares[0].pointB.dimX = point.dimX; tabSquares[0].pointB.dimY = point.dimY + value; tabSquares[0].pointC.dimX = point.dimX; tabSquares[0].pointC.dimY = point.dimY; tabSquares[0].pointD.dimX = point.dimX - value; tabSquares[0].pointD.dimY = point.dimY; // for 2nd square input point is point D tabSquares[1].pointA.dimX = point.dimX; tabSquares[1].pointA.dimY = point.dimY + value; tabSquares[1].pointB.dimX = point.dimX + value; tabSquares[1].pointB.dimY = point.dimY + value; tabSquares[1].pointC.dimX = point.dimX + value; tabSquares[1].pointC.dimY = point.dimY; tabSquares[1].pointD.dimX = point.dimX; tabSquares[1].pointD.dimY = point.dimY; // for 3rd square input point is point A tabSquares[2].pointA.dimX = point.dimX; tabSquares[2].pointA.dimY = point.dimY; tabSquares[2].pointB.dimX = point.dimX + value; tabSquares[2].pointB.dimY = point.dimY; tabSquares[2].pointC.dimX = point.dimX + value; tabSquares[2].pointC.dimY = point.dimY - value; tabSquares[2].pointD.dimX = point.dimX; tabSquares[2].pointD.dimY = point.dimY - value; // for 4th square input point is point B tabSquares[3].pointA.dimX = point.dimX - value; tabSquares[3].pointA.dimY = point.dimY; tabSquares[3].pointB.dimX = point.dimX; tabSquares[3].pointB.dimY = point.dimY; tabSquares[3].pointC.dimX = point.dimX; tabSquares[3].pointC.dimY = point.dimY - value; tabSquares[3].pointD.dimX = point.dimX - value; tabSquares[3].pointD.dimY = point.dimY - value; for (i=0; i<4; i++) { printf("Square number %d\n",i); // now we print parameters of each point in current Square printf("point A x= %0.2f y= %0.2f\n",tabSquares[i].pointA.dimX,tabSquares[i].pointA.dimY); printf("point B x= %0.2f y= %0.2f\n",tabSquares[i].pointB.dimX,tabSquares[i].pointB.dimY); printf("point C x= %0.2f y= %0.2f\n",tabSquares[i].pointC.dimX,tabSquares[i].pointC.dimY); printf("point D x= %0.2f y= %0.2f\n",tabSquares[i].pointD.dimX,tabSquares[i].pointD.dimY); } }

    Read the article

  • Polygon triangulation

    - by Saurabh
    Hey, I am working on nesting of sheet metal parts and am implementing Minkowski Sums to find No Fit Polygons for nesting. The problem is I can give only convex sets as input to the code which calculates Minkowski sums for me. Hence I need to break a concave polygon, with holes into Convex sets. I am open to triangulation also, but I am looking for a working code on VC++ (6.0). I am slightly running short on time as my whole code is ready and just waiting for input in the form of convex sets. I would really appreciate if somebody with prior experience can help me in this. I have gone through other posts but did not find anything matching to this. I am a student of mechanical engineering and really dun have much idea about computer languages. All I can handle is compiling a code on VC++ and incorporate it with my existing code. Looking forward to responses!! Thanks Warm regards Saurabh India

    Read the article

  • Library for polygon operations

    - by AJM
    I've recently encountered a need for a library or set of libraries to handle operations on 2D polygons. I need to be able to perform boolean/clipping operations (difference and union) and triangulation. So far the libraries I've found are poly2tri, CGAL, and GPC. Poly2tri looks good for triangulation but I'm still left with boolean operations, and I'm unsure about its maturity. CGAL and GPC are only free if my own project is free. My particular project isn't commercial, so I'm hesitant to pay or request for any licenses. But I may want to use my code for a future commercial project, so I'm hesitant about CGAL's open source licenses and GPC's freeware-only restriction. There doesn't seem to be any polygon clipping libraries with nice BSD-style licenses.

    Read the article

  • Base on User Drawing Create Polygon Body as well Image

    - by Siddharth
    In my game, I want to provide a user with drawing feature. By free hand drawing user create a polygon shape. So in my game implementation I have to create body for all found vertices and I have to generate image based on that polygon shape. So my problem is how to create image that match the user provided vertices. In cocos2d I listen that there is an implementation of something like Image Masking. But I don't understand how that thing I implement in andengnine. Please provide any guidance on how to create image same as user generated polygon shape.

    Read the article

  • lightweight access point?

    - by Joelio
    Im moving from an all in one to a router + access point. In doing googling and reasearch and talking to friends I ended up with router - cisco rv016 wifi access point - airnet 1142 lightweight access point. (lap1142n) In trying to set all this up and reading I think I bought the wrong access point. It seems I need a wireless controller? Can someone confirm that I should not have bought the lightweight one?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >