POV-Ray : Newsgroups : povray.binaries.images : hilbert2d utility Server Time
10 Oct 2026 06:39:25 EDT (-0400)
  hilbert2d utility (Message 1 to 42 of 42)  
From: jr
Subject: hilbert2d utility
Date: 3 May 2018 11:50:38
Message: <5aeb2fce@news.povray.org>
see message in p.b.utilities


Post a reply to this message


Attachments:
Download 'diffuse_back2.png' (301 KB) Download 'grenadine2.png' (215 KB)

Preview of image 'diffuse_back2.png'
diffuse_back2.png

Preview of image 'grenadine2.png'
grenadine2.png


 

From: Stephen
Subject: Re: hilbert2d utility
Date: 3 May 2018 13:05:42
Message: <5aeb4166@news.povray.org>
On 03/05/2018 16:50, jr wrote:
> see message in p.b.utilities
> 

I have been playing with the spheresweep output. As I try to trace() a 
grass landscape with a path of flowers following a Hilbert Curve.


-- 

Regards
     Stephen


Post a reply to this message


Attachments:
Download 'hilbertflowers_3a1b1mm_0000.png' (1353 KB) Download 'hilbertflowers_3b2m_0000.png' (1326 KB)

Preview of image 'hilbertflowers_3a1b1mm_0000.png'
hilbertflowers_3a1b1mm_0000.png

Preview of image 'hilbertflowers_3b2m_0000.png'
hilbertflowers_3b2m_0000.png


 

From: Paolo Gibellini
Subject: Re: hilbert2d utility
Date: 7 May 2018 06:16:14
Message: <5af0276e$1@news.povray.org>
Stephen wrote on 03/05/2018 19:05:
> On 03/05/2018 16:50, jr wrote:
>> see message in p.b.utilities
>>
> 
> I have been playing with the spheresweep output. As I try to trace() a 
> grass landscape with a path of flowers following a Hilbert Curve.
> 
> 
Both interesting concepts.
Paolo


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 7 May 2018 07:54:59
Message: <5af03e93$1@news.povray.org>
On 07/05/2018 11:16, Paolo Gibellini wrote:
> Stephen wrote on 03/05/2018 19:05:
>> On 03/05/2018 16:50, jr wrote:
>>> see message in p.b.utilities
>>>
>>
>> I have been playing with the spheresweep output. As I try to trace() a 
>> grass landscape with a path of flowers following a Hilbert Curve.
>>
>>
> Both interesting concepts.


I thought so. If I come up with anything I'll post an image.


-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: hilbert2d utility
Date: 7 May 2018 10:10:01
Message: <web.5af05db8ff7db64cc437ac910@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
> On 07/05/2018 11:16, Paolo Gibellini wrote:
> > Stephen wrote on 03/05/2018 19:05:
> >> On 03/05/2018 16:50, jr wrote:
> >>> see message in p.b.utilities
> >>>
> >>
> >> I have been playing with the spheresweep output. As I try to trace() a
> >> grass landscape with a path of flowers following a Hilbert Curve.

This would work well with Kenneth's "sideways heightfield" city building concept
to make shrubs or a hedge maze.

And,
If there's a bustle in your hedgerow, don't be alarmed, now.


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 7 May 2018 10:53:50
Message: <5af0687e$1@news.povray.org>
On 07/05/2018 15:07, Bald Eagle wrote:
> Stephen <mca### [at] aolcom> wrote:
>> On 07/05/2018 11:16, Paolo Gibellini wrote:
>>> Stephen wrote on 03/05/2018 19:05:
>>>> On 03/05/2018 16:50, jr wrote:
>>>>> see message in p.b.utilities
>>>>>
>>>>
>>>> I have been playing with the spheresweep output. As I try to trace() a
>>>> grass landscape with a path of flowers following a Hilbert Curve.
> 
> This would work well with Kenneth's "sideways heightfield" city building concept
> to make shrubs or a hedge maze.
> 

There is already an Ivy generator. But you could grow moss or lichen 
over a building.


> And,
> If there's a bustle in your hedgerow, don't be alarmed, now.
> 

