1
2
3\environment luametafunstyle
4
5\startcomponent luametafunsurface
6
7\startchapter[title={Surface}]
8
9This is work in progress so only some examples are shown here. Yet to be decided
10is how we deal with axis and such.
11
12In \in {figure} [surface:1] we see an example of a plot with axis as well as
13lines drawn.
14
15\startbuffer[1]
16\startMPcode{doublefun}
17 draw lmt_surface [
18 preamble = "local sin, cos = math.sin, math.cos",
19 code = "sin(x*x) - cos(y*y)"
20 xmin = -3,
21 xmax = 3,
22 ymin = -3,
23 ymax = 3,
24 xvector = { -0.3, -0.3 },
25 height = 5cm,
26 axis = { 40mm, 40mm, 30mm },
27 clipaxis = true,
28 axiscolor = "gray",
29 ] xsized .8TextWidth ;
30\stopMPcode
31\stopbuffer
32
33\typebuffer[1]
34
35\startplacefigure[reference=surface:1]
36 \getbuffer[1]
37\stopplacefigure
38
39In \in {figure} [surface:2] we dont draw the axis and lines. We also use a high
40resolution.
41
42\startbuffer[2]
43\startMPcode{doublefun}
44 draw lmt_surface [
45 preamble = "local sin, cos = math.sin, math.cos",
46 code = "sin(x*x) - cos(y*y)"
47 color = "f, f/2, 1-f"
48 color = "f, f, 0"
49 xstep = .02,
50 ystep = .02,
51 xvector = { -0.4, -0.4 },
52 height = 5cm,
53 lines = false,
54 ] xsized .8TextWidth ;
55\stopMPcode
56\stopbuffer
57
58\typebuffer[2]
59
60\startplacefigure[reference=surface:2]
61 \getbuffer[2]
62\stopplacefigure
63
64The preliminary set of parameters is:
65
66\starttabulate[TTTp]
67\FL
68\BC name \BC type \BC default \BC comment \NC \NR
69\ML
70\NC code \NC string \NC
71\NC color \NC string \NC \type {"f, 0, 0"} \NC \NC \NR
72\NC linecolor \NC numeric \NC \type {1} \NC gray scale \NC \NR
73\NC xmin \NC numeric \NC \type {1} \NC \NC \NR
74\NC xmax \NC numeric \NC \type { 1} \NC \NC \NR
75\NC ymin \NC numeric \NC \type {1} \NC \NC \NR
76\NC ymax \NC numeric \NC \type { 1} \NC \NC \NR
77\NC xstep \NC numeric \NC \type {.1} \NC \NC \NR
78\NC ystep \NC numeric \NC \type {.1} \NC \NC \NR
79\NC snap \NC numeric \NC \type {.01} \NC \NC \NR
80\NC xvector \NC list \NC \type {{ 0.7, 0.7 }} \NC \NC \NR
81\NC yvector \NC list \NC \type {{ 1, 0 }} \NC \NC \NR
82\NC zvector \NC list \NC \type {{ 0, 1 }} \NC \NC \NR
83\NC light \NC list \NC \type {{ 3, 3, 10 }} \NC \NC \NR
84\NC bright \NC numeric \NC \type {100} \NC \NC \NR
85\NC clip \NC boolean \NC \type {false} \NC \NC \NR
86\NC lines \NC boolean \NC \type {true} \NC \NC \NR
87\NC axis \NC list \NC \type {{ }} \NC \NC \NR
88\NC clipaxis \NC boolean \NC \type {false} \NC \NC \NR
89\NC axiscolor \NC string \NC \type {"gray"} \NC \NC \NR
90\NC axislinewidth \NC numeric \NC \type {12} \NC \NC \NR
91\LL
92\stoptabulate
93
94\stopchapter
95
96\stopcomponent
97 |