The Lambda Lab
/
projects
/
forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added README
[forth.jl.git]
/
examples
/
mandelbrot.4th
diff --git
a/examples/mandelbrot.4th
b/examples/mandelbrot.4th
index
b8195f4
..
1fc6f16
100644
(file)
--- a/
examples/mandelbrot.4th
+++ b/
examples/mandelbrot.4th
@@
-73,12
+73,8
@@
100 value xsteps
30 value ysteps
100 value xsteps
30 value ysteps
-: mandelDomain
- -2 0 >scaled -1 0 >scaled 0 5 >scaled 1 0 >scaled
-;
-
( Draw the Mandelbrot Set!)
( Draw the Mandelbrot Set!)
-: mandel
D
raw ( x1 y1 x2 y2 -- )
+: mandel
d
raw ( x1 y1 x2 y2 -- )
0 pick 3 pick - ysteps /
1 pick 4 pick do
0 pick 3 pick - ysteps /
1 pick 4 pick do
@@
-103,3
+99,11
@@
( Clean up - hide non-standard multiplication def. )
hide *
( Clean up - hide non-standard multiplication def. )
hide *
+
+( Default picture )
+: mandel
+ -2 0 >scaled -1 0 >scaled 0 5 >scaled 1 0 >scaled
+ mandeldraw
+;
+
+." Enter 'mandel' to draw the Mandelbrot Set."