My haskell project. You can draw gifferent function to SVG-file
First you need Haskell Stack.
Clone this repo and run stack build
the created folder.
You can find the application in .\graphics\.stack-work\dist\d53b6a14\build\Graphics-exe
Run ./Graphics-exe.exe "FUNCTION"
(for example, ./Graphics-exe.exe "Add X (Sin X)"
). SVG-file will be created in the same folder where the program was launched from.
Building a function:
- Num 14 - a number
- X - an argument
- Add/Sub/Mul/Div ( Expr ) ( Expr )
- Pow ( Expr ) ( Expr ) - Expr^Expr
- Sin/Cos/Tan ( Expr )
Example: Mul ( Sin ( Pow X ( Num 2 ) ) ) ( Add ( Cos X ) ( Div ( Sin X ) X ) ) - sin(X^2) * (cosX + sinX / X)
--xstart ARG
Set x-start of the window in pixels (default: 40)--ystart ARG
Set y-start of the window in pixels (default: 40)--width ARG
Set width of the window in pixels (default: 1455)--height ARG
Set height of the window in pixels (default: 650)-s
--segment ARG
Set a single segment of the graph in pixels (default: 44, almost 1cm)-x
--xoffset ARG
Set xoffset relative to the origin (shift by one segment)-y
--yoffset ARG
Set yoffset relative to the origin (shift by one segment)