[gegl/next-API: 7/7] fractal-explorer: allow to move in the fractal space
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/next-API: 7/7] fractal-explorer: allow to move in the fractal space
- Date: Mon, 18 Jun 2012 12:09:49 +0000 (UTC)
commit d8d11c1002d3867ef65be80f2bf6104b5618f688
Author: Michael Murà <batolettre gmail com>
Date: Fri Jun 8 22:54:09 2012 +0900
fractal-explorer: allow to move in the fractal space
operations/common/fractal-explorer.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/operations/common/fractal-explorer.c b/operations/common/fractal-explorer.c
index a330222..598d915 100644
--- a/operations/common/fractal-explorer.c
+++ b/operations/common/fractal-explorer.c
@@ -45,6 +45,13 @@ gegl_chant_enum (fractaltype, _("Fractal type"), GeglFractalExplorerType,
gegl_chant_int (iter, _("Iterations"), 1, 1000, 50, _("Iterations"))
+gegl_chant_double_ui (zoom, _("Zoom"), 0.0000001, 10000000.0, 1.0/400.0, 0.00001, 1000.0, 1.5,
+ _("Zoom in the fractal space"))
+gegl_chant_double_ui (shiftx, _("Shift X"), -G_MAXDOUBLE, G_MAXDOUBLE, 0, -1000.0, 1000.0, 1.5,
+ _("X shift in the fractal space"))
+gegl_chant_double_ui (shifty, _("Shift Y"), -G_MAXDOUBLE, G_MAXDOUBLE, 0, -1000.0, 1000.0, 1.5,
+ _("Y shift in the fractal space"))
+
gegl_chant_double (cx, _("CX"), -2.5, 2.5, -0.75, _("CX (No effect in Mandelbrot and Sierpinski)"))
gegl_chant_double (cy, _("CY"), -2.5, 2.5, 0.2, _("CY (No effect in Mandelbrot and Sierpinski)"))
@@ -218,8 +225,8 @@ process (GeglOperation *operation,
while (n_pixels--)
{
- x = pixelx / 400.0; /* room for moving in the fractal space */
- y = pixely / 400.0;
+ x = (pixelx + o->shiftx) / o->zoom;
+ y = (pixely + o->shifty) / o->zoom;
if (o->fractaltype == GEGl_FRACTAL_EXPLORER_TYPE_MANDELBROT)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]