MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Naturally coloring a Voronoi diagram using Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105616] Re: [mg105591] Naturally coloring a Voronoi diagram using Mathematica
  • From: <ingolf.dahl at telia.com>
  • Date: Fri, 11 Dec 2009 04:19:10 -0500 (EST)
  • References: <200912100957.EAA25232@smc.vnet.net>

Hi Kelly,
I assume that you only want the function to be linear inside each Delaunay
triangle, not between points in different triangles.

Is this what you want?

ListDensityPlot[RandomReal[{}, {1000, 3}], InterpolationOrder -> 1, 
 Mesh -> None, ColorFunction -> Hue]

My demonstrations at
http://demonstrations.wolfram.com/author.html?author=Ingolf+Dahl are also
related to this problem.

ListPlot3D and related functions have some built-in capability to use 2D
Voronoi diagrams and Delaunay triangulation, and Jens-Peer Kuska once
demonstrated how that information could be extracted. I used his method in
the Divide-Triangles Demonstration.

Best regards

Ingolf Dahl


-----Original Message-----
From: Kelly Jones [mailto:kelly.terry.jones at gmail.com] 
Sent: den 10 december 2009 10:57
To: mathgroup at smc.vnet.net
Subject: [mg105616] [mg105591] Naturally coloring a Voronoi diagram using Mathematica

I've defined 0 <= f[x] <= 1 for 1000 x's in the unit square, and now
want to extend f as a uniformly continuous function on the entire unit
square as follows:

 % For any two points x and y in the unit square, and 0<=k<=1:

f[k*x + (1-k)*y] = k*f[x] + (1-k)*f[y]

Note that x and y are points in the unit square, not real numbers.

 % The equation above applies to the 1000 points I originally defined,
 but also to any two other points in the unit square.

 % I want to compute f efficiently.

Essentially, I have a Voronoi diagram and have assigned a different
hue to each point (but saturation=value=1, so we're only dealing w/
1-dimensional color), and now want to color the entire diagram
efficiently in a "reasonable" way.

Ideally, I'd like to find a *function* that does this, but if
Mathematica can do this w/ Graphics (eg, some sort of color
gradient?), that's fine too.

I do realize I'm probably limited to coloring the convex hull of my
original points.

PS: Thanks to everyone who replies to my other questions. I'm bad
about replying, but do appreciate the answers and do learn from them.

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.



  • Prev by Date: Re: Naturally coloring a Voronoi diagram using Mathematica
  • Next by Date: Re: CVS Install on Windows XP for Workbench
  • Previous by thread: Naturally coloring a Voronoi diagram using Mathematica
  • Next by thread: Re: Naturally coloring a Voronoi diagram using Mathematica