POV-Ray : Newsgroups : povray.binaries.images : Penrose Tile Macros Server Time
4 May 2024 00:51:43 EDT (-0400)
  Penrose Tile Macros (Message 2 to 11 of 11)  
<<< Previous 1 Messages Goto Initial 10 Messages
From: Jon Buller
Subject: Re: Penrose Tile Macros
Date: 22 Jun 2006 15:25:01
Message: <web.449aeddb6376349e48362b170@news.povray.org>
And after seeing the last post, I'll attach the scene file and the macro
file from the last message in p.b.s-f.  And I'll look into why Outlook
Express (evil that it is) will grab messages from news.povray.org, but
won't get the attachements or allow me to post...  Maybe it's the IT dept
and their firewalls.

Anyway, here's the image with Kites, Darts, standard curves, and Ammon Bars.


Post a reply to this message


Attachments:
Download 'penrose1.png' (624 KB)

Preview of image 'penrose1.png'
penrose1.png


 

From: Jon Buller
Subject: Re: Penrose Tile Macros
Date: 22 Jun 2006 15:35:01
Message: <web.449af0956376349e48362b170@news.povray.org>
This image has just the curves in kite and dart tiles, but they have been
offset a bit.


Post a reply to this message


Attachments:
Download 'penrose2.png' (385 KB)

Preview of image 'penrose2.png'
penrose2.png


 

From: Jon Buller
Subject: Re: Penrose Tile Macros
Date: 22 Jun 2006 15:40:00
Message: <web.449af1ff6376349e48362b170@news.povray.org>
This image has one level of Kites and Darts colored in, and the next level
outlined in white cylinders.  The colored balls are used to force the
proper tiling patterns (instead of the curves in the last image).


Post a reply to this message


Attachments:
Download 'penrose3.png' (326 KB)

Preview of image 'penrose3.png'
penrose3.png


 

From: Janet
Subject: Re: Penrose Tile Macros
Date: 23 Jun 2006 00:40:01
Message: <web.449b6fe96376349e9656733b0@news.povray.org>
Wow! Thanks! This looks wonderful. I love the ones with the curved torus
shapes - the "Conway lines"?? I will play. Its like having a new toy. It
looks really clean too :)


Post a reply to this message

From: Jon Buller
Subject: Re: Penrose Tile Macros
Date: 23 Jun 2006 02:15:01
Message: <web.449b85666376349e2ff3aa640@news.povray.org>
"Janet" <par### [at] attnet> wrote:
> Wow! Thanks! This looks wonderful. I love the ones with the curved torus
> shapes - the "Conway lines"?? I will play. Its like having a new toy. It
> looks really clean too :)

Thanks, let me know how the playing goes.  I like the curves too.  Take a
look
at "Pathways" in the 2004 POVcomp.  That kind of image is why I did this.
Now if I only had the artistic eye and talent to get the rest of the way
there!  (Computer Science majors aren't always known for their artistic
abilities. 8^)

The next thing I plan to add is a group of objects to do with edges what the
existing macros do with vertices.  That is, all the ways you can put two
tiles together on a single edge, instead of all the ways you can put tiles
around a single point.  I think that set might help if someone wants to
create a new curve through the tiling.


Post a reply to this message

From: Jellby
Subject: Re: Penrose Tile Macros
Date: 24 Jun 2006 04:47:49
Message: <tv6vm3-ud3.ln1@badulaque.unex.es>
Among other things, Jon Buller saw fit to write:

> Anyway, here's the image with Kites, Darts, standard curves, and Ammon
> Bars.

Magnificent!

Are the bars/lines supposed to be straight? They don't look so...

-- 
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: Jon Buller
Subject: Re: Penrose Tile Macros
Date: 25 Jun 2006 18:35:00
Message: <web.449f0d666376349e2ff3aa640@news.povray.org>
Jellby <me### [at] privacynet> wrote:
> Among other things, Jon Buller saw fit to write:
>
> > Anyway, here's the image with Kites, Darts, standard curves, and Ammon
> > Bars.
>
> Magnificent!

Thank you.

> Are the bars/lines supposed to be straight? They don't look so...

Yes, the blue bars/lines are supposed to be straight, but taking a closer
look, I see the pixeled edges change spacing a bit from one spot to another.
A sure sign that the slope of the line is changing slightly.  Must be either
floating point round off error, or the points where the bars intersect the
tile edges weren't described accurately in the source I coded them from.

Jon

P.S. I found a reference to doing penrose tiling with a pair of triangles.
4 triangles make a "Kite" two make a "Dart", and the two types each pair up
to make the two different Rhombs.  The advantage of this new way is that
when the triangles "inflate", the new parts don't overlap, so duplicate
checking doesn't need to be done.  (Or simple code doesn't generate multiple
copies of the same object.)  The disadvantage is that I am not sure if it is
easy/possible to tell which triangles belong to which Kite, Dart, or Rhomb
without looking at the triangle's neighbors.  I'll play with it some more
and see if I can figure it out.


Post a reply to this message

From: PM 2Ring
Subject: Re: Penrose Tile Macros
Date: 26 Jun 2006 09:00:01
Message: <web.449fd9596376349e1bd1c060@news.povray.org>
"Jon Buller" <jon### [at] bullersnet> wrote:

