Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'InitCauseway' 'View' ⎕CY 'sharpplot'
- InitCauseway ⍬ ⍝ initialise current namespace
- pts ← ,(¯2+(⍳300)÷100)∘.+0j1ׯ1+(⍳200)÷100
- x ← 9○pts
- y ← 11○pts
- mandelbrot ← {n←0 ⋄ n⊣⍵{n+←1 ⋄ ⍺+⍵×⍵}⍣{(~(|⍵)≤2)∨n≥80}0}
- vals ← mandelbrot¨pts
- cl ← ∪vals
- type ← cl⍳vals
- colors ← 256⊥⍉255,↑3/¨cl
- sp ← ⎕NEW Causeway.SharpPlot
- sp.MarkerLimit ← 0
- sp.SplitBy ⊂type
- sp.Heading ← 'Mandelbrot Set'
- sp.SetMarkers ⊂System.Drawing.Marker.Bullet
- sp.SetColors ⊂colors
- sp.DrawScatterPlot(x y)
- sp.SaveSvg(⊂'samplemand.svg')
- ⎕←sp.RenderSvg ⍬
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement