-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscam.scm
62 lines (49 loc) · 1.6 KB
/
scam.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
(library (scam)
(export
; list manipulation routines
append-reverse list->vector* list-permute take
; functional tools
comp juxt first second third flip reverse-args
partial partial* id <- $ args
; mapping, folding, unfolding
reduce ; reducing
unfoldr unfoldl repeat
cross-map flat-map flat-cross-map ; generating
any all ; predicates
; numeric
range lin-space indices sqr
; easy printing
print
; streams
lazy head tail list->lazy lazy->list lazy-map lazy-filter
lazy-find-first vector->lazy
; vectors
:. :> a-dot a-add a-translate a-scale
; polygons
make-plane segment-add-material point->vertex
make-polygon polygon-add-material polygons-boundary
; parametric
parametric-closed-quad-mesh parametric-open-quad-mesh
parametric-closed-triangle-mesh parametric-open-triangle-mesh
; render
make-pdf-renderer make-svg-renderer make-image-renderer
make-material-fill make-material-linefill make-material-line
make-material-fill-fn make-material-linefill-fn make-material-line-fn
render-scale render-translate render-scene render-finish render-do
render-save-png
; geometry
polygon-o-plane clip-by-plane
; camera
camera-transform parallel-projection weak-perspective-projection
; colour
make-colour colour-rgb-gradient colour-hsv-gradient colour-add colour-desaturise)
(import (rnrs (6))
(scam lib)
(scam vectors)
(scam polygons)
(scam parametric)
(scam render)
(scam geometry)
(scam camera)
(scam colour))
)