Class SierpinskiTurtle


  • public class SierpinskiTurtle
    extends Turtle
    https://www.clear.rice.edu/comp360/lectures/fall2008/TurtleFractalsL2New.pdf#page=5
    • Constructor Detail

      • SierpinskiTurtle

        public SierpinskiTurtle​(Model model,
                                int n,
                                double length)
        Parameters:
        model - a reference to the Model that this Turtle is builing
        n - number of levels for the Sierpinski triangle
        length - side length
      • SierpinskiTurtle

        public SierpinskiTurtle​(Model model,
                                int n,
                                double length,
                                double xPos,
                                double yPos)
        Parameters:
        model - a reference to the Model that this Turtle is builing
        n - number of levels for the Sierpinski triangle
        length - side length
        xPos - the intial x-coordinate for this Turtle
        yPos - the intial y-coordinate for this Turtle
      • SierpinskiTurtle

        public SierpinskiTurtle​(Model model,
                                int n,
                                double length,
                                double xPos,
                                double yPos,
                                double z)
        Parameters:
        model - a reference to the Model that this Turtle is builing
        n - number of levels for the Sierpinski triangle
        length - side length
        xPos - the intial x-coordinate for this Turtle
        yPos - the intial y-coordinate for this Turtle
        z - the z-plane for this Turtle