If there is. Then the bugs in my code could wear it. :)
Might even eat it. Because on several occasions they have eaten all my 
RAM. :(

Which means I am restarting from step 2.

Loops, my version of the perpetual motion machine.

-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 8 May 2018 08:58:24
Message: <5af19ef0@news.povray.org>
On 07/05/2018 15:53, Stephen wrote:
> Which means I am restarting from step 2.

Still not happy with it. I'm sure there is something wrong with the 
scene code. PovRay 3.7 does not release the memory. PovRay 3.8 does.

But I am moving on.



-- 

Regards
     Stephen


Post a reply to this message


Attachments:
Download 'hilbertflowers_4c2a1m4_0000.png' (2338 KB)

Preview of image 'hilbertflowers_4c2a1m4_0000.png'
hilbertflowers_4c2a1m4_0000.png


 

From: clipka
Subject: Re: hilbert2d utility
Date: 9 May 2018 07:19:09
Message: <5af2d92d@news.povray.org>
Am 08.05.2018 um 14:58 schrieb Stephen:
> On 07/05/2018 15:53, Stephen wrote:
>> Which means I am restarting from step 2.
> 
> Still not happy with it. I'm sure there is something wrong with the
> scene code. PovRay 3.7 does not release the memory. PovRay 3.8 does.

Doesn't have to be buggy scene code. POV-Ray v3.7 wasn't perfect.
POV-Ray v3.8 is...















... a bit better.


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 9 May 2018 08:27:47
Message: <5af2e943$1@news.povray.org>
On 09/05/2018 12:19, clipka wrote:
> Am 08.05.2018 um 14:58 schrieb Stephen:
>> On 07/05/2018 15:53, Stephen wrote:
>>> Which means I am restarting from step 2.
>>
>> Still not happy with it. I'm sure there is something wrong with the
>> scene code. PovRay 3.7 does not release the memory. PovRay 3.8 does.
> 
> Doesn't have to be buggy scene code. POV-Ray v3.7 wasn't perfect.
> POV-Ray v3.8 is...
> 
> 

Tada!



> 
> 
> 
> 
> 

I don't read below the line. ;-)
> 
> 
> 
There is something wrong with the code. There is a wayward "{" or "}" 
somewhere. I have to comment a "}" out to get it working.

While I am at it and before I forget. Is there something in the Windoze 
editor that gets confused when /* ... */ comments are nested?
Ctrl + ] doesn't always work as I expect.
But then that could be me. It so often is.


> 
> 
> 
> 
> 
> .... a bit better.
> 


-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: hilbert2d utility
Date: 9 May 2018 09:28:08
Message: <5af2f768$1@news.povray.org>
Am 09.05.2018 um 14:27 schrieb Stephen:

> While I am at it and before I forget. Is there something in the Windoze
> editor that gets confused when /* ... */ comments are nested?
> Ctrl + ] doesn't always work as I expect.
> But then that could be me. It so often is.

While POV-Ray's parser allows comments to be nested, the 3rd party
editor component isn't designed to accomodate for that.

So for example,

    /*a/*b*/c*/

to POV-Ray is a comment containing `a/*b*/c` (the portion `/*b*/` being
a nested comment), while to the editor it is a comment containing `a/*b`
(the `/*` being nothing special) followed by a separate `c*/` outside
the comment.


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 9 May 2018 10:00:01
Message: <web.5af2fe9dff7db64c2a2ff10d0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 09.05.2018 um 14:27 schrieb Stephen:
>
> > While I am at it and before I forget. Is there something in the Windoze
> > editor that gets confused when /* ... */ comments are nested?
> > Ctrl + ] doesn't always work as I expect.
> > But then that could be me. It so often is.
>
> While POV-Ray's parser allows comments to be nested, the 3rd party
> editor component isn't designed to accomodate for that.
>
> So for example,
>
>     /*a/*b*/c*/
>
> to POV-Ray is a comment containing `a/*b*/c` (the portion `/*b*/` being
> a nested comment), while to the editor it is a comment containing `a/*b`
> (the `/*` being nothing special) followed by a separate `c*/` outside
> the comment.

