Author Topic: Interesting Voronoi diagram...  (Read 5326 times)

0 Members and 1 Guest are viewing this topic.

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Interesting Voronoi diagram...
« on: July 13, 2009 »

Well this is my first attempt at a Voronoi diagram. This is just a quick project to take a break from the C++ I've been doing as of late. Yes it takes forever, but then again I'm using the plot function rather than quicker pixmap operations.Time was not a concern here and this made for shorter code. Here I've assigned each point a color from a palette, then I only draw the pixel if  the distance away from the center is divisable by 12. This of course gives bands of color. Just a fun artsy take on the traditional shading methods.




Sloppy source and .exe for Windows.
V
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Interesting Voronoi diagram...
« Reply #1 on: July 13, 2009 »
Thats a pretty psychedelic colour scheme, I always liked voronoi, this one looks quite different to those which I have seen before, and yeah, it takes a few seconds to render but it's worth it :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Re: Interesting Voronoi diagram...
« Reply #2 on: July 13, 2009 »


Thanks Shockwave, this would probably have a meta blobs effect if done in real time. Thanks for replying. :) I guess it is kind of like meta balls meets Voronoi diagram, one can see both.
Challenge Trophies Won:

Offline Hezad

  • Sponsor
  • Pentium
  • *******
  • Posts: 613
  • Karma: 44
  • I believe .. in Patrick.
    • View Profile
    • Hezad.com Web hosting
Re: Interesting Voronoi diagram...
« Reply #3 on: July 13, 2009 »
hum can't run it since I'm on Debian but it looks really cool

Thats a pretty psychedelic colour scheme, I always liked voronoi, this one looks quite different to those which I have seen before, and yeah, it takes a few seconds to render but it's worth it :)

+1 never saw this kind of voronoi diagram, cool :)

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Interesting Voronoi diagram...
« Reply #4 on: July 13, 2009 »
Nice graphic!  How about combining this effect with plasma?

Jim
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: Interesting Voronoi diagram...
« Reply #5 on: July 13, 2009 »
Quote
I only draw the pixel if  the distance away from the center is divisable by 12
You could also draw the other 11 circles in different colours and animate the whole thing using palette-rotation.
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: Interesting Voronoi diagram...
« Reply #6 on: July 13, 2009 »
Nice one PO. Keep updates coming.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Interesting Voronoi diagram...
« Reply #7 on: July 14, 2009 »
Looks very interesting. Perhaps if some precalculations were made it could be made to animate using a variable seed number? It would probably look really cool with movement.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Interesting Voronoi diagram...
« Reply #8 on: July 14, 2009 »
Rotating the palette as Hellfire said will provide the fastest result, but here's an idea I had.

If you generate the voronoi pattern bigger than the screen and you shade or fill in the black areas between the lines you could apply a sine wave across the horizontal plane of the image, adding blended vertically sined lines accross the top of the image (this would help to disguise that it is just a sined and cycled picture), this would be a really good way of cheating an excellent psychedelic plasma pattern.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: Interesting Voronoi diagram...
« Reply #9 on: July 14, 2009 »
Looking at the source it appears that you are using RGB colors, so you could just apply a scaling factor to a particular color to push or pull it along the the color scale. You would have to apply the scale factor to each color component equally (or not) and clamp the values to 0 or 255, but you could create an interesting effect with little change to your source.

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: Interesting Voronoi diagram...
« Reply #10 on: July 22, 2009 »
@Pixel_Outlaw:
Screenshot looks very interesting... nice work!
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won: