  Quasicrystal (QC) possesses a unique lattice structure with rotational
symmetry forbidden in conventional crystals. The electric property is far from
complete understanding and it has been a long-standing issue whether the
magnetic long-range order is realized in the QC. The main difficulty was lack
of microscopic theory to analyze the effect of the crystalline electric field
(CEF) at the rare-earth atom in QCs. Here we show the full microscopic analysis
of the CEF in Tb-based QCs. We find that magnetic anisotropy arising from the
CEF plays a key role in realizing unique magnetic textures on the icosahedron
whose vertices Tb atoms are located at. Our analysis suggests that the
long-range order of the hedgehog characterized by the topological charge of one
is stabilized in the Tb-based QC. We also find that the whirling-moment state
is characterized by unusually large topological charge of three. The magnetic
textures as well as the topological states are shown to be switched by
controlling compositions of the non-rare-earth elements in the ternary
compounds. Our model is useful to understand the magnetism as well as the
topological property in the rare-earth-based QCs and approximant crystals.
