Skip to contents

The strokes are the leaves of the kanjivec stroketree. They consist of a two-column matrix giving a discretized path for the stroke in the unit square \([0,1]^2\) with further attributes.

Usage

get_strokes_compo(kvec, which = c(1, 1))

Arguments

kvec

an object of class kanjivec

which

a vector of length 2 specifing the index of the component, i.e. the component used is pluck(kvec$components, !!!which). The default c(1,1) refers to the root component (full kanji), so all strokes are returned.

Value

A list of strokes with attributes.

See also

Examples

kanji <- fivebetas[[5]]
# get the three strokes of the component⻖ in 陣
rad <- get_strokes_compo(kanji, c(2,1))    
plot(0.5, 0.5, xlim=c(0,1), ylim=c(0,1), type="n", asp=1, xaxs="i", yaxs="i", xlab="", ylab="")
invisible(lapply(rad, lines, lwd=4))