** Template File
** $Id: julia.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
**
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
**
** === N O T E S ===========================================================
**
bailout=4;
lp=log(log(bailout));
}
-
+
bool
Julia::set_param(const String & param, const ValueBase &value)
{
EXPORT_NAME();
EXPORT_VERSION();
-
- return ValueBase();
+
+ return ValueBase();
}
Color
cr, ci,
zr, zi,
zr_hold;
-
+
ColorReal
depth, mag;
-
+
Color
ret;
-
+
cr=seed[0];
ci=seed[1];
zr=pos[0];
zi=pos[1];
-
+
for(int i=0;i<iterations;i++)
{
// Perform complex multiplication
// Use "broken" algorithm, if requested (looks weird)
if(broken)zr+=zi;
-
+
// Calculate Magnitude
mag=zr*zr+zi*zi;
if(mag>4)
- {
+ {
if(smooth_outside)
{
// Darco's original mandelbrot smoothing algo
if(color_cycle)
ret=ret.rotate_uv(color_shift.operator*(depth)).clamped_negative();
-
+
if(shade_outside)
{
ColorReal alpha=depth/static_cast<ColorReal>(iterations);
return ret;
}
-
+
Layer::Vocab
Julia::get_param_vocab()const
{
Layer::Vocab ret;
-
+
ret.push_back(ParamDesc("icolor")
.set_local_name(_("Inside Color"))
.set_description(_("Color of the Set"))
ret.push_back(ParamDesc("bailout")
.set_local_name(_("Bailout ValueBase"))
);
-
+
ret.push_back(ParamDesc("distort_inside")
.set_local_name(_("Distort Inside"))
);
ret.push_back(ParamDesc("color_outside")
.set_local_name(_("Color Outside"))
);
-
+
ret.push_back(ParamDesc("color_cycle")
.set_local_name(_("Color Cycle"))
);
.set_local_name(_("Break Set"))
.set_description(_("Modify equation to achieve interesting results"))
);
-
-
+
+
return ret;
}