Good, that eliminates one straw I was grasping at. :-)

Thanks for the quick reply.

Stephen


Post a reply to this message

From: Kenneth
Subject: Re: hilbert2d utility
Date: 9 May 2018 16:10:00
Message: <web.5af3551dff7db64ca47873e10@news.povray.org>
jr <cre### [at] gmailcom> wrote:
> see message in p.b.utilities

Beautiful images.

Off-topic, I think the 'lemon slice' in your grenadine photo would look much
nicer if it used subsurface scattering (SSLT). That slice looks like a good
candidate for it.


Post a reply to this message

From: Kenneth
Subject: Re: hilbert2d utility
Date: 9 May 2018 16:15:00
Message: <web.5af35668ff7db64ca47873e10@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
>
> I have been playing with the spheresweep output. As I try to trace() a
> grass landscape with a path of flowers following a Hilbert Curve.
>

Those images are really nice.

Did you 'trace' all the green grass blades onto the object, or did you use some
other less-involved trick?

I love the 'fuzzy' look of the grass, in the more distant render; it looks like
the fuzz on a tennis ball; or maybe 'flocking.' At first, I thought it was an
interesting use of crand!


Post a reply to this message

From: Kenneth
Subject: Re: hilbert2d utility
Date: 9 May 2018 17:15:01
Message: <web.5af363dcff7db64ca47873e10@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

>
> ...Is there something in the Windoze
> editor that gets confused when /* ... */ comments are nested?
> Ctrl + ] doesn't always work as I expect.
> But then that could be me. It so often is.
>

Yeah, that can be annoying. If we're taking about the same thing(?), I wrote an
earlier post about it...

http://news.povray.org/povray.general/thread/%3Cweb.5a1ffb6a92f74a1989df8d30%40news.povray.org%3E/?ttop=422124&toff=50


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 9 May 2018 17:35:12
Message: <5af36990$1@news.povray.org>
On 09/05/2018 21:13, Kenneth wrote:
> Stephen <mca### [at] aolcom> wrote:
>>
>> I have been playing with the spheresweep output. As I try to trace() a
>> grass landscape with a path of flowers following a Hilbert Curve.
>>
> 
> Those images are really nice.
> 

Thank you.


> Did you 'trace' all the green grass blades onto the object, or did you use some
> other less-involved trick?
> 

  Every single one of them. If I remember correctly there are about 6 
million  grass blades on the total target heightfield area. At that 
density of grass. The render time was about 8 minutes. Mostly parsing.

  It really is a brute force method. One WIP had about 11E6 blades and I 
was shutting down programs as the memory usage climbed.

The target could be anything. Here is a link to one I made in reply to a 
friend who sent me a sarky cartoon.

*Rude word warning*

https://i.imgur.com/kvDzf4T.png



> I love the 'fuzzy' look of the grass, in the more distant render; it looks like
> the fuzz on a tennis ball; or maybe 'flocking.' At first, I thought it was an
> interesting use of crand!
> 

Crand!
Crand? I like to think of myself as an animator. I never use crand. ;-)

The "look" is very dependant on the closeness of the view.

I'm going to try to plant flowers to make an image from a poster, next.


-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 9 May 2018 17:49:27
Message: <5af36ce7$1@news.povray.org>
On 09/05/2018 22:10, Kenneth wrote:
> Stephen <mca### [at] aolcom> wrote:
> 
>>
>> ...Is there something in the Windoze
>> editor that gets confused when /* ... */ comments are nested?
>> Ctrl + ] doesn't always work as I expect.
>> But then that could be me. It so often is.
>>
> 
> Yeah, that can be annoying. If we're taking about the same thing(?), I wrote an
> earlier post about it...
> 
>
http://news.povray.org/povray.general/thread/%3Cweb.5a1ffb6a92f74a1989df8d30%40news.povray.org%3E/?ttop=422124&toff=50
> 
> 

Yes, we are talking about the same thing. I don't know how I missed your 
post. It would have saved me a few hours if I had known that it was a 
known issue.

