Re: procedural star graph generator
Megan Fox <[email protected]> Fri, 9 Sep 2011 08:36:37 -0600
| Newsgroups | gmane.games.devel.algorithms |
|---|---|
| Message-ID | <CAOv03kMBBcWZscPr011mGUk9Y=zfkOfeng+0sgCiFT_KMx1+3Q@mail.gmail.com> |
--===============0409190225321001168== Content-Type: multipart/alternative; boundary=001517476930fdb61004ac831b33 --001517476930fdb61004ac831b33 Content-Type: text/plain; charset=ISO-8859-1 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 <[email protected]>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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > --001517476930fdb61004ac831b33 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I don't have a specific algorithm, but, I suspect if you were to apply = the Delaunay triangulation algorithm (<a href=3D"http://en.wikipedia.org/wi= ki/Delaunay_triangulation">http://en.wikipedia.org/wiki/Delaunay_triangulat= ion</a>) 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 wha= t you want.<br> <br>If I were to create an algorithm for such, I'd start there.=A0 I= 9;d implement multiple layer point clouds, with different densities per, an= d for each layer generate a different sort of star size depending on densit= y / triangle count of resultant surface.=A0 For the stars themselves, it se= ems 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 shap= e, and then color/scale them procedurally again depending on the relative d= ensity of the layer into which they were being dropped.<br> <br>The result should be a desirable and customizable spacing of stars with= appropriate distribution of near and distant stars, etc.<br><br>... but it= depends on your actual requirements.=A0 The above would create a map appro= priate for certain styles of games, but it wouldn't be a purely realist= ic view of the night sky.<br> <br><br>-- <br>Megan Fox<br><a href=3D"http://www.glassbottomgames.com/" ta= rget=3D"_blank">http://www.glassbottomgames.com/</a><br><br><div class=3D"g= mail_quote">On Fri, Sep 9, 2011 at 2:10 AM, Tom Sparks <span dir=3D"ltr">&l= t;<a href=3D"mailto:[email protected]">[email protected]</a= >></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex;"><br> <br> I am looking for some code that can procedurally generate a star graph<br> <br> --<br> tom_a_sparks "It's a nerdy thing I like to do"<br> Please use ISO approved file formats excluding Office Open XML - <a href=3D= "http://www.gnu.org/philosophy/no-word-attachments.html" target=3D"_blank">= http://www.gnu.org/philosophy/no-word-attachments.html</a><br> 3 x (x)Ubuntu 10.04, Amiga A1200 WB 3.1, UAE AF 2006 WB 3.X, Sam440 AOS 4.1= .2<br> Wanted: RiscOS system, GEOS system (C64/C128), Atari ST, Apple Macintosh (6= 8k/PPC only)<br> <br> ---------------------------------------------------------------------------= ---<br> Why Cloud-Based Security and Archiving Make Sense<br> Osterman Research conducted this study that outlines how and why cloud<br> computing security and archiving is rapidly being adopted across the IT<br> space for its ease of implementation, lower cost, and increased<br> reliability. Learn more. <a href=3D"http://www.accelacomm.com/jaw/sfnl/114/= 51425301/" target=3D"_blank">http://www.accelacomm.com/jaw/sfnl/114/5142530= 1/</a><br> _______________________________________________<br> GDAlgorithms-list mailing list<br> <a href=3D"mailto:[email protected]">GDAlgorithms-lis= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list" = target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/gdalgorithms= -list</a><br> Archives:<br> <a href=3D"http://sourceforge.net/mailarchive/forum.php?forum_name=3Dgdalgo= rithms-list" target=3D"_blank">http://sourceforge.net/mailarchive/forum.php= ?forum_name=3Dgdalgorithms-list</a><br> </blockquote></div><br> --001517476930fdb61004ac831b33-- --===============0409190225321001168== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ 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/ --===============0409190225321001168== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ GDAlgorithms-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list --===============0409190225321001168==--