1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

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
This commit is contained in:
paramat 2015-12-08 05:40:36 +00:00
parent aed10765f2
commit c26eb87aec
4 changed files with 145 additions and 59 deletions

View file

@ -3,6 +3,9 @@ Minetest
Copyright (C) 2010-2015 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
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;