Search Results

Search found 3481 results on 140 pages for 'convex optimization'.

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

  • Intersection points of plane set forming convex hull

    - by Toji
    Mostly looking for a nudge in the right direction here. Given a set of planes (defined as a normal and distance from origin) that form a convex hull, I would like to find the intersection points that form the corners of that hull. More directly, I'm looking for a way to generate a point cloud appropriate to provide to Bullet. Bonus points if someone knows of a way I could give bullet the plane list directly, since I somewhat suspect that's what it's building on the backend anyway.

    Read the article

  • Voronoi regions of a (convex) polygon.

    - by Xavura
    I'm looking to add circle-polygon collisions to my Separating Axis Theorem collision detection. The metanet software tutorial (http://www.metanetsoftware.com/technique/tutorialA.html#section3) on SAT, which I discovered in the answer to a question I found when searching, talks about voronoi regions. I'm having trouble finding material on how I would calculate these regions for an arbitrary convex polygon and aleo how I would determine if a point is in one + which. The tutorial does contain source code but it's a .fla and I don't have Flash unfortunately.

    Read the article

  • Optimization ended up in casting an object at each method call

    - by Aybe
    I've been doing some optimization for the following piece of code : public void DrawLine(int x1, int y1, int x2, int y2, int color) { _bitmap.DrawLineBresenham(x1, y1, x2, y2, color); } After profiling it about 70% of the time spent was in getting a context for drawing and disposing it. I ended up sketching the following overload : public void DrawLine(int x1, int y1, int x2, int y2, int color, BitmapContext bitmapContext) { _bitmap.DrawLineBresenham(x1, y1, x2, y2, color, bitmapContext); } Until here no problems, all the user has to do is to pass a context and performance is really great as a context is created/disposed one time only (previously it was a thousand times per second). The next step was to make it generic in the sense it doesn't depend on a particular framework for rendering (besides .NET obvisouly). So I wrote this method : public void DrawLine(int x1, int y1, int x2, int y2, int color, IDisposable bitmapContext) { _bitmap.DrawLineBresenham(x1, y1, x2, y2, color, (BitmapContext)bitmapContext); } Now every time a line is drawn the generic context is casted, this was unexpected for me. Are there any approaches for fixing this design issue ? Note : _bitmap is a WriteableBitmap from WPF BitmapContext is from WriteableBitmapEx library DrawLineBresenham is an extension method from WriteableBitmapEx

    Read the article

  • Code optimization on minutes pr hour calculation

    - by corger
    Hi All, The following code takes a timeframe in minutes since midnight and creates an array with minutes pr hour. But, it's slow. Any better suggestions out there? (no, changing language is not an option :-) ) Const clDeparture As Long = 123 Const clArrival As Long = 233 Dim lHour As Long Dim lMinute As Long Dim alHour(25) As Long For lMinute = 0 To 1440 If lMinute >= clDeparture And lMinute < clArrival Then alHour(Int(lMinute / 60)) = alHour(Int(lMinute / 60)) + 1 End If Next The array should now contain: (0,0) (1,0) (2,57) (3,53) (4,0) ..... Regards

    Read the article

  • Optimize SQL databases by adding index columns

    - by Viktor Sehr
    This might be implementation specific so the question regards how SQL databases is generally implemented. Say I have a database looking like this; Product with columns [ProductName] [Price] [Misc] [Etc] Order with columns [OrderID] [ProductName] [Quantity] [Misc] [Etc] ProductName is primary key of Product, of some string type and unique. OrderID is primary key and of some integer type, and ProductName being a foreign key. Say I change the primary key of Product to a new column of integer type ie [ProductID] Would this reduce the database size and optimize lookups joining these two tables (and likewise operations), or are these optimizations performed automatically by (most/general/main) SQL database implementations?

    Read the article

  • The MYSTERY SPIRAL

    - by CVS26
    Problem statement: Given a integer N, print N*N numbers in a N x N spiral Detailed problem description: http://2600hertz.wordpress.com/2010/03/20/the-mystery-spiral/ Solution: Recently posted the following code. (managed to compress it into as few as 99 lines...) //File : spiral.c // //INPUT : Size of spiral (N) //OUTPUT : Numbers printed in a N x N spiral #include <stdio.h> #include <conio.h> #include <stdlib.h> void main() { int N; clrscr(); //get input no. N printf("\nEnter size of Matrix: "); scanf("%d",&N); //Allocate reqd. memory int* matrix_ptr= (int*)malloc(N*N); //Filling the Matrix spirally int curr_val=N*N; int* curr_ptr=matrix_ptr; int curr_level=N; while(curr_level>1) { //curr_level-1 elements horizontally //from left to right for(int x=0;x<curr_level-1;x++) { *curr_ptr=curr_val; curr_val--; curr_ptr++; } //curr_level-1 elements vertically //from top to bottom for(int y=0;y<curr_level-1;y++) { *curr_ptr=curr_val; curr_val--; curr_ptr+=N; } //curr_level-1 elements horizontally //from right to left for(int z=0;z<curr_level-1;z++) { *curr_ptr=curr_val; curr_val--; curr_ptr--; } //curr_level-1 element vertically //from bottom to top for(int w=0;w<curr_level-1;w++) { *curr_ptr=curr_val; curr_val--; curr_ptr-=N; } //Next curr_ptr+=N+1; curr_level-=2; } *curr_ptr=curr_val; //routine to print the matrix printf("\n\n\n\n\n"); for( int i=0;i<N;i++) { for( int j=0;j<N;j++) { printf("%d\t",*(matrix_ptr+(i*N+j))); } printf("\n"); } getch(); } Please comment on further optimisations (if any)...

    Read the article

  • Unity3D draw call optimization : static batching VS manually draw mesh with MaterialPropertyBlock

    - by Heisenbug
    I've read Unity3D draw call batching documentation. I understood it, and I want to use it (or something similar) in order to optimize my application. My situation is the following: I'm drawing hundreds of 3d buildings. Each building can be represented using a Mesh (or a SubMesh for each building, but I don't thing this will affect performances) Each building can be textured with several combinations of texture patterns(walls, windows,..). Textures are stored into an Atlas for optimizaztion (see Texture2d.PackTextures) Texture mapping and facade pattern generation is done in fragment shader. The shader can be the same (except for few values) for all buildings, so I'd like to use a sharedMaterial in order to optimize parameters passed to the GPU. The main problem is that, even if I use an Atlas, share the material, and declare the objects as static to use static batching, there are few parameters(very fews, it could be just even a float I guess) that should be different for every draw call. I don't know exactly how to manage this situation using Unity3D. I'm trying 2 different solutions, none of them completely implemented. Solution 1 Build a GameObject for each building building (I don't like very much the overhead of a GameObject, anyway..) Prepare each GameObject to be static batched with StaticBatchingUtility.Combine. Pack all texture into an atlas Assign the parent game object of combined batched objects the Material (basically the shader and the atlas) Change some properties in the material before drawing an Object The problem is the point 5. Let's say I have to assign a different id to an object before drawing it, how can I do this? If I use a different material for each object I can't benefit of static batching. If I use a sharedMaterial and I modify a material property, all GameObjects will reference the same modified variable Solution 2 Build a Mesh for every building (sounds better, no GameObject overhead) Pack all textures into an Atlas Draw each mesh manually using Graphics.DrawMesh Customize each DrawMesh call using a MaterialPropertyBlock This would solve the issue related to slightly modify material properties for each draw call, but the documentation isn't clear on the following point: Does several consecutive calls to Graphic.DrawMesh with a different MaterialPropertyBlock would cause a new material to be instanced? Or Unity can understand that I'm modifying just few parameters while using the same material and is able to optimize that (in such a way that the big atlas is passed just once to the GPU)?

    Read the article

  • Looking for literature about graphics pipeline optimization

    - by zacharmarz
    I am looking for some books, articles or tutorials about graphics architecture and graphics pipeline optimizations. It shouldn't be too old (2008 or newer) - the newer, the better. I have found something in [Optimising the Graphics Pipeline, NVIDIA, Koji Ashida] - too old, [Real-time rendering, Akenine Moller], [OpenGL Bindless Extensions, NVIDIA, Jeff Bolz], [Efficient multifragment effects on graphics processing units, Louis Frederic Bavoil] and some internet discussions. But there is not too much information and I want to read more. It should contain something about application, driver, memory and shader units communication and data transfers. About vertices and attributes. Also pre and post T&L cache (if they still exist in nowadays architectures) etc. I don't need anything about textures, frame buffers and rasterization. It can also be about OpenGL (not about DirecX) and optimizing extensions (not old extensions like VBOs, but newer like vertex_buffer_unified_memory).

    Read the article

  • Euler Problem 1 : Code Optimization / Alternatives [on hold]

    - by Sudhakar
    I am new bee into the world of Datastructures and algorithms from ground up. This is my attempt to learn. If the question is very plain/simple . Please bear with me. Problem: Find the sum of all the multiples of 3 or 5 below 1000. Code i worte: package problem1; public class Problem1 { public static void main(String[] args) { //******************Approach 1**************** long start = System.currentTimeMillis(); int total = 0; int toSubtract = 0; //Complexity N/3 int limit = 10000; for(int i=3 ; i<limit ;i=i+3){ total = total +i; } //Complexity N/5 for(int i=5 ; i<limit ;i=i+5){ total = total +i; } //Complexity N/15 for(int i=15 ; i<limit ;i=i+15){ toSubtract = toSubtract +i; } //9N/15 = 0.6 N System.out.println(total-toSubtract); System.out.println("Completed in "+(System.currentTimeMillis() - start)); //******************Approach 2**************** for(int i=3 ; i<limit ;i=i+3){ total = total +i; } for(int i=5 ; i<limit ;i=i+5){ if ( 0 != (i%3)) total = total +i; } } } Question 1 - Which best approach from the above code and why ? 2 - Are there any better alternatives ?

    Read the article

  • Form development optimization

    - by Juan
    Like many web developers I do forms all the time. I found myself doing the same all the time: placing input fields, assigning a name to each, ajax the form, then create the PHP which involves to assign a PHP var to each $_REQUEST['var'], escape and validate data, build the html and emailing the results. So I found that 70% of the work is duplicated but I just can't duplicate a page and change the fields. I end up wasting more time reformatting, deleting and adding different fields than creating from scratch. I started planing to program a "list of IDs to html+php" converter in which I'd input all the IDs and this would output the basic html and php. Then I thought: there's got to be thousands of developers that go through this, I'd be reinventing the wheel. So this is my question, I'm trying to find that wheel that somebody must have invented already. I found this: http://www.trirand.com/blog/jqform/ which does more or less what I'm looking for but it's an expensive solution and it has too much functionality for what I'd be using it. Which tools do you use to optimize repetitive task about HTML and PHP?

    Read the article

  • GPU optimization question: pre-computed or procedural?

    - by Jay
    Good morning, I'm learning shader program and need some general direction. I want to add noise to my laser beam (like this). Which is the best way to handle it? I could pre-compute an image and pass it to the shader. I could then use the image to change the opacity and easily animate the smoke by changing the offset of the texture lookup. I could also generate noise in the shader and do the same thing the texture was used for. Is it generally better to avoid I/O to the graphics card or the opposite? Thanks!

    Read the article

  • Is passing a struct value to a method by-reference in C# an acceptable optimization?

    - by Arc
    Say I have a struct: struct MyStruct { public int X public int Y } And a method in some class that is iterated over many times elsewhere: public bool MyMethod( MyStruct myStruct ) { return ... } Is changing the MyMethod signature to the following an acceptable optimization? public bool MyMethod( ref MyStruct myStruct ) If so, how much of an advantage would it really be? If not, about how many fields would a struct need for a big enough advantage using ref this way?

    Read the article

  • SQL Server 2008 Optimization

    - by hgulyan
    I've learned today, if you append to your query OPTION (MAXDOP 0) your query will run on multiple processors and if it's huge query, query will perform faster. I know general guidelines on query optimizations (using indexes, selecting only needed fields etc.), my question is about SQL Server optimization. Maybe changing some options in configurations or anything else. What guidelines are there for SQL Server Optimization? Thank you. P.S. I suppose, this is not the right place to ask server related questions. Should I delete it or maybe it can be migrated to serverfault?

    Read the article

  • WAN Optimization for Small Office/Home Office

    - by TiernanO
    I have been reading up on WAN optimization for the last while, mostly out of interest of speeding up my own internet connections, but also to speed up the office internet connection. At home, I have 2 cable modems plugged into a RouterBoard RB750, which load balances the connections. In the office, we have a single connection into a NetGear router. Most of the WAN Optimization products I have seen, seem to be prohibitively expensive, but also seem to be based on the idea of having multiple branches around the world. What I am looking for, ideally, is as follows: software install: I am "guessing" I need to install it in 2 places: one in the office or house, and one in "the cloud". any connections going to, say, The US (we are in Europe, but our backup's live in the US currently, which would be something important to speed up) would be "tunnelled" though the Optimizer. If downloading or uploading large files, open multiple connections between both "the cloud" and the optimizer... This is where a lot of speed could be gained. finally, for items not compressed, they would be compressed on the cloud side of things, also items that are already on the optimizer could be not sent again. kind of like RSync or Proxy servers... So, is there something that can be done? Is it available using off the shelf components (some magic script with SSH, Squid, Linux and duct tape) or is it something that needs to be purchased? or even an Open Source Project that does 90% of what i am asking?

    Read the article

  • Offline web font optimization tool

    - by avok00
    I have a few web fonts on my web site that I want to reduce in size. I tried http://www.fontsquirrel.com/fontface/generator with very good results, but I need an offline professional tool to rely on. Can somebody recommend such a tool? I am not a specialist font creator, so I need something like a wizard that can guide me through font optimization. Any suggestion is much appretiated! EDIT: To make myself more clear, I need a font subsetting tool

    Read the article

  • Issues in Convergence of Sequential minimal optimization for SVM

    - by Amol Joshi
    I have been working on Support Vector Machine for about 2 months now. I have coded SVM myself and for the optimization problem of SVM, I have used Sequential Minimal Optimization(SMO) by Mr. John Platt. Right now I am in the phase where I am going to grid search to find optimal C value for my dataset. ( Please find details of my project application and dataset details here http://stackoverflow.com/questions/2284059/svm-classification-minimum-number-of-input-sets-for-each-class) I have successfully checked my custom implemented SVM`s accuracy for C values ranging from 2^0 to 2^6. But now I am having some issues regarding the convergence of the SMO for C 128. Like I have tried to find the alpha values for C=128 and it is taking long time before it actually converges and successfully gives alpha values. Time taken for the SMO to converge is about 5 hours for C=100. This huge I think ( because SMO is supposed to be fast. ) though I`m getting good accuracy? I am screwed right not because I can not test the accuracy for higher values of C. I am actually displaying number of alphas changed in every pass of SMO and getting 10, 13, 8... alphas changing continuously. The KKT conditions assures convergence so what is so weird happening here? Please note that my implementation is working fine for C<=100 with good accuracy though the execution time is long. Please give me inputs on this issue. Thank You and Cheers.

    Read the article

  • Skype Optimization - Port Forwarding on a Router

    - by user19185
    I was watching this Video which talked about using port-forwarding to optimize your LAN for skype calls. According to the video, as explained in the first couple of minutes in the video, the reason you would need optimization is because if the person your call has a firewall setup, your connection has to go-through a third-party computer to connect to them. I believe I stated this correct (maybe not). None the less, my question is this: do both parties on the call need to enable port forwarding to optimize skype, or just one party (person)?

    Read the article

  • Nginx and 1000 WordPress Installs - Optimization

    - by GTE
    Hey, I'm trying to create a rather unusual (imo) configuration where I have: nginx php-fastcgi mysql 1000 seperate WordPress installs (with WP Super Cache). Each WP install corresponds to a seperate subdomain. Furthermore, I have 1000 cron jobs being called every hour that in turn call a WP plugin (using wget) which retrieves data from an API and posts it to the respective blog. This is all being run on a virtual server with 1024MB of RAM, 4 shared processors, etc. The server is not doing well, especially during the times that the cron jobs are being executed. Nginx constantly throws 504 errors and the site has a significant lag. 1) Am I crazy for having 1000 individual WP installs? Should I be using WP-MU and will this help significantly? (I have certain plugin restrictions that I prefer having seperate installs but could switch if need be.) 2) Instead of having 1000 unique cron jobs - should be calling say a bash script that will then process the 1000 HTTP requests I need? Could this be done in a succesive order instead of a sequential one? 3) Any other kind of suggestion you may have for optimization? Should I be proxying to Apache instead of just using nginx, etc. Any kind of advice would be appreciated. Thanks in advance

    Read the article

  • Local Search Engine Optimization - Why Use Local SEO?

    Local search engine optimization is the new optimization technique to help improve ones local efforts in your hometown or local areas a business does business. Local SEO is more useful for companies trying to gain new business within a smaller target range of 5-15 miles sometimes less sometimes more depending on the products or services one might provide to consumers. Local Search Engine Optimization and Normal Search Engine Optimization differs so hiring someone who specializes in local SEO is very important.

    Read the article

  • Search Engine Optimization And Other Web Services

    The SEO (Search Engine Optimization) involves an On-Page Optimization through which the different actions being done on the site so as to make the data and content presentable and relevant with a tidy and appealing display for the readers who frequently visit it to gain info on their part of interest and also for the Search Engines wanderers who want to register them. The search engine marketing Company, SEO Services renders a good quality Search Engine Optimization, also Social media optimization and many different types of marketing Solutions for the web business.

    Read the article

  • On Page Optimization Services

    On page optimization is the basic and important step in search engine optimization techniques. These are related to the content and the structure of the website. Implementing on page optimization is an easy task and this makes your website search engine friendly. By doing this on page optimization properly we can get good search engine rankings of our website and also it increases the overall readability of the website to the visitors.

    Read the article

  • Professional Onsite Optimization For a Profitable Business

    For some reason or another onsite optimization is generally one of the services that many webmasters and website owners seem to forget when trying to optimize websites. Onsite optimization is like keyword research one of the most relevant SEO services that stand at the very base of search engine optimization. This basically means that you can't get anything done without first performing a proper onsite optimization.

    Read the article

  • SEO - Search Engine Optimization Tips and Techniques

    SEO can be broken down into 2 main categories, on-page optimization, and off-page optimization. On-page optimization involves the changes that are made on your actual site, like through a CMS such as MODx. Changing heading tag, title tags, alt tags, etc., are all examples of on-page optimization. Off-page involves anything and everything that isn't actually done on your site, such as social media, blogs, forums, etc.

    Read the article

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