Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 24 Apr 2001
Offline Last Active Sep 16 2013 07:57 AM

Topics I've Started

Triangulating a polygon region over terrain

18 February 2013 - 08:03 AM

I have a computational problem - I have an arbitrary polygon chain, which I wish to triangulate, but I wish to triangulate it in such a way that the inside of the polygon is divided over my terrain grid, the resulting triangle mesh should be decomposed so that there are vertices at each grid point within the polygon. Example:


Attached File  PolygonRegion.png   13.51KB   18 downloads => Attached File  PolygonRegionDecomposed.png   19.05KB   22 downloads


I'm thinking that a scan-line algorithm could work well, as per seidels trapizoidation algorithm - though modified so that extra internal points are generated as I traverse across the polygon.


Otherwise, a multi-phase approach could work where I first clip the polygon into vertical strips, inserting extra edge points at grid locations on those new vertical edges, and then triangulating each resulting polygon using one of my existing triangulation routines - but that feels awkward and in-efficient.


I also had another hairbrained idea where I start of with the polygon earclipped, and then detect and insert points from prominant terrain features into the mesh, splitting triangles as I go - but without a round of triangle improvement, the triangulation could get nasty.


Attached File  PolygonRegionEarThenSplit.png   65.25KB   22 downloads


Ultimately the number of points involved is not going to be insanely high, so I could be crude, but I'd like to 'do-it-right'.


You can assume that all polygons are concave, non-intersecting, and without holes. Any suggestions, and any approaches are welcome smile.png





What to do in Florida/Miami...

08 January 2010 - 11:34 PM

Gdnet, I require your services: I'll be over in Miami for a few days (19-25 Jan) for the Khronos Group Face2Face meeting and a weekend break, just wondering what things people would suggest as _must do_ items for Florida visitors! One possible is a rather long drive/religions pilgrimage up to Cape Canaveral as I've always wanted to see the place, though I'm gutted the trip isn't a week or two later as I'd have really digged seeing a Shuttle launch! Let me know your suggestions :) Cheers, Alex

Human Computation: Using humans to solve problems

14 September 2006 - 02:55 AM

I've just finished watching this video. Human Computation, a lecture about using simple web based games to produce high quality image clasification data through asymetric and symetric varification. I was wondering if anyone is aware of any games in the past that have harvested data from individual users in order to improve gameplay for the wider audience. Do you think it would be correct to say that as long as for a given problem you have a way of recording/quantifying that users input or behavior, that you can then incorporate this into a game in such a way that other players would in effect varify its correctness? And through this varification the computer can learn well? Do any games use the internet to share data to improve the games artifical intellence? Or is the learning process still too unpredictable to be useful?

Get your own game development team on Ebay!

24 April 2006 - 11:31 PM

Hey there, Are looking for a team to develop your next game? Then check out ebay where you can bid for the opertunity to command your own game development team, programmers, artists, designers, the complete package! Only $150k! :D http://cgi.ebay.com/Video-Game-Development-Team_W0QQitemZ8278223283QQcategoryZ62053QQrdZ1QQcmdZViewItem I'm not involved with this, just saw it by chance! (If this is a repost, then sorry, I did search quick, couldnt find it). Novel idea for a game studio between projects or who fancy doing something querky for a change! :D If I only had $200k... This question made me chuckle! ;) Whats the chances that it was actually someone from the 3D Realms... Q: Can you help me finish Duke Nukem Forever? I just need a little help. A: Thanks for your inquiry, no. /Al

FFT - Generating the frequency spectrum of the image

26 January 2005 - 05:31 AM

Just wondering if someone could help explain how to generate the frequency spectrum of an image. I have looked around and seem to not be able to find many code examples. This is the sort of image I want to achieve: http://cns-alumni.bu.edu/~slehar/fourier/fourier.html#filtering and this is what I am doing now:
	// values is an array of colour values 1 channel 1 byte per pixel

        fftw_real inVals[FFTSIZE*FFTSIZE];
        fftw_complex outVals[FFTSIZE*FFTSIZE];
        for ( int y = 0; y < FFTSIZE; y++ )
	    for ( int x = 0; x < FFTSIZE; x++ )
	        inVals[x + (y * FFTSIZE)] = values[x + (y * FFTSIZE)];
        // tried this, just seems to process a single dimension
        //  rfftwnd_one_real_to_complex(plan_rc, inVals, (fftw_complex *) inVals);

        // FFT the image 
        rfftwnd_real_to_complex(plan_rc, FFTSIZE*FFTSIZE,
 	     	   inVals, 1, 0,
	           (fftw_complex*)outVals, 1, 0);
outVals just seems to contain 0's the only decent numbers I have had has been from using the rfftwnd_one_real_to_complex line. FFTSIZE is the size of the input image (in this case 16 (16x16)). I think I am doing something wrong. Do i have to use rfftwnd_one_real_to_complex more than once and somehow combine the results? since it seems to process one row of the image only.