Search Results

Search found 441 results on 18 pages for 'nearest neighbor'.

Page 7/18 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Tool to convert Textures to power of two?

    - by 3nixios
    I'm currently porting a game to a new platform, the problem being that the old platform accepted non power of two textures and this new platform doesn't. To add to the headache, the new platform has much less memory so we want to use the tools provided by the vendor to compress them; which of course only takes power of two textures. The current workflow is to convert the non power of tho textures to dds with 'texconv', then use the vendors compression tools in a batch. So, does anyone know of a tool to convert textures to their nearest 'power of two' counterparts? Thanks

    Read the article

  • Solving 2D Collision Detection Issues with Relative Velocities

    - by Jengerer
    Imagine you have a situation where two objects are moving parallel to one-another and are both within range to collide with a static wall, like this: A common method used in dynamic collision detection is to loop through all objects in arbitrary order, solve for pair-wise collision detection using relative velocities, and then move the object to the nearest collision, if any. However, in this case, if the red object is checked first against the blue one, it would see that the relative velocity to the blue object is -20 m/s (and would thereby not collide this time frame). Then it would see that the red object would collide with the static wall, and the solution would be: And the red object passes through the blue one. So it appears to be a matter of choosing the right order in which you check collisions; but how can you determine which order is correct? How can this passing through of objects be avoided? Is ignoring relative velocity and considering every object as static during pair-wise checks a better idea for this reason?

    Read the article

  • What can I put in my software development blog to make it a good showcase of me?

    - by Sean
    I have been itching to write a software development blog for some time now. The best advice I've received about blog writing is "Write the blog you would have want to read". Its good advice but its only half the story, Once you write a blog it becomes your showcase on the Internet, it is bound to come up on any search conducted by a future colleague or employer. It can be a good thing or it can do some serious damage. So if there are any hiring managers out there, can you give me a few pointers on what it is in a blog that give you a good impression about candidate and/or the kind of stuff that causes you to throw the candidate's resume to the nearest bean? Does a blog have to come up with a clever piece of code every week? (Don’t think I can manage it) Is it OK to blog more then not about development methods to improved quality and productivity (have a lot of ideas about that). Can I blog about stuff I did not try first hand but seems noteworthy?

    Read the article

  • Implementing a FSM with ActionScript 2 without using classes?

    - by Up2u
    I have seen several references of A.I. and FSM, but sadly I still can't understand the point of an FSM in AS2.0. Is it a must to create a class for each state? I have a game-project which also it has an A.I., the A.I. has 3 states: distanceCheck, ChaseTarget, and Hit the target. It's an FPS game and played via mouse. I have created the A.I. successfully, but I want to convert it to FSM method... My first state is CheckDistanceState() and in that function I look for the nearest target and trigger the function ChaseState(), there I insert the Hit() function to destroy the enemy, The 3 functions that I created are being called in AI_cursor.onEnterframe. Is there any chance to implement an FSM without the need to create a class? From what I've read before, you have to create a class. I prefer to write the code on frames in flash and I still don't understand how to have external classes.

    Read the article

  • OpenGL 2D Rasterization Sub-Pixel Translations

    - by Armin Ronacher
    I have a tile based 2D engine where the projection matrix is an orthographic view of the world without any scaling applied. Thus: one pixel texture is drawn on the screen in the same size. That all works well and looks nice but if the camera makes a sub-pixel movement small lines appear between the tiles. I can tell you in advance what does not fix the problem: GL_NEAREST texture interpolation GL_CLAMP_TO_EDGE What does “fix” the problem is anchoring the camera to the nearest pixel instead of doing a sub-pixel translation. I can live with that, but the camera movement becomes jerky. Any ideas how to fix that problem without resorting to the rounding trick I do currently?

    Read the article

  • Channelling an explosion along a narrow passage

    - by finnw
    I am simulating explosions in a 2D maze game. If an explosion occurs in an open area, it covers a circular region (this is the easy bit.) However if an explosion occurs in a narrow passage (i.e narrower than the blast range) then it should be "compressed", so that it goes further and also it should go around corners. Ultimately, unless it is completely boxed-in, then it should cover a constant number of pixels, spreading in whatever direction is necessary to reach this total area. I have tried using a shortest-path algorithm to pick the nearest N pixels to the origin avoiding walls, but the effect is exaggerated - the blast travels around corners too easily, making U-turns even when there is a clear path in another direction. I don't know whether this is realistic or not but it is counter-intuitive to players who assume that they can hide around a corner and the blast will take the path of least resistance in a different direction. Is there a well-known (and fast) algorithm for this?

    Read the article

  • Working as a software developer in a small town [closed]

    - by James
    I'm thinking of moving back to a small town in the near future. Coming from a large city (Dallas), I'm worried about being able to find work as a developer. I've worked remotely for companies as a contractor before, but would prefer a full time position for health insurance. Has anyone successfully made a good career for themselves while living outside of a major city (the nearest big city will be Minneapolis, about 3 hours away)? If so, how did you do it and what steps could I take between now and then to maximize my chances for success?

    Read the article

  • QuadTree: store only points, or regions?

    - by alekop
    I am developing a quadtree to keep track of moving objects for collision detection. Each object has a bounding shape, let's say they are all circles. (It's a 2D top-down game) I am unsure whether to store only the position of each object, or the whole bounding shape. If working with points, insertion and subdivision is easy, because objects will never span multiple nodes. On the other hand, a proximity query for an object may miss collisions, because it won't take the objects' dimensions into account. How to calculate the query region when you only have points? If working with regions, how to handle an object that spans multiple nodes? Should it be inserted in the nearest parent node that completely contains it, even if this exceeds the node's capacity? Thanks.

    Read the article

  • How to get distance from point to line with distinction between side of line?

    - by tesselode
    I'm making a 2d racing game. I'm taking the nice standard approach of having a set of points defining the center of the track and detecting whether the car is off the track by detecting its distance from the nearest point. The nicest way I've found of doing this is using the formula: d = |Am + Bn + C| / sqrt(A^2 + B^2) Unfortunately, to have proper collision resolution, I need to know which side of the line the car is hitting, but I can't do that with this formula because it only returns positive numbers. So my question is: is there a formula that will give me positive or negative numbers based on which side of the line the point is on? Can I just get rid of the absolute value in the formula or do I need to do something else?

    Read the article

  • Resources for creating a turn-by-turn navigation system

    - by benwad
    I'm trying to create a kind of turn-by-turn satellite navigation system using the iOS SDK. I get the directions from the server and draw them on the map, then I keep getting location updates from the iPhone's GPS chip. Currently I start by finding the nearest turning point then, each time the user comes within a certain distance of the next turning point, a verbal cue is given and the turning point index is incremented. This is a delicate system and I'd like to make it more robust so I can tell when the user is going the wrong direction etc. Basically I'm looking for some literature about turn-by-turn navigation, in terms of tracking the user's progress and whether they're going the right direction. I'd have thought there's a lot of research out there but I can't seem to find anything apart from simple tutorials on how to use a given SDK or directions API. Can anyone direct me to a good run-through of the various techniques used in software such as TomTom or Google Maps Navigation?

    Read the article

  • Is ubuntu-geoip (GeoClue) is used for tracking?

    - by tijybba
    I am happily learning Ubuntu more closely now. I came across the process ubuntu-geoip-provider in system monitor. Is is used for tracking or for gathering nearest server info, or for syncing time with Internet, or perhaps for all these things? I searched for it but not enough information came through. If it is tracking, what kind of info it is gathering, and why it is doing that? It is based here: /usr/lib/ubuntu-geoip I just wanted more detailed information for that. Also, can this be disabled? Is disabling recommended, or would doing so cause dependency-related (or other) problems?

    Read the article

  • REGISTER NOW! ORACLE HARDWARE SALES TRAINING: HARDWARE AND SOFTWARE - ENGINEERED TO BE SOLD TOGETHER!

    - by mseika
    REGISTER NOW!ORACLE HARDWARE SALES TRAINING: HARDWARE AND SOFTWARE - ENGINEERED TO BE SOLD TOGETHER! Dear partner You can now register for Oracle's EMEA Hardware Sales Training Roadshow: "Hardware and Software - Engineered to be sold together!"The objective of this one-day, face-to-face, free of charge training session is to share with you and your Oracle peers the latest information on Oracle's products and solutions and to ensure that you are fully equipped to position and sell Oracle's integrated stack. Please find the agenda, schedule details and registration information here.The seats are limited and available on a first-come-first-serve basis. We recommend you to register yourself as early as possible and reserve your seat.Register Now We hope you will take the maximum advantage of these great learning and networking opportunities and look forward to welcoming you to your nearest event! Best regards, Giuseppe FacchettiPartner Business Development Manager,Servers, Oracle EMEA Sasan MoaveniStorage Partner Sales ManagerOracle EMEA

    Read the article

  • REGISTER NOW! ORACLE HARDWARE SALES TRAINING: HARDWARE AND SOFTWARE - ENGINEERED TO BE SOLD TOGETHER!

    - by mseika
    REGISTER NOW!ORACLE HARDWARE SALES TRAINING: HARDWARE AND SOFTWARE - ENGINEERED TO BE SOLD TOGETHER! Dear partner You can now register for Oracle's EMEA Hardware Sales Training Roadshow: "Hardware and Software - Engineered to be sold together!"The objective of this one-day, face-to-face, free of charge training session is to share with you and your Oracle peers the latest information on Oracle's products and solutions and to ensure that you are fully equipped to position and sell Oracle's integrated stack. Please find the agenda, schedule details and registration information here.The seats are limited and available on a first-come-first-serve basis. We recommend you to register yourself as early as possible and reserve your seat.Register Now We hope you will take the maximum advantage of these great learning and networking opportunities and look forward to welcoming you to your nearest event! Best regards, Giuseppe FacchettiPartner Business Development Manager,Servers, Oracle EMEA Sasan MoaveniStorage Partner Sales ManagerOracle EMEA

    Read the article

  • Getting web results URLs in millions [closed]

    - by tereško
    I looked at all sites of SO and couldn't find any suitable to ask this question but posting here as nearest match to scenario After 1 months research I basically give up on getting all URL's from a search results programmatically, I looked at Google Search API to find a way to get millions of search results "URL's" to be specific to a text file or something relative but no success, but I am 100% there must be a way or trick of doing it. Real Question : Is there anyway programmatically or manually I can get 1000+ search results (URLs using search query e.g. "Apple" returns million of results on google and I want as much as possible URLs of them results in a text file)

    Read the article

  • traveling salesman problem, 2-opt algorithm c# implementation

    - by TAB
    Hello Can someone give me a code sample of 2-opt algorithm for traveling salesman problem. For now im using nearest neighbour to find the path but this method is far from perfec, and after some research i found 2-opt algorithm that would correct that path to the acceptable level. I found some sample apps but withoud source code.

    Read the article

  • C# Create Snap To Grid Functionality

    - by Nathan
    I am trying to create some snap to grid functionality to be used at run time but I am having problems with the snapping part. I have successfully drawn a dotted grid on a panel but when I add a label control to the panel how to I snap the top, left corner of the label to the nearest dot? Thanks

    Read the article

  • Lucene .Net Searching with TermVector

    - by Ashish
    in Lucene.Net,i am creating the document for searching a word and want to display before 10 words and after 10 words.i have used TermVector. Lucene.Net.Documents.Field fldContent = new Lucene.Net.Documents.Field("content", content, Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.TOKENIZED, Lucene.Net.Documents.Field.TermVector.WITH_POSITIONS_OFFSETS); Can anyone help me how to find out the keyword position and extract nearest 15 words. please send some code. Thanks Ashish

    Read the article

  • ASP.NET MVC 2.0 Unused Model Property being called when posting a product to the server?

    - by Erx_VB.NExT.Coder
    i have my auto-generated linq to sql classes, and i extend this class using partial classing (instead of using inheritance), and i have properties that that i've put in later which are not part of the database model and should not be. these are things like "FinalPrice" and "DisplayFinalPrice" - in the dbase, there is only RetailPrice and WholesalePrice so FinalPrice etc are more like extensions of the dbase fields. when i submit the form with nothing filled in, "FinalPrice" gets called (the 'get' of the property) even tho i never ask for it to be, and even tho it is not needed. this happens before validation, so i don't even get the validation errors i would get. i've tried using and on the FinalPrice and FinalPriceDisplay properties - no go! why does this happen and how can i stop it from happening? is the modelstate just trying to validate everything so therefore it calls every item no matter what? for those interested, here is all the code... Partial Public Class tProduct 'Inherits tProduct Private Const CommissionMultiplier As Decimal = CDec(1.18) Private _FinalPrice As Decimal? Private _DisplayFinalPrice As String Private _DisplayNormalPrice As String Public Property CategoryComplete As Short <ScaffoldColumn(False)> Public ReadOnly Property FinalPrice As Decimal Get 'If RetailPrice IsNot Nothing OrElse WholesalePrice IsNot Nothing Then If _FinalPrice Is Nothing Then If RetailPrice IsNot Nothing Then _FinalPrice = RetailPrice Else _FinalPrice = WholesalePrice * CommissionMultiplier ' TODO: this should be rounded to the nearest 5th cent so prices don't look weird. End If Dim NormalPart = Decimal.Floor(_FinalPrice.Value) Dim DecimalPart = _FinalPrice.Value - NormalPart If DecimalPart = 0 OrElse DecimalPart = 0.5 Then Return _FinalPrice ElseIf DecimalPart > 0 AndAlso DecimalPart < 0.5 Then DecimalPart = 0.5 ' always rounded up to the nearest 50 cents. ElseIf DecimalPart > 0.5 AndAlso DecimalPart < 1 Then ' Only in this case round down if its about to be rounded up to a valeu like 20, 30 or 50 etc as we want most prices to end in 9. If NormalPart.ToString.LastChr.ToInt = 9 Then DecimalPart = 0.5 Else DecimalPart = 1 End If End If _FinalPrice = NormalPart + DecimalPart End If Return _FinalPrice 'End If End Get End Property <ScaffoldColumn(False)> Public ReadOnly Property DisplayFinalPrice As String Get If _DisplayFinalPrice.IsNullOrEmpty Then _DisplayFinalPrice = FormatCurrency(FinalPrice, 2, TriState.True) End If Return _DisplayFinalPrice End Get End Property Public ReadOnly Property DisplayNormalPrice As String Get If _DisplayNormalPrice.IsNullOrEmpty Then _DisplayNormalPrice = FormatCurrency(NormalPrice, 2, TriState.True) End If Return _DisplayNormalPrice End Get End Property Public ReadOnly Property DivID As String Get Return "pdiv" & ProductID End Get End Property End Class more... i get busted here, with a null reference exception telling me it should contain a value... Dim NormalPart = Decimal.Floor(_FinalPrice.Value)

    Read the article

  • Creating a Colormap Legend in Matplotlib

    - by Vince
    Hi fellow Stackers! I am using imshow() in matplotlib like so: import numpy as np import matplotlib.pyplot as plt mat = '''SOME MATRIX''' plt.imshow(mat, origin="lower", cmap='gray', interpolation='nearest') plt.show() How do I add a legend showing the numeric value for the different shades of gray. Sadly, my googling has not uncovered an answer :( Thank you in advance for the help. Vince

    Read the article

  • How to search and locate (annotate) in MKMapView?

    - by chaitanya
    Hi, In my application I have to search five nearest locations of "medical services" using the user current location and annotate those locations on my MKMapView. Can any one tell me how to search with a particular keyword (eg. medical services, garages) by using user current locations and annotate onto the map and when the user taps on the annotations it should show the complete address of the locations which is annotated. Can anyone help me in this?

    Read the article

  • Millions of 3D points: How to find the 10 of them closest to a given point?

    - by Kazoom
    A point in 3-d is defined by (x,y,z). Distance d between any two points (X,Y,Z) and (x,y,z) is d= Sqrt[(X-x)^2 + (Y-y)^2 + (Z-z)^2]. Now there are a million entries in a file, each entry is some point in space, in no specific order. Given any point (a,b,c) find the nearest 10 points to it. How would you store the million points and how would you retrieve those 10 points from that data structure.

    Read the article

  • millions of 3d points how to 10 closest to origin

    - by Kazoom
    A point in 3-d is defined by (x,y,z). Distance d between any two points (X,Y,Z) and (x,y,z) is d= Sqrt[(X-x)^2 + (Y-y)^2 + (Z-z)^2]. Now there are a million entries in a file, each entry is some point in space, in no specific order. Given any point (a,b,c) find the nearest 10 points to it. How would you store the million points and how would you retrieve those 10 points from that data structure.

    Read the article

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