classdef Turtle % TURTLE Turtle with a pen % An implementation of iterative drawings properties % coordinates x y % direction of turtle, in degrees based on unit circle heading % pen status pen_on_paper % wait time (lower the faster) wait % current pen object that turtle is holding pen end methods % Default constructor % Initializes default values, (0, 0) facing --> East function obj = Turtle() % make a new Turtle obj.x = 0; obj.y = 0; obj.heading = 0; obj.pen_on_paper = true; obj.pen = Pen(); obj.wait = 0.25; end end end