Skip to content

Commit bc7c69f

Browse files
authored
Create README.md
1 parent 37bbfed commit bc7c69f

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

  • recipes/Python/Draw Sine Function in PDF
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Created on 2017-08-17
2+
3+
@author: (c) 2017, Jorj X. McKie
4+
5+
License: GNU GPL V3
6+
7+
PyMuPDF Demo Program
8+
---------------------
9+
Create a PDF with drawings of the sine and cosine functions using PyMuPDF.
10+
Depending on how start and end points are located with respect to each
11+
other, horizontal or vertical drawings result.
12+
The vertical case can obviously be used for creating inverse function
13+
(arcus sine / cosine) graphs.
14+
15+
The function graphs are pieced together in 90 degree parts, for which Bezier
16+
curves are used.
17+
18+
Note that the 'alfa' and 'beta' constants represent values for use as
19+
Bezier control points like so:
20+
x-values (written in degrees): [0, 30, 60, 90]
21+
corresponding y-values: [0, alfa, beta, 1]
22+
23+
These values have been calculated by the `scipy.interpolate.splrep()` method.
24+
They provide an excellent spline approximation of the sine / cosine
25+
functions - please look at SciPy documentation for background.
26+

0 commit comments

Comments
 (0)