Thread: [Algorithms] procedural star graph generator
Brought to you by:
vexxed72
From: Tom S. <tom...@ya...> - 2011-09-09 08:10:34
|
I am looking for some code that can procedurally generate a star graph -- tom_a_sparks "It's a nerdy thing I like to do" Please use ISO approved file formats excluding Office Open XML - http://www.gnu.org/philosophy/no-word-attachments.html 3 x (x)Ubuntu 10.04, Amiga A1200 WB 3.1, UAE AF 2006 WB 3.X, Sam440 AOS 4.1.2 Wanted: RiscOS system, GEOS system (C64/C128), Atari ST, Apple Macintosh (68k/PPC only) |
From: Megan F. <sha...@gm...> - 2011-09-09 14:37:08
|
I don't have a specific algorithm, but, I suspect if you were to apply the Delaunay triangulation algorithm ( http://en.wikipedia.org/wiki/Delaunay_triangulation) to a slightly sparse point set, and create a star at the center of mass of each resultant triangle, you'd get something very close to what you want. If I were to create an algorithm for such, I'd start there. I'd implement multiple layer point clouds, with different densities per, and for each layer generate a different sort of star size depending on density / triangle count of resultant surface. For the stars themselves, it seems like you could throw together a couple of simple algorithms based on 1/x / x2 / x3 / etc to create variations of the traditional 4 point star shape, and then color/scale them procedurally again depending on the relative density of the layer into which they were being dropped. The result should be a desirable and customizable spacing of stars with appropriate distribution of near and distant stars, etc. ... but it depends on your actual requirements. The above would create a map appropriate for certain styles of games, but it wouldn't be a purely realistic view of the night sky. -- Megan Fox http://www.glassbottomgames.com/ On Fri, Sep 9, 2011 at 2:10 AM, Tom Sparks <tom...@ya...>wrote: > > > I am looking for some code that can procedurally generate a star graph > > -- > tom_a_sparks "It's a nerdy thing I like to do" > Please use ISO approved file formats excluding Office Open XML - > http://www.gnu.org/philosophy/no-word-attachments.html > 3 x (x)Ubuntu 10.04, Amiga A1200 WB 3.1, UAE AF 2006 WB 3.X, Sam440 AOS > 4.1.2 > Wanted: RiscOS system, GEOS system (C64/C128), Atari ST, Apple Macintosh > (68k/PPC only) > > > ------------------------------------------------------------------------------ > Why Cloud-Based Security and Archiving Make Sense > Osterman Research conducted this study that outlines how and why cloud > computing security and archiving is rapidly being adopted across the IT > space for its ease of implementation, lower cost, and increased > reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Andy F. <pad...@ob...> - 2011-09-09 16:38:36
|
When you say procedural there are two distinct ways of looking at this word, either phenomenological or essentialist. In other words, either start with a definition of the results you want and work back to a generative basis, or start with some principles and develop a simplified model. For the latter approach two knowledge sources to integrate could be (1) Hughes, E.E Jr "The Luminosities and spatial distribution of stars detected on a two micron sky survey" CalTec 1969 with (2) Knuth V2 3.41/3.4.2 pp 119-142 Numerical Distributions Draw a line through your sky to represent galactic equator. Now use tables, functions and thresholing data from (1) with methods from (2) to make your own plausible Milky Way* * Eating sweets between meals _may_ ruin your appetite On Fri, 9 Sep 2011 01:10:27 -0700 (PDT) Tom Sparks <tom...@ya...> wrote: > > > I am looking for some code that can procedurally generate a star graph > > -- > tom_a_sparks "It's a nerdy thing I like to do" > Please use ISO approved file formats excluding Office Open XML - http://www.gnu.org/philosophy/no-word-attachments.html > 3 x (x)Ubuntu 10.04, Amiga A1200 WB 3.1, UAE AF 2006 WB 3.X, Sam440 AOS 4.1.2 > Wanted: RiscOS system, GEOS system (C64/C128), Atari ST, Apple Macintosh (68k/PPC only) > > ------------------------------------------------------------------------------ > Why Cloud-Based Security and Archiving Make Sense > Osterman Research conducted this study that outlines how and why cloud > computing security and archiving is rapidly being adopted across the IT > space for its ease of implementation, lower cost, and increased > reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list -- Andy Farnell <pad...@ob...> |
From: Jon W. <jw...@gm...> - 2011-09-09 17:49:38
|
I think you need to define which interpretation of "star graph" you actually mean. Graph theory, or astronomy? Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Fri, Sep 9, 2011 at 1:10 AM, Tom Sparks <tom...@ya...>wrote: > > > I am looking for some code that can procedurally generate a star graph > > -- > tom_a_sparks "It's a nerdy thing I like to do" > Please use ISO approved file formats excluding Office Open XML - > http://www.gnu.org/philosophy/no-word-attachments.html > 3 x (x)Ubuntu 10.04, Amiga A1200 WB 3.1, UAE AF 2006 WB 3.X, Sam440 AOS > 4.1.2 > Wanted: RiscOS system, GEOS system (C64/C128), Atari ST, Apple Macintosh > (68k/PPC only) > > > ------------------------------------------------------------------------------ > Why Cloud-Based Security and Archiving Make Sense > Osterman Research conducted this study that outlines how and why cloud > computing security and archiving is rapidly being adopted across the IT > space for its ease of implementation, lower cost, and increased > reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Tom S. <tom...@ya...> - 2011-09-10 08:36:24
|
>Sent: Saturday, 10 September 2011 3:49 AM >Subject: Re: [Algorithms] procedural star graph generator > > >I think you need to define which interpretation of "star graph" you actually mean. > > >Graph theory, or astronomy? graph theory Not astronomy sorry I've been do some reading and Cellular Texture seams like what I need but the example I've seen are texture-centric > > >Sincerely, > > >jw > > >-- -- tom_a_sparks "It's a nerdy thing I like to do" Please use ISO approved file formats excluding Office Open XML - http://www.gnu.org/philosophy/no-word-attachments.html 3 x (x)Ubuntu 10.04, Amiga A1200 WB 3.1, UAE AF 2006 WB 3.X, Sam440 AOS 4.1.2 Wanted: RiscOS system, GEOS system (C64/C128), Atari ST, Apple Macintosh (68k/PPC only) |
From: Fabian G. <ry...@gm...> - 2011-09-10 08:51:24
|
On 10.09.2011 01:23, Tom Sparks wrote: >> Sent: Saturday, 10 September 2011 3:49 AM >> Subject: Re: [Algorithms] procedural star graph generator >> >> >> I think you need to define which interpretation of "star graph" you actually mean. >> >> >> Graph theory, or astronomy? > graph theory Not astronomy sorry > > I've been do some reading and Cellular Texture seams like what I need but the example I've seen are texture-centric The graph theoretic version of star graphs is trivial! You just have N vertices and N-1 edges. One vertex is in the "center" (suppose without loss of generality it's the first one) and then the edges are {1,i} with 2 <= i <= N. "Procedurally generating" such a graph is a single for loop! Considering your reference to cellular textures, what you probably mean are Voronoi diagrams: http://en.wikipedia.org/wiki/Voronoi_diagram If so, there's (reasonably well-known) algorithms for generating it from a set of points. The complexity of both the algorithms and implementation depends considerably on your requirements; if you just need a solution for a low number of points in the plane, that can be done with relatively little code. Higher dimensions require more work, and algorithms with optimal O(n log n) complexity (this is a lower bound for the complexity of algorithms that determine planar Voronoi diagrams!) are more involved than O(n^2) or worse algorithms. -Fabian |