-- 

Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: hilbert2d utility
Date: 9 May 2018 18:44:20
Message: <5af379c4@news.povray.org>
Le 18-05-09 à 16:07, Kenneth a écrit :
> jr <cre### [at] gmailcom> wrote:
>> see message in p.b.utilities
> 
> Beautiful images.
> 
> Off-topic, I think the 'lemon slice' in your grenadine photo would look much
> nicer if it used subsurface scattering (SSLT). That slice looks like a good
> candidate for it.
> 
> 
> 

That lemon slice, and the glass, is from the grenadine.pov that that you 
can find in .../scenes/advanced/grenadine/grenadine.pov


Post a reply to this message

From: jr
Subject: Re: hilbert2d utility
Date: 9 May 2018 21:03:25
Message: <5af39a5d@news.povray.org>
hi,

On 09/05/2018 21:07, Kenneth wrote:
> Beautiful images.

thanks.  as Alain mentioned, the images are "hacked" scenes from the
distribution.

and glad you commented, because Bald Eagle wrote "This would work well
with Kenneth's "sideways heightfield" city building concept to make
shrubs or a hedge maze."

which got me thinking, not hedge - building.  could your system be used
to "drape" a suitably scaled building shaped like in the attached
image*?  30+ floors, ideally.

jr.

* the script to convert a hilbert2d sphere_sweep to boxes is posted as a
follow up to the program, in p.b.utilities.


Post a reply to this message


Attachments:
Download 'build-outline.png' (3 KB)

Preview of image 'build-outline.png'
build-outline.png


 

From: Kenneth
Subject: Re: hilbert2d utility
Date: 10 May 2018 01:35:01
Message: <web.5af3d9bdff7db64ca47873e10@news.povray.org>
jr <cre### [at] gmailcom> wrote:

>
> and glad you commented, because Bald Eagle wrote "This would work well
> with Kenneth's "sideways heightfield" city building concept to make
> shrubs or a hedge maze."
>
> which got me thinking, not hedge - building.  could your system be used
> to "drape" a suitably scaled building shaped like in the attached
> image*?  30+ floors, ideally.
>

(I had to brush-up on my miniscule knowledge of Hilbert curves!)

Is this what you have in mind, as the general idea?

This test image doesn't actually use height_fields for the vertical building
faces; in fact, it's just a POV-Ray + Photoshop mock-up!

Like you, I've been thinking about how to use my HF idea to make buildings with
'indented' sections. Not particularly in the shape of Hilbert curves, but the
same general idea. *In theory*, it should be easy. The trick is to 'slice and
dice' (and then rotate) the many vertically-oriented HF faces so that they all
match up with no seams-- AND so that only full window sections are used. That
particular problem is apparent in this mock-up image: some of the windows are
cut off prematurely at the various building edges.

But it should be easy to do; I just haven't gotten to that stage yet. (Real life
keeps intruding.) Even a Hilbert-curve variety looks do-able; the equations for
that could be used in some way to do the proper slicing/dicing of the HFs.


Post a reply to this message


Attachments:
Download 'hilbert_towers.jpg' (147 KB)

Preview of image 'hilbert_towers.jpg'
hilbert_towers.jpg


 

From: Thomas de Groot
Subject: Re: hilbert2d utility
Date: 10 May 2018 02:50:28
Message: <5af3ebb4$1@news.povray.org>
[shudder]

I do not want to imagine what it would be like to live in a building 
like that! ;-)

-- 
Thomas


Post a reply to this message

From: jr
Subject: Re: hilbert2d utility
Date: 10 May 2018 14:46:09
Message: <5af49371@news.povray.org>
hi,

On 10/05/2018 06:33, Kenneth wrote:
>> which got me thinking, not hedge - building.  could your system be used
>> to "drape" a suitably scaled building shaped like in the attached
>> image*?  30+ floors, ideally.
> 
> (I had to brush-up on my miniscule knowledge of Hilbert curves!)
> Is this what you have in mind, as the general idea?

that must be some brush.  :-)  very cool image, in essence what I have
in mind.  more below.

