Jump to content

  • Log In with Google      Sign In   
  • Create Account

klapstoelpiloot

Member Since 28 Dec 2003
Offline Last Active Nov 13 2013 02:22 PM

Posts I've Made

In Topic: Finding the center INSIDE a polygon

02 October 2008 - 06:31 PM

Yea, that makes sense alvaro, but that goes a bit above my math knowledge :P

Kambiz's ideas are interesing. They would work.
The slide in that presentation is interesting as well, but it's crap that the presentation gives no answers. How would I get the Voronoi diagram from my polygon that is displayed on that page? If I have those points, it's easy to find the Maximum Inscribed Circle. I googled for Vonoroi diagram, but couldn't find anything that tells me how to make one out of a polygon :(

Another idea I had is somewhat similar, but could maybe be done on the geometry level (not plotting pixels, but actually working with the geometry). I could shrink the polygon by small amounts (moving the lines over their normal) and the remaining area would be the red dot. But then I need some really clever intersection testing and solving the intersections properly.


In Topic: Locking to access a primitive variable (multithreading)

26 September 2008 - 11:16 PM

Thanks P that was educational, good to know that I cannot make any presumptions in C/C++ regarding multithreading.

Now lets change the situation a bit. Now I am using C# and there is not one boolean variable that indicates a stauts, but there are now 2000 integer variables (enummerations) that indicate the status of 2000 objects.

Both the main thread and the background thread will be accessing these status variables a lot. Just like in my example above, the background thread will be both reading and setting the status and the main thread will be reading them only.

Do I need a lock() for this status variable? I think it would just slow the threads down, so I am asking to be sure if it is really needed.

In Topic: Locking to access a primitive variable (multithreading)

26 September 2008 - 10:53 PM

The writing thread (background) does not need to know if the main thread is reading it or has read it. It does not care.

In Topic: Looking for simple networking library for different platforms

28 April 2008 - 09:51 AM

Yes, I looked at the libraries in the FAQ, but like you said, none of them except the ones I have already seen meet my requirements. I suppose I cannot always be happy and I'll just have to make it work with the tools at hand :(

Thank you for your time everyone!

In Topic: Looking for simple networking library for different platforms

27 April 2008 - 09:40 AM

Well, "can't use" may not be the right words, because one way or another I could get it to work, but it certainly ain't the ideal solution for my case. I say "can't use" because I am looking for an ideal library, or at least the one that gets closest to it as possible.

PARTNERS