Re: procedural star graph generator
Fabian Giesen <[email protected]> Sat, 10 Sep 2011 01:51:13 -0700
| Newsgroups | gmane.games.devel.algorithms |
|---|---|
| Message-ID | <[email protected]> |
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
------------------------------------------------------------------------------
Malware Security Report: Protecting Your Business, Customers, and the
Bottom Line. Protect your business and customers by understanding the
threat from malware and how it can impact your online business.
http://www.accelacomm.com/jaw/sfnl/114/51427462/
_______________________________________________
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