Fractusist v0.3.2 -- New graphics of Penrose tiling💠

Hi everyone!

The new release of fractusist v0.3.2 comes with the famous Penrose tiling. Examples of the three types of tiling are given below.

The first one is the original pentagonal Penrose tiling (P1):

Codes for P1
#import "@preview/fractusist:0.3.2": *

#set page(width: auto, height: auto, margin: 0pt)

#{
  box(width: 800pt, height: 800pt, clip: true,
    place(dx: -413pt, dy: -282pt,
      penrose-1(
        v-ini: (p1-a-pentagon(none, (-650, 0), (650, 0)),),
        n: 4,
        fill-a-pentagon: rgb("#8886C2"),
        fill-b-pentagon: rgb("#8886C2").lighten(15%),
        fill-c-pentagon: rgb("#8886C2").lighten(30%),
        fill-diamond: rgb("#192836"),
        fill-boat: rgb("#192836"),
        fill-star: rgb("#192836"),
        stroke-edge: stroke(paint: rgb("#796B36"), thickness: 2pt, cap: "round", join: "round"),
        padding: 10
      )
    )
  )
}

And the second one is the kite and dart tiling (P2):

Codes for P2
#import "@preview/fractusist:0.3.2": *

#set page(width: auto, height: auto, margin: 0pt)

#{
  let unit-size = 600
  let v-ini = ()
  for k in range(5) {
    let thetad = 2/5 * k * calc.pi
    let t-a = p2-a-triangle(none, (0, 0), (unit-size*calc.cos(thetad), unit-size*calc.sin(thetad)))
    let t-ap = p2-ap-triangle(t-a.at(1), none, (0, 0))
    v-ini.push(t-a)
    v-ini.push(t-ap)
  }

  box(width: 800pt, height: 800pt, clip: true,
    place(dx: -210pt, dy: -180pt,
      penrose-2(
        v-ini: v-ini,
        n: 6,
        fill-a: gradient.radial(blue, blue.darken(30%)),
        fill-b: gradient.radial(red, red.darken(30%)),
        stroke-edge: stroke(paint: gradient.radial(luma(70%), luma(40%)), thickness: 2pt, cap: "round", join: "round"),
        stroke-arc1: stroke(paint: gradient.radial(yellow.lighten(50%), yellow.lighten(20%)), thickness: 1pt, cap: "round", join: "round"),
        stroke-arc2: stroke(paint: gradient.radial(yellow.lighten(50%), yellow.lighten(20%)), thickness: 3pt, cap: "round", join: "round"),
        padding: 10
      )
    )
  )
}

The last one is the rhombus tiling (P3):

Codes for P3
#import "@preview/fractusist:0.3.2": *

#set page(width: auto, height: auto, margin: 0pt)

#{
  let unit-size = 600
  let v-ini = ()
  for k in range(5) {
    let thetad = 2/5 * k * calc.pi
    let t-a = p3-a-triangle((0, 0), (unit-size*calc.cos(thetad), unit-size*calc.sin(thetad)), none)
    let t-ap = p3-ap-triangle((0, 0), t-a.at(3), none)
    v-ini.push(t-a)
    v-ini.push(t-ap)
  }

  box(width: 800pt, height: 800pt, clip: true,
    place(dx: -210pt, dy: -181pt,
      penrose-3(
        v-ini: v-ini,
        n: 6,
        fill-a: gradient.radial(blue, blue.darken(30%)),
        fill-b: gradient.radial(red, red.darken(30%)),
        stroke-edge: stroke(paint: gradient.radial(luma(70%), luma(40%)), thickness: 2pt, cap: "round", join: "round"),
        stroke-arc1: stroke(paint: gradient.radial(yellow.lighten(50%), yellow.lighten(20%)), thickness: 1pt, cap: "round", join: "round"),
        stroke-arc2: stroke(paint: gradient.radial(yellow.lighten(50%), yellow.lighten(20%)), thickness: 3pt, cap: "round", join: "round"),
        padding: 10
      )
    )
  )
}

BTW, a wonderful website Animated Penrose tiling presents the structure and characteristics of the Penrose tiling in animated form. It is recommended to watch if you are interested in it.

13 Likes