> This test image doesn't actually use height_fields for the vertical building
> faces; in fact, it's just a POV-Ray + Photoshop mock-up!

you use HFs to get balconies and such?

> Like you, I've been thinking about how to use my HF idea to make buildings with
> 'indented' sections. Not particularly in the shape of Hilbert curves, but the
> same general idea. *In theory*, it should be easy. The trick is to 'slice and
> dice' (and then rotate) the many vertically-oriented HF faces so that they all
> match up with no seams-- AND so that only full window sections are used. That
> particular problem is apparent in this mock-up image: some of the windows are
> cut off prematurely at the various building edges.

cannot comment really since I've no idea of details, but am curious to
learn more.  can I read slicing + dicing as using a tile-based method?

> But it should be easy to do; I just haven't gotten to that stage yet. (Real life
> keeps intruding.) Even a Hilbert-curve variety looks do-able; the equations for
> that could be used in some way to do the proper slicing/dicing of the HFs.

again, curious to find out a little more about the tool(s) in use.


On 10/05/2018 07:50, Thomas de Groot wrote:
> [shudder]
> I do not want to imagine what it would be like to live in a building
> like that! ;-)

oh dear.  :-)

it may get worse.  the setting I have in mind is in part inspired by
your scene with the house by/in the water.  ;-)

think science fiction. the building is not really that, it is the whole
city.  if the grid unit is 1km and the construction is, say, 400m wide
and 1600m tall, there's enough room for everything:
fishing/shipping/light industry, public + civil service stuff, internal
transport systems, and residential.  it stands just offshore, in shallow
waters.

jr.


Post a reply to this message

From: Kenneth
Subject: Re: hilbert2d utility
Date: 10 May 2018 17:20:00
Message: <web.5af4b6afff7db64ca47873e10@news.povray.org>
jr <cre### [at] gmailcom> wrote:
>
> can I read slicing + dicing as using a tile-based method?
>

Yes, and in two different ways.

The INITIAL 1X1-unit (horizontal) height_field is made from some Photoshop
artwork-- which is derived from a building-face photo I snatched from the
internet. (LOTS of those!) The photo will generally show a good number of
windows.

That photo (and its HF derivitive) are first trimmed to be a repeating tile,
with a certain number of window units (which actually varies from photo to
photo, depending on the photo itself and on my own whim.)

The initial height_field is then repeated (or 'assembled') into a much more
expansive HF-- lots of repetitive tiles, and all still horizontal. (The actual
windows photo is then applied to this as a repeating pigment, in a likewise
way.)

This is the main HF 'template' -- which is then flipped vertically (as a
building face), then trimmed down to any particular width and height that I want
for a particular building shape. For a typical 'boxy' building, it's just a
matter of making four of those building faces and rotating/translating them
correctly-- with the caveat that the chosen face widths should not 'slice
though' any actual windows.

For a building with *indents* in the faces -- like the Hilbert example (OR
protrusions)-- the HF template needs to be 'sliced' into smaller widths for
those sections. My 'Hilbert Towers' example image looks like it would need 28(?)
different faces-- but could make use of identical repetitions to reduce that.

>
> you use HFs to get balconies and such?

Well, to a limited extent. So far, I've used the HFs only to get *recessed*
windows, and also some slightly protruding shapes (like window lintels and the
occasional air-conditioner that sticks out a window.) I think actual balconies
would require a different(?) approach-- only because of the balcony railings.
They don't look right as part of the HF.


Post a reply to this message

From: jr
Subject: Re: hilbert2d utility
Date: 10 May 2018 19:30:40
Message: <5af4d620$1@news.povray.org>
hi,

On 10/05/2018 22:16, Kenneth wrote:
> This is the main HF 'template' ...

a lot of detail, thanks.  there's one thing I'd like to clarify straight
away, before "cogitating" and reply.

suppose you had used the method described to make the HilbertTower
image, the template would be a "strip", ie the windows/facade for a
single floor, and would have been applied 20 or so times?  thanks.

jr.


Post a reply to this message

From: Kenneth
Subject: Re: hilbert2d utility
Date: 13 May 2018 11:15:00
Message: <web.5af85647ff7db64ca47873e10@news.povray.org>
jr <cre### [at] gmailcom> wrote:

