diff --git a/contents/IFS/IFS.md b/contents/IFS/IFS.md
index 87b1790d5..34b463c72 100644
--- a/contents/IFS/IFS.md
+++ b/contents/IFS/IFS.md
@@ -171,6 +171,17 @@ Which brings us to another topic entirely: restricted chaos games.
Discussing restricted chaos games in more detail is a chapter in its own right, so I will forego the discussion here.
If you are interested, please let me know and I will be more than willing to add the chapter in the future!
+## Video Explanation
+
+Here is a video describing iterated function systems:
+
+
+
+
+
+
## Example Code
For the code in this chapter, we have decided to write it specifically for the Chaos game, not the hutchinson animations shown at the start of the chapter.
diff --git a/contents/IFS/code/julia/IFS.jl b/contents/IFS/code/julia/IFS.jl
index 5ac7bd205..4b0fea801 100644
--- a/contents/IFS/code/julia/IFS.jl
+++ b/contents/IFS/code/julia/IFS.jl
@@ -1,19 +1,19 @@
using DelimitedFiles
# This is a function to simulate a "chaos game"
-function chaos_game(n::Int, shape_points; output_file="out.dat")
+function chaos_game(n::Int, shape_points)
# Initializing the output array and the initial point
- out = zeros(n,2)
+ output_points = zeros(n,2)
point = [rand(), rand()]
for i = 1:n
- out[i,:] .= point
+ output_points[i,:] .= point
point = 0.5*(rand(shape_points) .+ point)
end
- writedlm(output_file, out)
-
+ return output_points
+
end
# This will generate a Sierpinski triangle with a chaos game of n points for an
@@ -25,4 +25,5 @@ end
shape_points = [[0.0, 0.0],
[0.5, sqrt(0.75)],
[1.0, 0.0]]
-chaos_game(10000, shape_points)
+output_points = chaos_game(10000, shape_points)
+writedlm("out.dat", output_points)