POV-Ray : Newsgroups : povray.binaries.images : puzzles (again) [202 KB] Server Time
10 Aug 2024 13:24:56 EDT (-0400)
  puzzles (again) [202 KB] (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: JWV
Subject: puzzles (again) [202 KB]
Date: 20 Aug 2004 16:14:43
Message: <41265bb3@news.povray.org>
Hello,

Inspired by the question of incognito, I started making a puzzle macro.

It is nearly finished (some minor CSG stuff to be done), but good enough for
a demo scene.

The macro needs the following variables:
-number of collums (integer)
-number of rows (integer)
-radius of edges (float)

Variables that can be changed before the macro is called:
-fast (no rounded edges) (on/off)
-party(gives the pieces random collors) (on/off)
-texture of pieces
-...
-suggestions???

The macro will be released "soon".

Of course comments, questions are very welcome as usual  :-).

Greetings,

JWV


Post a reply to this message


Attachments:
Download 'puzzle.jpg' (203 KB)

Preview of image 'puzzle.jpg'
puzzle.jpg


 

From: Jellby
Subject: Re: puzzles (again) [202 KB]
Date: 20 Aug 2004 18:07:11
Message: <4126760f@news.povray.org>
Among other things, "JWV" <jwv|at|planet.nl> wrote:

> The macro needs the following variables:
> -number of collums (integer)
> -number of rows (integer)
> -radius of edges (float)
> 
> Variables that can be changed before the macro is called:
> -fast (no rounded edges) (on/off)
> -party(gives the pieces random collors) (on/off)
> -texture of pieces
> -...
> -suggestions???

Neat!

Some observations/suggestions:

- Could the horizontal/vertical lines separating the pieces (ignoring the 
"protrusions") be a bit more wavy? The pieces are too square for my liking 
(I find real puzzles like that somewhat boring).

- Also, some edges could have no "protrusion", just a more wavy shape than 
the bare straight edge. ASCII picture:
                             ____
                            /    \
     ____                   \    /
  __/    \__  instead of  __/    \___

- Most real puzzles I've found have a lower density of "special" pieces, 
meaning pieces which are *not* the typical shape:
     ___    ___
    |   |__|   |
   _|          |_
  |_            _|
    |    __    |
    |___|  |___|

This density of "defects" could be adjusted with some parameters...

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: Florian Brucker
Subject: Re: puzzles (again) [202 KB]
Date: 20 Aug 2004 20:25:00
Message: <4126965c@news.povray.org>
> Of course comments, questions are very welcome as usual  :-).
Looks great! I did some tests in this direction some months ago, but 
never got as far as you did. Keep up the good work!

Florian (who already has an idea what to do with that macro once you 
publish it)


Post a reply to this message

From: JWV
Subject: Re: puzzles (again) [202 KB]
Date: 21 Aug 2004 05:52:57
Message: <41271b79$1@news.povray.org>
"Jellby" <jel### [at] M-yahoocom> wrote in message
news:4126760f@news.povray.org...
> Among other things, "JWV" <jwv|at|planet.nl> wrote:
>
> > The macro needs the following variables:
> > -number of collums (integer)
> > -number of rows (integer)
> > -radius of edges (float)
> >
> > Variables that can be changed before the macro is called:
> > -fast (no rounded edges) (on/off)
> > -party(gives the pieces random collors) (on/off)
> > -texture of pieces
> > -...
> > -suggestions???
>
> Neat!

Thanks!

>
> Some observations/suggestions:
>
> - Could the horizontal/vertical lines separating the pieces (ignoring the
> "protrusions") be a bit more wavy? The pieces are too square for my liking
> (I find real puzzles like that somewhat boring).

I thought about this, but it would make it way to complex to implement at
this moment.
I think it would even need a completly different approach, and i would need
to master beziersplines first.
So, no, not for the moment. :-) (but it will deffinitly be in v2.0, if there
will be one)

>
> - Also, some edges could have no "protrusion", just a more wavy shape than
> the bare straight edge. ASCII picture:
>                              ____
>                             /    \
>      ____                   \    /
>   __/    \__  instead of  __/    \___

After staring at, thinking about, and realligning the ascii picture: Yes
that would be possible (will try to implement that).

>
> - Most real puzzles I've found have a lower density of "special" pieces,
> meaning pieces which are *not* the typical shape:
>      ___    ___
>     |   |__|   |
>    _|          |_
>   |_            _|
>     |    __    |
>     |___|  |___|
>
> This density of "defects" could be adjusted with some parameters...

Could you explain this in a different way, i don't understand what you mean.

Thanks for you suggesttions,

Greetings,

JWV

>
> -- 
> light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
> 9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
> 0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
>


Post a reply to this message

From: JWV
Subject: Re: puzzles (again) [202 KB]
Date: 21 Aug 2004 05:54:22
Message: <41271bce$1@news.povray.org>
Hi Florian,