(Sorry that I'm not responding as quickly as I'd like; not much free time
lately.)
>
> suppose you had used the method described to make the HilbertTower
> image, the template would be a "strip", ie the windows/facade for a
> single floor, and would have been applied 20 or so times?  thanks.
>

It *could* be done that way-- floor by floor-- but the basic window photo tiles
I use are typically 3 or 4 window-units wide, and the the same in height. It
depends on the photo, or if there's some interesting subtle variation in it.
Some photos have lots more windows. But the underlying scene code does apply the
windows floor-by-floor (and in single-window widths, if that makes sense to
you.)

One small detail I left out: the horizontal rooftops. They have to be
constructed in a different way, because the final building is just a
multi-height_field 'shell' with no innards (and no top!) I haven't arrived at a
good method for that yet ;-) For a simple 4-sided 'box' building, the roof could
likewise be a thin box; but a 'Hilbert-style' building (i.e., one with indents)
would need something more complex.


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 14 May 2018 14:35:13
Message: <5af9d6e1$1@news.povray.org>
On 13/05/2018 16:14, Kenneth wrote:
> jr <cre### [at] gmailcom> wrote:
> 
> (Sorry that I'm not responding as quickly as I'd like; not much free time
> lately.)
>>

Hi Kenneth,
jr has asked me to ask you, to drop him an email on the subject. As he 
has lost access to the newsgroups.


-- 

Regards
     Stephen


Post a reply to this message

From: Kenneth
Subject: Re: hilbert2d utility
Date: 15 May 2018 17:25:00
Message: <web.5afb4f94ff7db64ca47873e10@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> [shudder]
>
> I do not want to imagine what it would be like to live in a building
> like that! ;-)
>

It's a very exclusive residence: a retirement home for mathematicians :-P


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 15 May 2018 18:02:54
Message: <5afb590e$1@news.povray.org>
On 15/05/2018 22:22, Kenneth wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> [shudder]
>>
>> I do not want to imagine what it would be like to live in a building
>> like that! ;-)
>>
> 
> It's a very exclusive residence: a retirement home for mathematicians :-P
> 
> 

That would be Hilbert's hotel, then. "Always room for one more."

-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: hilbert2d utility
Date: 16 May 2018 02:49:41
Message: <5afbd485$1@news.povray.org>
On 16-5-2018 0:02, Stephen wrote:
> On 15/05/2018 22:22, Kenneth wrote:
>> Thomas de Groot <tho### [at] degrootorg> wrote:
>>> [shudder]
>>>
>>> I do not want to imagine what it would be like to live in a building
>>> like that! ;-)
>>>
>>
>> It's a very exclusive residence: a retirement home for mathematicians :-P
>>
>>
> 
> That would be Hilbert's hotel, then. "Always room for one more."
> 

LOL. Am I glad that I am not a mathematician ;-)

I have seen apartment buildings like that. When you live, say, on the 
fifth floor and on the inner court, you live a dismal life with hardly 
any daylight. :-/

-- 
Thomas


Post a reply to this message

From: Kenneth
Subject: Re: hilbert2d utility
Date: 23 May 2018 16:05:01
Message: <web.5b05c952ff7db64ca47873e10@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
>
> Hi Kenneth,
> jr has asked me to ask you, to drop him an email on the subject. As he
> has lost access to the newsgroups.
>

Just tried to contact him, but his email address is showing up here on the web
interface as
  jr <cre### [at] gmailcom>

I'm seeing ### after  cre   and they don't work. Apparently those hash marks are
substituting for something else. :-(  Maybe it's a web-interface vs. newsreader
difference?


Post a reply to this message

From: Bald Eagle
Subject: Re: hilbert2d utility
Date: 25 May 2018 16:40:01
Message: <web.5b087378ff7db64c10874a080@news.povray.org>
Just ran across a very interesting video about the Hilbert Curve.

https://www.youtube.com/watch?v=3s7h2MHQtxc

This actually suggests that since a Hilbert curve is a continuous function that
can fill 2D (3d?)  that it can be implemented as a pigment pattern.

Perhaps others with more free time can imagine other interesting uses.  :)


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 25 May 2018 16:53:29
Message: <5b0877c9@news.povray.org>
On 25/05/2018 21:35, Bald Eagle wrote:
> This actually suggests that since a Hilbert curve is a continuous function that
> can fill 2D (3d?)


