haskell, figuring use some defined function to draw the mandelbrot, need explanation
<p>I've write several function that need to used in function mandelbrot to draw it, here are these:</p>

<pre><code># sp that takes integer n, element y, list xs. insert the specified element y after every n elements.
sp 1 'a' ['b','c','d'] = ['b','a','c','a','d','a']

# plane that gives (x/r,y/r) where x and y are int, -2&lt;x/r&lt;1,-1&lt;y/r&lt;1.
plane 1 = [(-2.0,-1.0),(-1.0,-1.0),(0.0,-1.0),(1.0,-1.0),(-2.0,0.0),(-1.0,0.0),(0.0,0.0),(1.0,0.0),(-2.0,1.0),(-1.0,1.0),(0.0,1.0),(1.0,1.0)]
</code></pre>

<p># orbit, is the same in this question : <a href="http://stackoverflow.com/questions/39809592/haskell-infinite-recursion-in-list-comprehension">Haskell infinite recursion in list comprehension</a></p>

<pre><code>print(take 3 (orbit(2,1))) = [(2,1),(5,5),(2,51)]
</code></pre>

<p># find, is the same in this questionL <a href="http://stackoverflow.com/questions/39823833/haskell-recursive-function-that-return-the-char-in-a-tuple-list-with-certain-co">haskell: recursive function that return the char in a tuple list with certain condition(compare)</a></p>

<pre><code>print(find 0.4 [(0.15,'#'),(0.5,'x'),(1,'.')]) == 'x' ## &gt;all will print char ' '
</code></pre>

<p>So I'm trying to use sp,plane,orbit,and find,this four function with a new func named norm, that calculate the distances of points from the origin:</p>

<pre><code>norm (x,y) = x*x + y*y
</code></pre>

<h2>Now is my question:</h2>

<p>I'm little confused about what should do and why that, so I think I will first use plane to all the points, then use orbit  to print the list with the point? And after this, what should I do? Can anyone explain these relationship of each function and what I should do?</p>

<p>Separate code or explanation are fine. The mandelbrot function should draw something that looks like mandelbrot contains '#' 'x' '.' and ' '.</p>

<p>I figure it out.</p>

<p>So what I need to do is:</p>

<pre><code>-- find all points using plane r
-- using orbit list comprehension to take the orbit with one point at index i
-- using norm(x,y) to calculate the distance of orbit to the original
-- using find to give the list of char
-- finally using sp to put character with 'n'
-- all these stuff can using the list comprehension combine together.
</code></pre>

<p>Just for anyone who want to know how to solve this.</p>

python python-3.x haskell mandelbrot