Copyright | (c) 2017 Jeffrey Rosenbluth |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | jeffrey.rosenbluth@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Tools for creating symmtery images using the domain coloring algortihm.
- domainColoring :: (RealFloat a, Pixel p, BlackWhite p) => Options a -> Recipe a -> ColorSource a p -> Image p
- blend :: (RealFloat a, Pixel p, BlackWhite p) => Options a -> Recipe a -> Recipe a -> ColorSource a p -> Image p
- morph :: (RealFloat a, Pixel p, BlackWhite p) => Options a -> Recipe a -> a -> ColorSource a p -> Image p
- mkRecipe :: RealFloat a => (Int -> Int -> Recipe a) -> [Coef a] -> Recipe a
- negateCoefs :: Coef a -> Coef a
- negateFst :: Coef a -> Coef a
- negateSnd :: Coef a -> Coef a
- reverseCoefs :: Coef a -> Coef a
- alternateCoefs :: RealFloat a => (Int -> Int -> a) -> Coef a -> Coef a
Domain Coloring
domainColoring :: (RealFloat a, Pixel p, BlackWhite p) => Options a -> Recipe a -> ColorSource a p -> Image p Source #
blend :: (RealFloat a, Pixel p, BlackWhite p) => Options a -> Recipe a -> Recipe a -> ColorSource a p -> Image p Source #
Make a symmetry image from two Recipe
s by linearly interpolation.
The interpolation is along the horizontal axis.
morph :: (RealFloat a, Pixel p, BlackWhite p) => Options a -> Recipe a -> a -> ColorSource a p -> Image p Source #
Make a symmetry image by interpolating between a color wheel and its 180
degree rotation. The cutoff represents what percentage of the
image stays constant at the left and right sides. Like blend
the
interpolation is in the horizontal direction.
mkRecipe :: RealFloat a => (Int -> Int -> Recipe a) -> [Coef a] -> Recipe a Source #
Make a recipe from a lattice and a list of Coefficients.
Coefficients
negateCoefs :: Coef a -> Coef a Source #
Negate the indices of a coefficient.
reverseCoefs :: Coef a -> Coef a Source #
Reverse the indices of a coefficient.
alternateCoefs :: RealFloat a => (Int -> Int -> a) -> Coef a -> Coef a Source #
Multiply a coefficient by a function of its indices, usually used
to change the sign of a coefficient based on its indices.
Does not commute with negate or reverse, usually you want to apply
alternateCoefs
first.