That's how jr hooked me, with a 3D Hilbert curve. ;-)

You might be able to twist his arm. ☺


-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: hilbert2d utility
Date: 26 May 2018 02:37:55
Message: <5b0900c3$1@news.povray.org>
On 25-5-2018 22:53, Stephen wrote:
> On 25/05/2018 21:35, Bald Eagle wrote:
>> This actually suggests that since a Hilbert curve is a continuous 
>> function that
>> can fill 2D (3d?)
> 
> 
> That's how jr hooked me, with a 3D Hilbert curve. ;-)
> 
> You might be able to twist his arm. ☺
> 
> 

Which reminds me: how do you run this utility?

-- 
Thomas


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 26 May 2018 03:15:29
Message: <5b090991@news.povray.org>
On 26/05/2018 07:37, Thomas de Groot wrote:
> On 25-5-2018 22:53, Stephen wrote:
>> On 25/05/2018 21:35, Bald Eagle wrote:
>>> This actually suggests that since a Hilbert curve is a continuous 
>>> function that
>>> can fill 2D (3d?)
>>
>>
>> That's how jr hooked me, with a 3D Hilbert curve. ;-)
>>
>> You might be able to twist his arm. ☺
>>
>>
> 
> Which reminds me: how do you run this utility?
> 

In a *nix environment. I installed Cygwin so it runs in a DOS box. If 
you want it to run the included example. You will need to have 
pvengine.exe in your path.

-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 26 May 2018 04:37:03
Message: <5b091caf$1@news.povray.org>
On 26/05/2018 08:15, Stephen wrote:
>>
>> Which reminds me: how do you run this utility?
>>
> 
> In a *nix environment. I installed Cygwin so it runs in a DOS box. If 
> you want it to run the included example. You will need to have 
> pvengine.exe in your path.

Once you have done that. Put hilbert2d.c and makefile in a directory 
then type make [enter]. This will compile hilbert2d.exe.
Run hilbert2d –n13 –Dobigtest
And it will create an include file and a pov file.

Or drop me a mail and I will give you a copy of the one I compiled.


-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: hilbert2d utility
Date: 26 May 2018 04:39:40
Message: <5b091d4c$1@news.povray.org>
On 26/05/2018 09:37, Stephen wrote:
> hilbert2d –n13 –Dobigtest

<sigh>
-n N the program generates Hilbert curves which are always 2ˆN units 
long, the length argument provides the value of N, the range is: 2 <= N 
<= 24. the default is "6", that is, a length of 64, covering 8x8 units 
(unscaled).


-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: hilbert2d utility
Date: 26 May 2018 07:10:38
Message: <5b0940ae$1@news.povray.org>
On 26-5-2018 10:37, Stephen wrote:
> On 26/05/2018 08:15, Stephen wrote:
>>>
>>> Which reminds me: how do you run this utility?
>>>
>>
>> In a *nix environment. I installed Cygwin so it runs in a DOS box. If 
>> you want it to run the included example. You will need to have 
>> pvengine.exe in your path.
> 
> Once you have done that. Put hilbert2d.c and makefile in a directory 
> then type make [enter]. This will compile hilbert2d.exe.
> Run hilbert2d –n13 –Dobigtest
> And it will create an include file and a pov file.
> 
> Or drop me a mail and I will give you a copy of the one I compiled.
> 
> 

Thanks indeed. It has no high priority at the moment. I shall first try 
to extend my skills by myself ;-)

-- 
Thomas


Post a reply to this message

From: jr
Subject: Re: hilbert2d utility
Date: 29 May 2018 16:40:00
Message: <web.5b0db9aeff7db64c82a92ab90@news.povray.org>
hi,

