*0.4π if you work in radians*) to get the pentagon.

` 1 `**startshape **pentagon
2 **background** {**b** 0.8 **h** 60 **sat** 0.5**}**
3 **rule** pentagon{
4 5 ***** { **r** 72 **}**
5 **TRIANGLE** {**h** 220 **sat** 0.8 **b** .8 **r** 180 **s** .57 **y** .23 **a** **-**.5 **}**
6 **}**

**
**

Just messing and moving toward a pentaflake gave this set of rules:-

` 1 `**startshape **pentaflake
2 **background** {**b** 0.8 **h** 60 **sat** 0.8**}**
3
4 **rule** pentaflake{
5 5 ***** { **r** 72 **}**
6 pentagon {**sat** 0.5 **b** .5 **r** 180 **s** .447 **y** .23 **a** **-**.5**}**
7 **}**
8
9 **rule** pentagon{
10 5 ***** { **r** 72 **}**
11 **TRIANGLE** {**h** 220 **sat** 0.08 **b** .08 **r** 180 **s** .57 **y** .23**}**
12 **}**

And here is the result:-

Getting closer without recursion (yet):-

` 1 `**startshape **pentaflake
2 **background** {**b** 0.8 **h** 60 **sat** 0.8**}**
3
4 **rule** pentaflake{
5 5 ***** { **r** 72 **}**
6 pentabase {**sat** 0.5 **b** .5 **s** .447 **y** .41**}**
7 **}**
8
9 **rule** pentabase{
10 5 ***** { **r** 72 **}**
11 pentagon {**sat** 0.5 **b** .5 **r** 180 **s** .447 **y** .35**}**
12 **}**
13
14 **rule** pentagon{
15 5 ***** { **r** 72 **}**
16 **TRIANGLE** {**h** 220 **sat** 0.08 **b** .08 **r** 180 **s** .57 **y** .23**}**
17 **}**

Looking more like it:-

Add a bit of recursion and serendipity is best:-

` 1 `**startshape **pentaflake
2 **background** {**b** **-**1**}**
3
4 **rule** pentaflake{
5 pentagon {**}**
6 5 ***** { **r** 72 **}** pentaflake { **b** .8 **s** .447 **y** .41 **r** 72 **a** **-**.5**}**
7 **}**
8
9 **rule** pentagon{
10 5 ***** { **r** 72 **}**
11 **TRIANGLE** {**r** 180 **s** .57 **y** .23 **}**
12 **}**

WoW well thats what I thought:-

Finally using a simpler pentagon we get something like a snowflake, well at least a fractal like recursive structure.

```
1:startshape pentaflake
2:background {b -1}
3:
4:rule pentaflake{
5: pentagon {b .01}
6: 5 * { r 72 } pentaflake { b .9 s .38 y .65 r 72 }
7: }
8:
9:path pentagon{
10:MOVETO{x 0 y 1}
11:LINETO{x (-.25*sqrt(10 + (2*sqrt(5)))) y (.25*(sqrt(5) - 1))}
12:LINETO{x (-.25*sqrt(10 - (2*sqrt(5)))) y (-.25*(sqrt(5) + 1))}
13:LINETO{x (.25*sqrt(10 - (2*sqrt(5)))) y (-.25*(sqrt(5) + 1))}
14:LINETO{x (.25 * sqrt(10 + (2 * sqrt(5)))) y (.25 * (sqrt(5) - 1))}
15:CLOSEPOLY{}
16:STROKE{b 0.1}
17:}
```

That's really good! Looks like the sign on the front of our car.

ReplyDeleteJust take a look at what followed (I've got a habit of blogging whilst I'm still experimenting, only keeping the best bits on line).

ReplyDelete