Random Koch Curve

Random Koch Curve preview image

1 collaborator

Default-person Miloš Adamović (Author)

Tags

fractals 

Tagged by Miloš Adamović almost 10 years ago

koch curve 

Tagged by Miloš Adamović almost 10 years ago

random 

Tagged by Miloš Adamović almost 10 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 5.2.0 • Viewed 681 times • Downloaded 42 times • Run 0 times
Download the 'Random Koch Curve' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This is a model that is based on the Koch curve model in NetLogo Models library, but it has added some randomness to it.

HOW IT WORKS

The rule that generates the fractal is shown below.

________________________ Step 0: "Initiator"

Next step is dependent on randomness. Suppose we flip a coin and if it is heads we iterate like this:

             /\
            /  \
           /    \
          /      \
  _______/        \_______     Step 1: "Generator (heads)"

but if it is tails we get iteration to follow this picture:

  _______          _______     
         \        /
          \      /
           \    /
             \  /
                   \/     Step 1: "Generator (tails)"

and for every iteration one of generators is used.

HOW TO USE IT

Click on the setup button to generate initiator, then press the step button to iterate once. You can check number of turtles in monitor bar.

THINGS TO NOTICE

This model, based on the original Koch Curve NetLogo model, with the feature of random choice can produce fractals that may be used in interpreting some of nature occurring fractals. Fractals produced using this model can look like coastal line shapes, etc.

AUTHORSHIP

The original framework was designed by Uri Wilensky (see credits below) with some extensions made by Miloš Adamović. Uri Wilensky's model Koch Curve acted as a basis for this model.

RELATED MODELS

Koch Curve

CREDITS AND REFERENCES

This work is based on:

It was enhanced by: Miloš Adamović, (october 2015).

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

to setup
  clear-all
  set-default-shape turtles "line half"
  create-turtles 1
    [ set heading 90  
      setxy 16 0             
      set color blue
      set size world-width * 2 ]
  reset-ticks
end 

to step
  ask turtles[
   if-else ((random 2) = 0)[iterateone][iteratetwo]
   die
   ]
  tick
end 

to iterateone
  set size size / 3
  hatch 1
  forward size / 2
  lt 60
  hatch 1
  forward size / 2
  rt 120
  hatch 1
  forward size / 2
  lt 60
  hatch 1
end 

to iteratetwo
  set size size / 3
  hatch 1
  forward size / 2 
  rt 60
  hatch 1
  forward size / 2
  lt 120
  hatch 1
  forward size / 2
  rt 60
  hatch 1
end 

There is only one version of this model, created almost 10 years ago by Miloš Adamović.

Attached files

File Type Description Last updated
Random Koch Curve.png preview Preview for 'Random Koch Curve' almost 10 years ago, by Miloš Adamović Download

This model does not have any ancestors.

This model does not have any descendants.