"Kenneth" <kdw### [at] gmailcom> wrote:
> Stephen <mca### [at] aolcom> wrote:
> > Hi Kenneth,
> > jr has asked me to ask you, to drop him an email on the subject. As he
> > has lost access to the newsgroups.
> Just tried to contact him, but his email address is showing up here on the web
> interface as
>   jr <cre### [at] gmailcom>
> I'm seeing ### after  cre   and they don't work. Apparently those hash marks are
> substituting for something else. :-(  Maybe it's a web-interface vs. newsreader
> difference?

sorry for lengthy delay, can post again at last.  unfortunately via web
interface, not Thunderbird.  anyhow, will put thoughts to paper before weekend.

regards, jr.


Post a reply to this message

From: jr
Subject: Re: hilbert2d utility
Date: 29 May 2018 16:40:01
Message: <web.5b0dba6aff7db64c82a92ab90@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> Just ran across a very interesting video about the Hilbert Curve.
> https://www.youtube.com/watch?v=3s7h2MHQtxc

v natty.  and many more "goodies" on this channel.  thank you.

> This actually suggests that since a Hilbert curve is a continuous function that
> can fill 2D (3d?)  that it can be implemented as a pigment pattern.
>
> Perhaps others with more free time can imagine other interesting uses.  :)

how does/would distance relate to colour?


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: hilbert2d utility
Date: 29 May 2018 21:35:01
Message: <web.5b0dff97ff7db64c10874a080@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> v natty.  and many more "goodies" on this channel.  thank you.

No prob.   There's lots of cool stuff out there, and SO much to learn!


> how does/would distance relate to colour?

3.6.1.1.2 Color Map

Most of the color patterns do not use abrupt color changes of just two or three
colors like those in the brick, checker or hexagon patterns. They instead use
smooth transitions of many colors that gradually change from one point to the
next. The colors are defined in a pigment modifier called a color_map that
describes how the pattern blends from one color to the next. New in version
3.7.1 non-linear color map interpolation support has been added.


:D   :P


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.

It might take some finagling to get it to work in a practical sense, but I guess
I'm envisioning a pseudo-Hilbert curve function, where you can specify a number
for the "order" or whatever the proper term is, or there's a function for the
"real" Hilbert curve, and you'd "just" fill a unit square with it.

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


Post a reply to this message

From: jr
Subject: Re: hilbert2d utility
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

From: Bald Eagle
Subject: Re: hilbert2d utility
Date: 30 May 2018 06:45:00
Message: <web.5b0e8080ff7db64c10874a080@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

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


That what the Hilbert curve does, right?   Maps 1D input to 2D output?

> > 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?

Sure - but the way to think about a pigment_pattern is as an equation - for any
<x, y, z> plugged in, you should get some 0-1 out.  Then POV-Ray takes that
value and further processes it with a color map, texture map, material map,
normal, heightfield height, etc.


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

That's literally all there is to it.

If you can find code for the 3D version, then that would provide a full
space-filling function.


Post a reply to this message

From: jr
Subject: Re: hilbert2d utility
Date: 30 May 2018 11:15:00
Message: <web.5b0ebf1bff7db64c82a92ab90@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> That what the Hilbert curve does, right?   Maps 1D input to 2D output?
>
> > > 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?
>
> Sure - but the way to think about a pigment_pattern is as an equation - for any
> <x, y, z> plugged in, you should get some 0-1 out.  Then POV-Ray takes that
> value and further processes it with a color map, texture map, material map,
> normal, heightfield height, etc.
>
> > the output of the 'xy2d()' code could be scaled to the 0..1 range.  would that
> > do the trick?
>
> That's literally all there is to it.

it should be relatively straightforward to convert the 2D code to idiomatic C++*
and make it available as an intrinsic function which, given the length of a
curve + xy coords, spits out an index.  one for the developers, I think.

* an educated guess, I do not "speak" C++.

> If you can find code for the 3D version, then that would provide a full
> space-filling function.

there's an archive on the interweb, from ca 1999, which provides some 3D code.
if I find an unmodified copy I will post it here.


regards, jr.


Post a reply to this message

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