Class JuliaTransform

java.lang.Object
edu.ntnu.stud.chaosgame.model.transformations.Transform2D
edu.ntnu.stud.chaosgame.model.transformations.JuliaTransform

public class JuliaTransform extends Transform2D
Represents Julia transformations in a 2D-plane by extending the abstract class Transform2D Transform2D.
  • Field Details

    • c1

      private final Complex c1
      The complex number represented through Complex Complex which is added or subtracted in the Julia transformations.
    • sign

      int sign
      The sign used to determine if the Julia transformations adds or subtracts Complex c1.
  • Constructor Details

    • JuliaTransform

      public JuliaTransform(Complex point, int sign)
      Constructs a JuliaTransform object defined by the input.
      Parameters:
      point - The complex number Complex which is added or subtracted in the transformation.
      sign - An integer which determines if c1 is added or subtracted in the transformation.
  • Method Details

    • transform

      public Vector2D transform(Vector2D point)
      Performs a Julia-transformation on a point defined by the vector point. The transformation will add or subtract c1 relative to point. This depends on the sign of the integer sign. Then the method performs the sqrt method from Complex Complex.
      Specified by:
      transform in class Transform2D
      Parameters:
      point - The vector Vector2D which transformations are performed on.
      Returns:
      The transformed point, represented by a vector Vector2D
    • getC1

      public Complex getC1()
      Getter method to use with ChaosGameFileHandler.
      Returns:
      The complex number used in the transformation.