Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 Nov 2011
Offline Last Active Apr 27 2016 05:02 PM

Topics I've Started

Objects distribution within concave polygon

14 August 2015 - 04:59 AM

So, first of all I am under NDA, so I need use analogical examples of my problem. Mainly I am looking for algorithms that can help me find results for my problem, so this is mostly theoretical question.
My input would be concave simple polygon (a list of points in cw or ccw order) that contains holes (stored as a list of list of points). Alternatively, I can triangulate that polygon and input this as a list of triangles. They mostly would be a simple shape where neighbouring segments are in right angle (I attached some example cases). Sometimes input might contain segments under irregular angles.
Having this region defined, I want to distribute objects within that shape. The number of objects doesn't need to be constant, but needs to be in given range (for instance at least 2 must be placed, but no more than 20). Each objects have some properties defined and influence each other.
Another problem is that they need to be placed in aesthetic way, to give you a real life idea I don't want to end up with something like this. But I might adjust the locations as a post process, so this is less important right now.
As the output I would need the list of points.
What I can provide for the algorithm are learning sets and evaluation method which says how good the output is.
Some examples - wireless signal enhancers placement in a building, monster placement in dungeon crawler game where each monster has different power, hp etc., chests/pick-ups of different value positioning in the game, maybe heat detectors (or any other detector) distribution in a room, surveillance cameras distribution in a room (so we want to place them in the way they cover the most space with least devices used).


The thing I already tried is an expanding grid of points, but it gave bad results. I also tried genetic algorithms, but they took to long and gave very random looking point distribution, the results were almost perfect in terms of numbers though. So I am looking for some kind of method that can adapt points to shape of the room and give as good results as GA. I was also thinking about neural networks, but the only ones I was working with were outputing true/false value and I don't know if they can create a list of points.


So does any other optimization agorithm/concept comes to your mind? I also didn't work with any fuzzy logics yet, I even have no idea how they work, I am just aware of their existance, is this something worth investigating in this case?

Tegra 4 Extensions

21 April 2014 - 03:38 PM



I am ashamed to ask such question, but I am lost in search. I am creating an Tegra 4 application that is in need of render target with pixel format that will store, for instance, logarithmic luminance, something like R16_float. AFAIK Tegra 4 supports such formats, but they are not available in standard OpenGL ES 2.0, only through extensions. How do I create such texture with GLES20.glTexImage2D? I know how to use glTexImage2D, but I have no idea how to include those extensions in Java (I am not using NDK).


I would appreciate any help, all I could find on the net was how to get supported extensions as a string, not how to use them.

Mipmaps on Windows Phone 8

18 December 2013 - 08:28 AM



I encountered a problem while porting application to WP8. I am using SharpDX and use down and upsampling method for bluring. The problem is that when I generate mipmaps for render targets I get black (reading from texture returns 0) results, but when I have single level everything works fine, but quality is just terrible. I heard it's a bug in WP8, can someone confirm this? If it's a bug, do you have any neat workaround or am I stuck with 'manual' downsampling?

WPF UserControl List

10 December 2013 - 07:14 AM



this is going to be quick question. I want to create a user control that would do something like this:

<ctrl:MyControl x:Name="mc">
            <ctrl:MyData MyProperty="{Binding PropertyA}"/>
            <ctrl:MyData MyProperty="{Binding PropertyB}"/>

MyControl is UserControl,

MyControl.MyData is DependencyProperty of type MyDataCollecion inside MyControl,

MyDataCollecion is List<MyData>,

MyData is DependencyObject, MyProperty is dependency property


Is such thing possible in WPF?


I Believe that it would lose connection to logical tree in MyData, so the result would be MyData added to MyDataCollection, but MyProperty wouldn't be bound.


Any ideas how I can achieve something like that?

Gaussian blur with large radius

30 September 2013 - 05:41 AM



I would like to perform a gaussian blur with large radius. I always used kernel size of 7x7 or smaller with two pass method. It satisfied my needs before, but now it's not enough. I am limited to use shader model 2.0, so large kernels are out of the question due to instruction limit. I also want to get the best performance possible. Do you have any sugestions?