Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.

Conversation

@danslocombe
Copy link

No description provided.

radiansToDegrees x = (180 * x) / pi

toTPoint :: Point -> T.TPoint
toTPoint = uncurry T.pointAtXY
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same as castpoint.

figuretikz (Arrow (p:ps)) = T.path [T.Draw, T.Arrow] $ foldl (\y x -> y T.->- castpoint x) (T.Start $ castpoint p) ps
figuretikz (Curvy []) = emptytikz
--figuretikz (Curvy (p:ps)) = T.path [T.Draw, T.Smooth] $ foldl (\y x -> y T.->- castpoint x) (T.Start $ castpoint p) ps
figuretikz (Curvy (ps)) = T.Curvy (toTPoint <$> ps)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parenthesis in (ps) are not needed.

@Daniel-Diaz
Copy link
Owner

Thanks for working on this! Would you please add an example?

data Figure =
Line [Point] -- ^ Line along a list of points.
| Arrow [Point] -- ^ Line along a list of points with an arrowhead .
| Curvy [Point]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You explain Arrow, but not Curvy.

@Daniel-Diaz
Copy link
Owner

I have added some comments as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants