====== Scripts > Export fractal ====== ^ Description | A script to generate a fractal map, and export it as a PNG image. | ^ Author | [[user>Aaron]] | ^ Created | 2010/05/24 | ^ Requires | L3DT 11.07 beta 2 or later | ^ Download | {{:scripts:export fractal.zs|Export fractal.zs}} | ===== Script contents ===== // Author: A. Torpy // Updated: 14 Jul 2011 // create settings list 'ls' varlist ls int ls.PowerOfTwo float ls.AltRange float ls.Roughness bool ls.WrapFlag set ls.PowerOfTwo 10 // 8 = 256x256, 9 = 512x512, 10 = 1024x1024 set ls.Roughness 0.55 set ls.AltRange 100 set ls.WrapFlag false // edit settings list assert "Calculation aborted!" // create our map variable map mymap // create the fractal map assert "Error generating fractal map" // initialise and edit file selector FileSelector FS filesel.Init &FS false NULL "Bitmap image (*.bmp)|*.bmp|PNG image (*.png)|*.png|Terragen file (*.ter)|*.ter|Heightfield file (*.hfz)|*.hfz|All files (*.*)|*.*|" NULL NULL assert "Export aborted" // save the map file assert false true> "Export failed!" ===== Comments ===== None.