> Looks great!
thanks, macro release is planned for today in the afternoon.

"Florian Brucker" <tor### [at] torfboldcom> wrote in message
news:4126965c@news.povray.org...
> > Of course comments, questions are very welcome as usual  :-).
> Looks great! I did some tests in this direction some months ago, but
> never got as far as you did. Keep up the good work!
>
> Florian (who already has an idea what to do with that macro once you
> publish it)


Post a reply to this message

From: JWV
Subject: Re: puzzles (again) [202 KB]
Date: 21 Aug 2004 07:47:54
Message: <4127366a$1@news.povray.org>
Hi,

Well, version 1 is finished, and published in p.b.s-f

Greetings

JWV


"JWV" <jwv|at|planet.nl> wrote in message news:41265bb3@news.povray.org...
> Hello,
>
> Inspired by the question of incognito, I started making a puzzle macro.
>
> It is nearly finished (some minor CSG stuff to be done), but good enough
for
> a demo scene.
>
> The macro needs the following variables:
> -number of collums (integer)
> -number of rows (integer)
> -radius of edges (float)
>
> Variables that can be changed before the macro is called:
> -fast (no rounded edges) (on/off)
> -party(gives the pieces random collors) (on/off)
> -texture of pieces
> -...
> -suggestions???
>
> The macro will be released "soon".
>
> Of course comments, questions are very welcome as usual  :-).
>
> Greetings,
>
> JWV
>
>
>


Post a reply to this message

From: Jellby
Subject: Re: puzzles (again) [202 KB]
Date: 22 Aug 2004 04:15:01
Message: <41285604@news.povray.org>
Among other things, "JWV" <jwv|at|planet.nl> wrote:

>> - Most real puzzles I've found have a lower density of "special" pieces,
>> meaning pieces which are *not* the typical shape:
>>      ___    ___
>>     |   |__|   |
>>    _|          |_
>>   |_            _|
>>     |    __    |
>>     |___|  |___|
>>
>> This density of "defects" could be adjusted with some parameters...
> 
> Could you explain this in a different way, i don't understand what you
> mean.

I'll try, though it's not so important :)

Many real puzzles are somewhat boring, with all pieces the same general 
shape (some of them even have all pieces exactly the same shape). This 
general shape consist on two bulges on two opposite sides and two holes on 
the other two opposite sites. There are, however, some pieces with 
"special" shapes, which deviate from the typical shape mentioned above (and 
shown in the ASCII picture). These "special" pieces or "defects" (since 
they make the overall shape non-periodic) can have:

 - three or even four bulges or holes.
 - two bulges in non-opposite sides (I don't remember having seen this).
 - a side (I have not seen more) without bulge or hole, just the "wavy" 
shape I described in my previous message.

Your puzzle shows the first two kinds of defect, but in a very high number, 
there are too many "special" pieces for a typical puzzle, I'd say. I 
suggested you could make this "density of defects" an adjustable parameter. 
When this parameter is 0, the puzzle would be perfect, completely regular, 
all pieces (except for the straight edges) exactly the same shape, as the 
the parameter increases, the number of "special" pieces increases as 
well... maybe something like this:

 0:   perfect puzzle: bulge to the left, bulge to the right, bulge to the 
left, bulge to right... and bulge down, bulge up, bulge down, bulge up...
 0.1: each bulge has a 10% probability of being inverted (changed from left 
to right or from up to down).
 0.5: the puzzle is completely chaotic, there's no regularity (maybe this is 
how you do it now?)
 1:   all bulges are inverted, so the puzzle is again regular, but 
different.

I don't know what's the structure of your macro right now, but unlike my 
first suggestion (in the previous post), this one should be no real problem 
(I guess). :)

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: Jellby
Subject: Re: puzzles (again) [202 KB]
Date: 22 Aug 2004 04:57:26
Message: <41285ff4@news.povray.org>
Among other things, "JWV" <jwv|at|planet.nl> wrote:

>> - Also, some edges could have no "protrusion", just a more wavy shape
>> than the bare straight edge. ASCII picture:
>>                              ____
>>                             /    \
>>      ____                   \    /
>>   __/    \__  instead of  __/    \___
> 
> After staring at, thinking about, and realligning the ascii picture: Yes
> that would be possible (will try to implement that).

I realized you've already posted the code. I've looked more closely at the 
images and maybe you could find some time to "improve the shapes of the 
pieces. It would take some time and effort, but I believe it may be worth 
it. I include an attachment, because ASCII art is not good enough for this 
;-)

Note: if/when you use differences and intersections in your code, I guess it 
would be wise to add "manual" bounding boxes to improve the rendering 
times...

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message


Attachments:
Download 'shapes.png' (13 KB)

Preview of image 'shapes.png'
shapes.png


 

