POV-Ray : Newsgroups : povray.binaries.images : hilbert2d utility : Re: hilbert2d utility Server Time
3 May 2024 03:33:08 EDT (-0400)
  Re: hilbert2d utility  
From: jr
Date: 30 May 2018 05:30:00
Message: <web.5b0e6dfcff7db64c82a92ab90@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> > how does/would distance relate to colour?
> 3.6.1.1.2 Color Map

I thought (think) of a colour map as 1D, so not sure how that relates ("maps")
to 2D, however..

> I suppose if the Hilbert curve is a "curve" that is continuous function and can
> go from a value to a 2D coordinate, then perhaps there is the inverse of the
> function that can go from 2D coordinates to the 0-1 values in a color map.

there is. example code on https://en.wikipedia.org/wiki/Hilbert_curve.

interestingly, the animated gif in the top right of that page is "coloured in".
is that similar to what you're thinking of?

> I was guessing you were much more well versed in the topic and would have some
> idea as to how to implement it.

heh.  I wouldn't know maths if it came and bit me.  the 'hilbert2d' utility is
just a "wrapper" around the code taken from that wiki page.

the output of the 'xy2d()' code could be scaled to the 0..1 range.  would that
do the trick?


regards, jr.


Post a reply to this message

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