Handbook
Glossary
spline-gadget
Vocabulary
math
.
splines
.
viewer
Definition
USING:
ui.gadgets
;
IN:
math.splines.viewer
TUPLE:
spline-gadget
<
gadget
polynomials steps spline-dim
;
Methods
USING:
accessors
arrays
kernel
math
math.order
math.splines.viewer
math.splines.viewer.private
opengl.demo-support
opengl.gl
sequences
ui.render
;
M::
spline-gadget
draw-gadget*
( gadget -- )
0 0 0
glColor3f
gadget
[
polynomials>>
]
[
steps>>
]
bi
eval-polynomials
:>
pts pts
[
first
]
[
max
]
map-reduce
:>
x-max pts
[
first
]
[
min
]
map-reduce
:>
x-min pts
[
second
]
[
max
]
map-reduce
:>
y-max pts
[
second
]
[
min
]
map-reduce
:>
y-min pts
[
[
first
x-min
-
x-max x-min
-
/
gadget
spline-dim>>
first
*
]
[
second
y-min
-
y-max y-min
-
/
gadget
spline-dim>>
second
*
]
bi
2array
]
map
:>
pts
GL_LINE_STRIP
[
pts
[
first2
neg
gadget
spline-dim>>
second
+
glVertex2f
]
each
]
do-state
;
USING:
accessors
math.splines.viewer
ui.gadgets
;
M:
spline-gadget
pref-dim*
spline-dim>>
;