The first version of Newt (Newt 1.0 in Oct 93) was a turtle-graphics
environment. "Newton Turtle" and "NewtTurtle" seemed a bit too long, so I
shortened its name to Newt, given its amphibious similarity to its Logo
cousin and also its non-turtle uses. For exploration of Newt's "turtle
personality", familiarity with Logo concepts and turtles would be useful
though not necessary. Although Newt does not "understand" any of the Logo
dialects directly, it does provide turtle commands, and an optional module
for manipulating Logo-style data structures, i.e., words and sentences.
Despite syntactic differences between NewtonScript and Logo, you can borrow
ideas and translate code from Logo materials and books, e.g., Abelson &
diSessa, books on fractals, etc.
Exploring Newt's Turtle Personality
First, install the NewtDraw plug-in, and then start Newt.
See general user interface information.
Try the following (also see the NewtTurT interactive tutorial):
- select the folder at top of screen containing your sources. Newt
compiles/checks any methods and object definitions (if there are problems
listed, see Errors).
- tap the overview dot (between two scroll arrows in bottom menu)
- select Newt Drawing; then select Newt Controls.
- write a number into the input field to the right of Dist, e.g., 80. tap Dist.
- write a number into the input field to the right of Deg, e.g., 90. tap Deg.
- write a (small) number, e.g., 4, into the input field to the right of Times.
- tap Times.
- tap Newt? checkbox to hide Newt(s) for faster drawing. tap it again to show.
- tap Erase. tap Home.
- tap Expr button (in Eval Controls) and select different expressions (defined from
graphic0.nwt); you may wish to Erase, Home between each.
- edit values for times, dist, deg (if these are used as parameters)
- tap Eval button (in Eval Controls).
- draw a picture that you like, tap Save (later check current folder in Notepad).
- drag Newt to another location and Eval an expression again.
- select and Eval the :addNewt expression from the Expr list. This creates
- select and Eval another expression like :squiral(8,40) -- this demonstrates
broadcasting messages to multiple Newts. The Erase and Home buttons work on
all Newts together, or you can use gestures on a specific newt, e.g., scrub,
or messages, e.g., the newt1 expression.
- (optional) close Newt Drawing and Newt Controls
This quick tour should give you a basic idea of some of Newt's capabilities.
Although there is a more information in this file describing Newt's interface,
there is almost none regarding NewtonScript syntax or Newt's methods. If you
would like real documentation and many more examples, register!
Newt's drawing area appears when you select it from overview, use Newt
Controls, or evaluate an expression using drawing methods. You can use the
following gestures to operate on the Newt closest to the start of the gesture
(if you have multiple Newts).
- Newt moves to location of pen using current Pen setting, preserving heading.
- Newt sets heading to orientation (mod 45 degrees) of line. If Newt is already
headed in that direction, it draws a line of same length (rounded to mod 10)
of your gesture.
- same as Erase
- Hold down on a Newt until you "hear a squeak and get a fat pen" (actually the
"hilite" gesture). Then, drag to a new location before lifting pen. Newt moves
to new location without drawing.
Use the Save button in Eval Controls to save
the current drawing in the Notepad under the current folder tab category.
Newt currently "remembers" the current drawing when you close and
re-enter Newt Drawing.
Select this floating, draggable palette via overview. It is located initially at
the top of Newt Drawing. and contains the following controls: Erase, Home,
Pen, Color, Newt?, Times button & field, Dist button & field, Deg button &
field. Like keyboards and Eval Controls, it can be dragged by its bottom border.
- The value in this field (default: 0) can be used as a times variable in the
Eval field. The Times button uses this value to create an iteration, e.g., if
Times=4, Dist=40, Deg=90, tapping on Times tells Newt to :go(40) then
:turn(90) 4 times, i.e., making a square -- the NewtonScript is written to the
Eval field where it is executed immediately (and you can edit it later if you
like). Tap Deg to turn, then tap Times or the Eval button again to see what
- The value in this field (default: 0) can be used as a dist variable in the Eval
field. The Dist button uses this value for distance, e.g., if Dist=20, tapping
on Dist tells Newt to :go(20), moving 20 in the "forward" direction, i.e.,
along Newt's current heading. This draws a line if Pen is non-zero. A negative
value for dist just means go "backward". To give you some idea of scale,
Newt's default drawing area on MessagePad is roughly 228x310 (on a MP100).
Newt clips at its drawing boundary.
- The value in this field (default: 0) can be used as a deg variable in the Eval
field. The Deg button uses this value for degrees, e.g., if Deg=90, tapping on
Deg tells Newt to :turn(90), turning right (clockwise) by 90 degrees. A
negative value just means turn left. Newt will "mod" your number to prevent
- Newt erases drawing area, and remains with same position, heading and pen.
- Newt teleports to center, sets heading to 0 ("up"), preserving
pen setting but without drawing.
- Newt sets pen thickness used in drawing (default: 1) and grows or shrinks in
size. 0 means Newt just moves (no line)
- Newt sets pen pattern used in drawing (default: black). Currently, this color
is not available in saved Notepad drawings (everything is black).
- If checked (default: yes), Newt appears with its tip at current x,y position,
pointing in current direction, and "xor-ed" so that it does not interfere with
- (for NOS 2.0 only): do you want to refresh the screen after every line? (more up to date, but slower)