From: JWV
Subject: Re: puzzles (again) [202 KB]
Date: 22 Aug 2004 09:48:15
Message: <4128a41f$1@news.povray.org>
Hi Jelby,

I understand what you mean now, but it is completely impossible to do that
sort of thing with this macro. In the way this macro works, there is no
knowledge of the actual final shape of the piece. So any test which checks
wether a piece is a "defect" is not being done at the moment. It would be
possible to check for any "defects", but not to do anything with it, since,
when you change a "defect" into a normal piece, it would need the
surrounding pieces to change as well (otherwise they won't fit). When the
surrounding pieces change, there will likely be at least one new "defect".
It would require a lot of code and time to make a "defects_density"
parameter work. I wonder how puzzle manufactures do this...

Well, one very crude method comes to my mind now: simply create random
puzzles (and "defect-test" them) until you find one that matches the desired
defects density. But it is a silly idea.

> I don't know what's the structure of your macro right now, but unlike my
> first suggestion (in the previous post), this one should be no real
problem
> (I guess). :)

So, you guesed wrong :-).

About the waving edges, it can be done but i need a special shape. I'm
thinking about making a deformed square using splines (one spline for each
edge), but i can't find a way to do this.

Greetings,

JWV

"Jellby" <jel### [at] M-yahoocom> wrote in message
news:41285604@news.povray.org...
> Among other things, "JWV" <jwv|at|planet.nl> wrote:
>
> >> - Most real puzzles I've found have a lower density of "special"
pieces,
> >> meaning pieces which are *not* the typical shape:
> >>      ___    ___
> >>     |   |__|   |
> >>    _|          |_
> >>   |_            _|
> >>     |    __    |
> >>     |___|  |___|
> >>
> >> This density of "defects" could be adjusted with some parameters...
> >
> > Could you explain this in a different way, i don't understand what you
> > mean.
>
> I'll try, though it's not so important :)
>
> Many real puzzles are somewhat boring, with all pieces the same general
> shape (some of them even have all pieces exactly the same shape). This
> general shape consist on two bulges on two opposite sides and two holes on
> the other two opposite sites. There are, however, some pieces with
> "special" shapes, which deviate from the typical shape mentioned above
(and
> shown in the ASCII picture). These "special" pieces or "defects" (since
> they make the overall shape non-periodic) can have:
>
>  - three or even four bulges or holes.
>  - two bulges in non-opposite sides (I don't remember having seen this).
>  - a side (I have not seen more) without bulge or hole, just the "wavy"
> shape I described in my previous message.
>
> Your puzzle shows the first two kinds of defect, but in a very high
number,
> there are too many "special" pieces for a typical puzzle, I'd say. I
> suggested you could make this "density of defects" an adjustable
parameter.
> When this parameter is 0, the puzzle would be perfect, completely regular,
> all pieces (except for the straight edges) exactly the same shape, as the
> the parameter increases, the number of "special" pieces increases as
> well... maybe something like this:
>
>  0:   perfect puzzle: bulge to the left, bulge to the right, bulge to the
> left, bulge to right... and bulge down, bulge up, bulge down, bulge up...
>  0.1: each bulge has a 10% probability of being inverted (changed from
left
> to right or from up to down).
>  0.5: the puzzle is completely chaotic, there's no regularity (maybe this
is
> how you do it now?)
>  1:   all bulges are inverted, so the puzzle is again regular, but
> different.
>
> I don't know what's the structure of your macro right now, but unlike my
> first suggestion (in the previous post), this one should be no real
problem
> (I guess). :)
>
> -- 
> light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
> 9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
> 0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
>


Post a reply to this message

From: JWV
Subject: Re: puzzles (again) [202 KB]
Date: 22 Aug 2004 09:51:20
Message: <4128a4d8@news.povray.org>
thanks for the comment. The shapes will be improved, but not today since i'm
suffering from a (huge) hangover :-P.

JWV
"Jellby" <jel### [at] M-yahoocom> wrote in message
news:41285ff4@news.povray.org...
> Among other things, "JWV" <jwv|at|planet.nl> wrote:
>
> >> - Also, some edges could have no "protrusion", just a more wavy shape
> >> than the bare straight edge. ASCII picture:
> >>                              ____
> >>                             /    \
> >>      ____                   \    /
> >>   __/    \__  instead of  __/    \___
> >
> > After staring at, thinking about, and realligning the ascii picture: Yes
> > that would be possible (will try to implement that).
>
> I realized you've already posted the code. I've looked more closely at the
> images and maybe you could find some time to "improve the shapes of the
> pieces. It would take some time and effort, but I believe it may be worth
> it. I include an attachment, because ASCII art is not good enough for this
> ;-)
>
> Note: if/when you use differences and intersections in your code, I guess
it
> would be wise to add "manual" bounding boxes to improve the rendering
> times...
>
> -- 
> light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
> 9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
> 0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
>


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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