POV-Ray : Newsgroups : povray.general : Repeating texture sprite : Re: Repeating texture sprite Server Time
29 Apr 2024 15:45:18 EDT (-0400)
  Re: Repeating texture sprite  
From: Anthony D  Baye
Date: 29 Feb 2016 19:30:06
Message: <web.56d4e18b3999a40fd6b6fe10@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> http://www.bluh.org/code-the-diamond-square-algorithm/
>
> discusses "wrapping" over the edge.
>
> http://www.mapeditor.org/    looked interesting if you're doing that kind of
> work.

I was thinking that if you assigned each tile a shade of gray, you could use the
value of each pixel to tell you what tiles to place.

here's some old code I wrote for the diamond square algorithm:
https://www.dropbox.com/s/wbr4h93jssm6pfn/dsquare.tar.gz?dl=0

comments are almost non-existant, and it's somewhat messy, but it's functional.
I included the makefile so you can build it easily.

usage is lScape5 width height

really, I could have just used one parameter, since the image has to be square.
Also, the dimensions have to be one pixel higher than a power of 2 for it to
work: eg. 257x257 or 513x513

Regards,
A.D.B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.