Convenience wrappers around recursive.mask.grid.surface.*() using the
classic \(3 \times 3\) carpet mask with the center cell removed.
sierpinski.carpet.surface.embedding(
level = 2,
surface = c("saddle", "paraboloid", "ripple"),
amplitude = 0.75,
freq_u = 1,
freq_v = 1,
x_scale = 1,
y_scale = 1
)sierpinski.carpet.surface.graph(
level = 2,
surface = c("saddle", "paraboloid", "ripple"),
amplitude = 0.75,
freq_u = 1,
freq_v = 1,
x_scale = 1,
y_scale = 1,
normalize = c("median", "mean", "none")
)
sierpinski.carpet.surface.embedding() returns an n x 3 numeric
matrix with columns x, y, and z, where
n = 8^level.
sierpinski.carpet.surface.graph() returns the same components as
recursive.mask.grid.surface.graph(), with family set to
"sierpinski.carpet" and a family-specific class and label.
Recursion depth. Must be at least 1.
Surface family used for the lift. One of "saddle",
"paraboloid", or "ripple".
Finite numeric amplitude controlling the non-flat displacement.
Positive ripple frequency in the horizontal parameter
direction. Used only when surface = "ripple".
Positive ripple frequency in the vertical parameter direction.
Used only when surface = "ripple".
Positive horizontal scaling of the parameter domain.
Positive vertical scaling of the parameter domain.
Normalization applied to the induced edge lengths. One of
"median", "mean", or "none".
`sierpinski.carpet.surface.embedding()` returns the 3D coordinates of the
occupied cells in the same vertex order as edges.sierpinski.carpet().
`sierpinski.carpet.surface.graph()` returns a reusable weighted-graph bundle
for the named Sierpinski carpet family.