rsidwell

rings3

Jan 8th, 2025
5,053
0
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.62 KB | None | 0 0
  1. /*
  2.   JWildfire - an image and animation processor written in Java
  3.   Copyright (C) 1995-2021 Andreas Maschke
  4.  
  5.   This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
  6.   General Public License as published by the Free Software Foundation; either version 2.1 of the
  7.   License, or (at your option) any later version.
  8.  
  9.   This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
  10.   even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11.   Lesser General Public License for more details.
  12.  
  13.   You should have received a copy of the GNU Lesser General Public License along with this software;
  14.   if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  15.   02110-1301 USA, or see the FSF site: http://www.fsf.org.
  16. */
  17. package org.jwildfire.create.tina.variation;
  18.  
  19. import org.jwildfire.create.tina.base.Layer;
  20. import org.jwildfire.create.tina.base.XForm;
  21. import org.jwildfire.create.tina.base.XYZPoint;
  22.  
  23. import static org.jwildfire.base.mathlib.MathLib.EPSILON;
  24.  
  25. public class Rings3Func extends VariationFunc implements SupportsGPU {
  26.   private static final long serialVersionUID = 1L;
  27.  
  28.   private static final String PARAM_VAL = "val";
  29.   private static final String PARAM_N = "n";
  30.  
  31.   private static final String[] paramNames = {PARAM_VAL, PARAM_N};
  32.  
  33.   private double val = 0.01;
  34.   private double n = 0.0;
  35.  
  36.   @Override
  37.   public void transform(FlameTransformationContext pContext, XForm pXForm, XYZPoint pAffineTP, XYZPoint pVarTP, double pAmount) {
  38.     double l = pAffineTP.getPrecalcSqrt();
  39.     if (_dx == 0 || l == 0) {
  40.       return;
  41.     }
  42.     double k = (int) (l / _dx + 1) / 2;
  43.     double r = pAmount * (2.0 - _dx * (k * 2 / l + 1) - n * (k * c - 1) / l);
  44.  
  45.     pVarTP.x += r * pAffineTP.x;
  46.     pVarTP.y += r * pAffineTP.y;
  47.  
  48.     if (pContext.isPreserveZCoordinate()) {
  49.       pVarTP.z += pAmount * pAffineTP.z;
  50.     }
  51.   }
  52.  
  53.   @Override
  54.   public String[] getParameterNames() {
  55.     return paramNames;
  56.   }
  57.  
  58.   @Override
  59.   public Object[] getParameterValues() {
  60.     return new Object[]{val, n};
  61.   }
  62.  
  63.   @Override
  64.   public void setParameter(String pName, double pValue) {
  65.     if (PARAM_VAL.equalsIgnoreCase(pName))
  66.       val = pValue;
  67.     else if (PARAM_N.equalsIgnoreCase(pName))
  68.       n = pValue;
  69.     else
  70.       throw new IllegalArgumentException(pName);
  71.   }
  72.  
  73.   @Override
  74.   public String getName() {
  75.     return "rings3";
  76.   }
  77.  
  78.   private double _dx;
  79.   private double c;
  80.  
  81.   @Override
  82.   public void init(FlameTransformationContext pContext, Layer pLayer, XForm pXForm, double pAmount) {
  83.     _dx = val * val + EPSILON;
  84.     c = 2.0 * (_dx - _dx * _dx);
  85.   }
  86.  
  87.   @Override
  88.   public VariationFuncType[] getVariationTypes() {
  89.     return new VariationFuncType[]{VariationFuncType.VARTYPE_2D, VariationFuncType.VARTYPE_SUPPORTS_GPU, VariationFuncType.VARTYPE_SUPPORTED_BY_SWAN};
  90.   }
  91.  
  92.  
  93.   @Override
  94.   public String getGPUCode(FlameTransformationContext context) {
  95.     return "float l = sqrtf(__x * __x + __y * __y);\n"
  96.         + "float _dx = __rings2_val * __rings2_val ADD_EPSILON;\n"
  97.         + "float c = 2.f * (_dx - _dx * _dx);\n"
  98.         + " if (_dx == 0.f || l == 0.f) {\n"
  99.         + "    return;\n"
  100.         + " }\n"
  101.         + "float k = (int) ((l / _dx + 1.f) / 2.f)"
  102.         + " float r = __rings2 * (2.f - _dx * (k * 2.f / l + 1.f) - __rings2_n * (k * c - 1.f) / l);\n"
  103.         + "\n"
  104.         + "    __px += r * __x;\n"
  105.         + "    __py += r * __y;\n"
  106.         + "\n"
  107.         + (context.isPreserveZCoordinate() ? "__pz += __rings2 * __z;\n" : "");
  108.   }
  109.  
  110. }
  111.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Sarwamor
    18 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • Korpotor
    11 days
    # CSS 0.06 KB | 0 0
    1. We just shared HQ data on our channel: https://t.me/theprotocolone
Add Comment
Please, Sign In to add comment