Nice work, Jon. And the code is relatively easy to read, too.

> P.S. I found a reference to doing penrose tiling with a pair of triangles.
> 4 triangles make a "Kite" two make a "Dart", and the two types each pair up
> to make the two different Rhombs.  The advantage of this new way is that
> when the triangles "inflate", the new parts don't overlap, so duplicate
> checking doesn't need to be done.  (Or simple code doesn't generate multiple
> copies of the same object.)

The Penrose macros posted my John Van Sickle & myself don't generate
duplicates... I hope! :) These macros operate on the golden isoceles
triangles, rather than on darts & kites, etc.

> The disadvantage is that I am not sure if it is
> easy/possible to tell which triangles belong to which Kite, Dart, or Rhomb
> without looking at the triangle's neighbors.  I'll play with it some more
> and see if I can figure it out.

Good luck! I think you will need to examine neighbours.


Post a reply to this message

From: Jon Buller
Subject: Re: Penrose Tile Macros
Date: 27 Jun 2006 03:05:01
Message: <web.44a0d3916376349e2ff3aa640@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:
> "Jon Buller" <jon### [at] bullersnet> wrote:
>
> > The disadvantage is that I am not sure if it is
> > easy/possible to tell which triangles belong to which Kite, Dart, or Rhomb
> > without looking at the triangle's neighbors.  I'll play with it some more
> > and see if I can figure it out.
>
> Good luck! I think you will need to examine neighbours.

OK, I now see that doing Rhomb tiling is simple without any duplicate
detection. (That is, the inflation doesn't overlap it's neighbors, and it
works without using that init_inflate macro and friends.)

Consider this:

#macro tri (pos, ang, typ, level)
  #if (level < 1)
    PENROSE_triangle (pos, ang, typ)
  #else
    #if (abs(typ) = 18)
      tri (phi * (pos + vrotate (x, (ang - typ) * y)),
           ang + typ * 6, typ,     level - 1)
      tri (phi *  pos + vrotate (x, (ang + typ) * y),
           ang - typ * 6, typ * 3, level - 1)
    #else
      #local new = phi * pos + (phi - 1) * vrotate (x, (ang + typ) * y);
      tri (new, ang,             -typ,     level - 1)
      #local new = new + vrotate (x, (ang - typ) * y);
      tri (new, ang - typ * 8/3,  typ,     level - 1)
      tri (new, ang + typ * 8/3, -typ / 3, level - 1)
    #end
  #end
#end

Call this as the others, pos and ang are the location and orientation of the
triangle, level is how many inflate operations to do.  That typ parameter is
the size and orientation of the triangle.  It takes values of -54, -18, 18,
and 54.  To draw a triangle, draw unit length edges from pos in the
direction of ang + typ and ang - typ (and connect those two points for the
final edge).

It is simple to draw the triangles themselves.  But notice that if you draw
each edge (I'll call them +, -, and o) in a different color, all the
triangles have the same edge type for a shared edge.  Since a Rhomb is just
two 54 triangles that share an "o" edge, and any triangle with an "o" edge
has the neighbor of that edge that is also an "o" edge.  The other
interesting thing is that the other triangle is the negative type of its
neighbor.  So to draw rhombs instead of triangles, just ignore the negative
type triangles(-54 & -18), and treat the +54 triangles as rhombs that have
points of pos, pos+, pos-, and pos+-  (add the + and - direction vectors
together for pos+-)

Starting with a +54 triangle and a -54 triangle sharing "o" edges, and using
the rhomb generation macros from before with all the decorations on, you get
the attached image.  Note that the tri macro does not need that huge array
of true/false values to tell if it has already generated a tile at a
specific location or not, but can still generate a rhomb tiling without any
duplicate objects.

I still haven't figured out how to do Kites & Darts yet, but I think it
might be possible.  In fact, I think it's more possible now than I did when
I wrote that last message.


Post a reply to this message


Attachments:
Download 'penrose.png' (183 KB)

Preview of image 'penrose.png'
penrose.png


 

From: Jon Buller
Subject: Re: Penrose Tile Macros
Date: 27 Jun 2006 12:05:00
Message: <web.44a156c36376349e48362b170@news.povray.org>
In a sort of follow-up to that last message, here is the exact same image,
but hooked up to a triangle drawing macro instead of a rhomb drawing macro.
 (And zoomed in a bit so the edges are more clearly visible.)  This image
will probably show what I was trying to say about triangle edge lining up
better than the description.  Red edges are generated with

"cylinder { pos, pos + vrotate (x, (ang + typ) *y) / 3, 1/20 }"

Green edges are the same but at ang-typ, and the blue edges are from ang+typ
to one third of the way toward ang-typ.  Notice how every edge has only a
single color.  The fact that any blue edge for one triangle is also blue
for the other triangle sharing that edge is why the rhomb drawing works as
described in the last message.

In case you are curious, the yellow curve is a set of torus sections
centered at pos, radius 1/2, connecting the red and green edges.  torus
sections connecting the green and blue edges also make large curves, but
ones connecting the red and blue edges just make circles around a single
vertex.

Jon


Post a reply to this message


Attachments:
Download 'penrose.png' (262 KB)

Preview of image 'penrose.png'
penrose.png


 

<<< Previous 1 Messages Goto Initial 10 Messages

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