From c26eb87aec7438d167fa2f460a3f412db09c0ac5 Mon Sep 17 00:00:00 2001 From: paramat Date: Tue, 8 Dec 2015 05:40:36 +0000 Subject: Mgfractal: Add 3D and 4D fractals 3D Mandelbrot/Mandelbar 3D Christmas Tree 3D Mandelbulb 3D Cosine Mandelbulb 4D Mandelbulb Plus corresponding julia set for each Add credits for formulas Rename parameter 'formula' to 'fractal' Speed optimisations --- src/mapgen_fractal.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/mapgen_fractal.h') diff --git a/src/mapgen_fractal.h b/src/mapgen_fractal.h index 7d31a43b8..3d4f7ee8f 100644 --- a/src/mapgen_fractal.h +++ b/src/mapgen_fractal.h @@ -3,6 +3,9 @@ Minetest Copyright (C) 2010-2015 kwolekr, Ryan Kwolek Copyright (C) 2010-2015 paramat, Matt Gregory +Fractal formulas from http://www.bugman123.com/Hypercomplex/index.html +by Paul Nylander, and from http://www.fractalforums.com, thank you. + This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or @@ -33,7 +36,7 @@ extern FlagDesc flagdesc_mapgen_fractal[]; struct MapgenFractalParams : public MapgenSpecificParams { u32 spflags; - u16 formula; + u16 fractal; u16 iterations; v3f scale; v3f offset; @@ -63,14 +66,17 @@ public: int ystride; int zstride; - u32 spflags; + u16 formula; + bool julia; v3s16 node_min; v3s16 node_max; v3s16 full_node_min; v3s16 full_node_max; - u16 formula; + u32 spflags; + + u16 fractal; u16 iterations; v3f scale; v3f offset; -- cgit v1.2.3