|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Among other things, "JWV" <jwv|at|planet.nl> wrote:
> 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, I had only a quick look to your macro, but it seemed to me that you
create some sort of array which defines, for example, whether each
horizontal lob would be a right- or left-lob. So, if the puzzle is 5 pieces
wide, there are 4 horizontal lobs (in each row) and you define a random
4-element array like:
[1 1 -1 1] (or maybe diffent numbers instead of 1 and -1)
This meaning that the first, second and fourth lobs are directed to the
right and the third is directed to the left. Then, looking at this array
you create each piece by adding an out-lob or an in-lob. Maybe I'm a long
way off, but it occurred to me that this would be a possible way, and the
code looked like it could be like that.
*If* that's the way you do that, then I think it's easy to do what I
propose. Instead of creating a random array, create an alternating one [1
-1 1 -1] (and [-1 1 -1 1] for the 2nd row, etc.) and then invert each
element with a certain probability (given by the "density of defects"
parameter). Afterwards, just create the pieces as before.
As I said, this holds if the macro works the way I believe it does.
Otherwise, forget what I said :)
--
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Jelby,
You are (completely!) correct about the way the macro works, and the
suggestion you give to make the "density of defects" work could even work
very well. But i'm not going to do it that way since I am having another
plan which i want to test. This time the code is actualy going to do some
puzzling :-) (i hope).
Greetings,
JWV
"Jellby" <jel### [at] M-yahoocom> wrote in message
news:4129f4b4@news.povray.org...
> Among other things, "JWV" <jwv|at|planet.nl> wrote:
>
> > 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, I had only a quick look to your macro, but it seemed to me that you
> create some sort of array which defines, for example, whether each
> horizontal lob would be a right- or left-lob. So, if the puzzle is 5
pieces
> wide, there are 4 horizontal lobs (in each row) and you define a random
> 4-element array like:
> [1 1 -1 1] (or maybe diffent numbers instead of 1 and -1)
> This meaning that the first, second and fourth lobs are directed to the
> right and the third is directed to the left. Then, looking at this array
> you create each piece by adding an out-lob or an in-lob. Maybe I'm a long
> way off, but it occurred to me that this would be a possible way, and the
> code looked like it could be like that.
>
> *If* that's the way you do that, then I think it's easy to do what I
> propose. Instead of creating a random array, create an alternating one [1
> -1 1 -1] (and [-1 1 -1 1] for the 2nd row, etc.) and then invert each
> element with a certain probability (given by the "density of defects"
> parameter). Afterwards, just create the pieces as before.
>
> As I said, this holds if the macro works the way I believe it does.
> Otherwise, forget what I said :)
>
> --
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Among other things, "JWV" <jwv|at|planet.nl> wrote:
> You are (completely!) correct about the way the macro works, and the
> suggestion you give to make the "density of defects" work could even work
> very well. But i'm not going to do it that way since I am having another
> plan which i want to test. This time the code is actualy going to do some
> puzzling :-) (i hope).
It's always good to have thing progress ;-)
By the way, does your macro (current or future) allow for "undone" puzzles?
I'm thinking of having a real puzzle, with some nice picture and the pieces
spread and shuffled all around the place...
--
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
|
|
| |
| |
|
|
|
|
| |
|
|