-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce2dd7f
commit 089868a
Showing
43 changed files
with
3,930 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
Apophysis-j Copyright (C) 2008 Jean-Francois Bouzereau | ||
based on Apophysis ( http://www.apophysis.org ) | ||
Apophysis Copyright (C) 2001-2004 Mark Townsend | ||
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov | ||
Apophysis Copyright (C) 2007 Piotr Borys, Peter Sdobnov | ||
based on Flam3 ( http://www.flam3.com ) | ||
Copyright (C) 1992-2006 Scott Draves <[email protected]> | ||
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. | ||
This program 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. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
package org.apophysis.plugins; | ||
|
||
import org.apophysis.Variation; | ||
import org.apophysis.XForm; | ||
|
||
public class ArchVariation extends Variation | ||
{ | ||
public ArchVariation() | ||
{ | ||
this.pnames = null; | ||
} | ||
|
||
@Override | ||
public int getGroup() | ||
{ | ||
return 6; | ||
} | ||
|
||
@Override | ||
public String getName() | ||
{ | ||
return "arch"; | ||
} | ||
|
||
@Override | ||
public void compute(XForm paramXForm) | ||
{ | ||
double d1 = Math.random() * this.weight * 3.141592653589793D; | ||
double d2 = Math.sin(d1); | ||
double d3 = Math.cos(d1); | ||
if (d3 == 0.0D) { | ||
d3 = 1.0E-300D; | ||
} | ||
|
||
paramXForm.fpx += this.weight * d2; | ||
paramXForm.fpy += this.weight * d2 * d2 / d3; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
Apophysis-j Copyright (C) 2008 Jean-Francois Bouzereau | ||
based on Apophysis ( http://www.apophysis.org ) | ||
Apophysis Copyright (C) 2001-2004 Mark Townsend | ||
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov | ||
Apophysis Copyright (C) 2007 Piotr Borys, Peter Sdobnov | ||
based on Flam3 ( http://www.flam3.com ) | ||
Copyright (C) 1992-2006 Scott Draves <[email protected]> | ||
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. | ||
This program 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. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
package org.apophysis.plugins; | ||
|
||
import org.apophysis.Variation; | ||
import org.apophysis.XForm; | ||
|
||
public class BipolarVariation extends Variation | ||
{ | ||
@Override | ||
public int getGroup() | ||
{ | ||
return 5; | ||
} | ||
|
||
@Override | ||
public String getName() | ||
{ | ||
return "bipolar"; | ||
} | ||
|
||
@Override | ||
public double getParameterValue(int paramInt) | ||
{ | ||
return (0.0D / 0.0D); | ||
} | ||
|
||
@Override | ||
public void setParameterValue(int paramInt, double paramDouble) | ||
{ | ||
} | ||
|
||
@Override | ||
public void compute(XForm paramXForm) | ||
{ | ||
double d1 = paramXForm.ftx * paramXForm.ftx + paramXForm.fty * paramXForm.fty + 1.0D; | ||
double d2 = d1 + 2.0D * paramXForm.ftx; | ||
if (d2 == 0.0D) { | ||
d2 = 1.0E-300D; | ||
} | ||
double d3 = d1 - 2.0D * paramXForm.ftx; | ||
if (d3 == 0.0D) { | ||
d3 = 1.0E-300D; | ||
} | ||
|
||
paramXForm.fpx += this.weight * 0.5D * Math.log(d2 / d3); | ||
|
||
double d4 = Math.sqrt(d2 * d3); | ||
|
||
double d5 = this.weight * 2.0D * Math.atan(Math.sqrt((d4 - d1 + 2.0D) / (d4 + d1 - 2.0D))); | ||
|
||
if (paramXForm.fty > 0.0D) { | ||
paramXForm.fpy += d5; | ||
} else { | ||
paramXForm.fpy -= d5; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
Apophysis-j Copyright (C) 2008 Jean-Francois Bouzereau | ||
based on Apophysis ( http://www.apophysis.org ) | ||
Apophysis Copyright (C) 2001-2004 Mark Townsend | ||
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov | ||
Apophysis Copyright (C) 2007 Piotr Borys, Peter Sdobnov | ||
based on Flam3 ( http://www.flam3.com ) | ||
Copyright (C) 1992-2006 Scott Draves <[email protected]> | ||
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. | ||
This program 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. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
package org.apophysis.plugins; | ||
|
||
import org.apophysis.Variation; | ||
import org.apophysis.XForm; | ||
|
||
public class BladeVariation extends Variation | ||
{ | ||
@Override | ||
public int getGroup() | ||
{ | ||
return 6; | ||
} | ||
|
||
@Override | ||
public String getName() | ||
{ | ||
return "blade"; | ||
} | ||
|
||
@Override | ||
public boolean needLength() | ||
{ | ||
return true; | ||
} | ||
|
||
@Override | ||
public void compute(XForm paramXForm) | ||
{ | ||
double d1 = this.weight * Math.random() * paramXForm.flength; | ||
double d2 = Math.cos(d1); | ||
double d3 = Math.sin(d1); | ||
|
||
paramXForm.fpx += this.weight * paramXForm.ftx * (d2 + d3); | ||
paramXForm.fpy += this.weight * paramXForm.ftx * (d2 - d3); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* | ||
Apophysis-j Copyright (C) 2008 Jean-Francois Bouzereau | ||
based on Apophysis ( http://www.apophysis.org ) | ||
Apophysis Copyright (C) 2001-2004 Mark Townsend | ||
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov | ||
Apophysis Copyright (C) 2007 Piotr Borys, Peter Sdobnov | ||
based on Flam3 ( http://www.flam3.com ) | ||
Copyright (C) 1992-2006 Scott Draves <[email protected]> | ||
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. | ||
This program 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. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
package org.apophysis.plugins; | ||
|
||
import org.apophysis.Variation; | ||
import org.apophysis.XForm; | ||
|
||
public class BoardersVariation extends Variation | ||
{ | ||
@Override | ||
public int getGroup() | ||
{ | ||
return 5; | ||
} | ||
|
||
@Override | ||
public String getName() | ||
{ | ||
return "boarders"; | ||
} | ||
|
||
@Override | ||
public double getParameterValue(int paramInt) | ||
{ | ||
return (0.0D / 0.0D); | ||
} | ||
|
||
@Override | ||
public void setParameterValue(int paramInt, double paramDouble) | ||
{ | ||
} | ||
|
||
@Override | ||
public void compute(XForm paramXForm) | ||
{ | ||
double d1 = Math.round(paramXForm.ftx); | ||
double d2 = Math.round(paramXForm.fty); | ||
double d3 = paramXForm.ftx - d1; | ||
double d4 = paramXForm.fty - d2; | ||
|
||
if (Math.random() >= 0.75D) | ||
{ | ||
paramXForm.fpx += this.weight * (d3 * 0.5D + d1); | ||
paramXForm.fpy += this.weight * (d4 * 0.5D + d2); | ||
} | ||
else if (Math.abs(d3) >= Math.abs(d4)) | ||
{ | ||
if (d3 > 0.0D) | ||
{ | ||
paramXForm.fpx += this.weight * (d3 * 0.5D + d1 + 0.25D); | ||
paramXForm.fpy += this.weight * (d4 * 0.5D + d2 + 0.25D * d4 / d3); | ||
} | ||
else if (d3 < 0.0D) | ||
{ | ||
paramXForm.fpx += this.weight * (d3 * 0.5D + d1 - 0.25D); | ||
paramXForm.fpy += this.weight * (d4 * 0.5D + d2 - 0.25D * d4 / d3); | ||
} | ||
|
||
} | ||
else if (d4 > 0.0D) | ||
{ | ||
paramXForm.fpx += this.weight * (d3 * 0.5D + d1 + 0.25D * d3 / d4); | ||
paramXForm.fpy += this.weight * (d4 * 0.5D + d2 + 0.25D); | ||
} | ||
else if (d4 < 0.0D) | ||
{ | ||
paramXForm.fpx += this.weight * (d3 * 0.5D + d1 - 0.25D * d3 / d4); | ||
paramXForm.fpy += this.weight * (d4 * 0.5D + d2 - 0.25D); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
Apophysis-j Copyright (C) 2008 Jean-Francois Bouzereau | ||
based on Apophysis ( http://www.apophysis.org ) | ||
Apophysis Copyright (C) 2001-2004 Mark Townsend | ||
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov | ||
Apophysis Copyright (C) 2007 Piotr Borys, Peter Sdobnov | ||
based on Flam3 ( http://www.flam3.com ) | ||
Copyright (C) 1992-2006 Scott Draves <[email protected]> | ||
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. | ||
This program 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. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
package org.apophysis.plugins; | ||
|
||
import org.apophysis.Variation; | ||
import org.apophysis.XForm; | ||
|
||
public class ButterflyVariation extends Variation | ||
{ | ||
double v; | ||
|
||
@Override | ||
public int getGroup() | ||
{ | ||
return 5; | ||
} | ||
|
||
@Override | ||
public String getName() | ||
{ | ||
return "butterfly"; | ||
} | ||
|
||
@Override | ||
public double getParameterValue(int paramInt) | ||
{ | ||
return (0.0D / 0.0D); | ||
} | ||
|
||
@Override | ||
public void setParameterValue(int paramInt, double paramDouble) | ||
{ | ||
} | ||
|
||
@Override | ||
public void prepare(XForm paramXForm, double paramDouble) | ||
{ | ||
super.prepare(paramXForm, paramDouble); | ||
|
||
this.v = (paramDouble * 4.0D / Math.sqrt(9.424777960769379D)); | ||
} | ||
|
||
@Override | ||
public void compute(XForm paramXForm) | ||
{ | ||
double d1 = paramXForm.ftx * paramXForm.ftx + 4.0D * paramXForm.fty * paramXForm.fty + 1.0E-20D; | ||
double d2 = this.v * Math.sqrt(Math.abs(paramXForm.ftx * paramXForm.fty) / d1); | ||
|
||
paramXForm.fpx += d2 * paramXForm.ftx; | ||
paramXForm.fpy += d2 * paramXForm.fty * 2.0D; | ||
} | ||
} |
Oops, something went wrong.