jwildfire.org

The official JWildfire forum
It is currently Tue Sep 17, 2019 1:11 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: hypertile3D2BStweak
PostPosted: Sat Oct 22, 2016 7:33 pm 
Offline
User avatar

Joined: Sun May 31, 2015 2:39 pm
Posts: 604
A small code tweak of the hypertile3D2 variaton
base flame image
Image
base flame params
Code:
<flame name="Hypertile3D2 BS Tweak base" smooth_gradient="0" version="JWildfire 3.00 ALPHA 6 (16.09.2016)" size="1080 1080" center="0.05789473881114905 0.03429270164123599" scale="472.17806041335456" rotate="21.034254579244514" filter="0.5" filter_kernel="GAUSSIAN" oversample="2" color_oversample="3" sample_jittering="0" post_noise_filter="0" post_noise_filter_threshold="0.35" quality="100.0" background="0.0 0.0 0.0" bg_transparency="0" brightness="34.68" saturation="1.0" gamma="4.0" gamma_threshold="0.01" vibrancy="1.0" contrast="1.0" white_level="220.0" temporal_samples="1.0" cam_zoom="1.0" cam_pitch="0.0" cam_yaw="0.0" cam_persp="0.0" cam_xfocus="0.0" cam_yfocus="0.0" cam_zfocus="0.0" cam_pos_x="0.0" cam_pos_y="0.0" cam_pos_z="0.0" cam_zpos="0.0" cam_dof="0.0" cam_dof_area="0.5" cam_dof_exponent="2.0" cam_dof_shape="BUBBLE" cam_dof_scale="1.0" cam_dof_rotate="0.0" cam_dof_fade="1.0" preserve_z="1" resolution_profile="1080x1080" antialias_amount="0.25" antialias_radius="0.5" post_symmetry_type="NONE" post_symmetry_order="3" post_symmetry_centre_x="0.0" post_symmetry_centre_y="0.0" post_symmetry_distance="1.25" post_symmetry_rotation="6.0" frame="1" frame_count="300" fps="30" post_blur_radius="0" post_blur_fade="0.95" post_blur_falloff="2.0" mixer_mode="OFF">
  <xform weight="6.84" color="0.47489386261138944" symmetry="0.0" material="0.0" material_speed="0.0" mod_gamma="0.0" mod_gamma_speed="0.0" mod_contrast="0.0" mod_contrast_speed="0.0" mod_saturation="0.0" mod_saturation_speed="0.0" mod_hue="0.0" mod_hue_speed="0.0" custom_wf_full="1.0" custom_wf_full_fx_priority="0" custom_wf_full_p="3" custom_wf_full_q="7" custom_wf_full_code_full_variation="2F2A0A20204A57696C6466697265202D20616E20696D61676520616E6420616E696D6174696F6E2070726F636573736F72207772697474656E20696E204A617661200A2020436F707972696768742028432920313939352D3230313120416E6472656173204D617363686B650A0A202054686973206973206672656520736F6674776172653B20796F752063616E2072656469737472696275746520697420616E642F6F72206D6F6469667920697420756E64657220746865207465726D73206F662074686520474E55204C6573736572200A202047656E6572616C205075626C6963204C6963656E7365206173207075626C697368656420627920746865204672656520536F66747761726520466F756E646174696F6E3B206569746865722076657273696F6E20322E31206F6620746865200A20204C6963656E73652C206F722028617420796F7572206F7074696F6E2920616E79206C617465722076657273696F6E2E0A200A20205468697320736F66747761726520697320646973747269627574656420696E2074686520686F706520746861742069742077696C6C2062652075736566756C2C2062757420574954484F555420414E592057415252414E54593B20776974686F7574200A20206576656E2074686520696D706C6965642077617272616E7479206F66204D45524348414E544142494C495459206F72204649544E45535320464F52204120504152544943554C415220505552504F53452E205365652074686520474E55200A20204C65737365722047656E6572616C205075626C6963204C6963656E736520666F72206D6F72652064657461696C732E0A0A2020596F752073686F756C642068617665207265636569766564206120636F7079206F662074686520474E55204C65737365722047656E6572616C205075626C6963204C6963656E736520616C6F6E672077697468207468697320736F6674776172653B200A20206966206E6F742C20777269746520746F20746865204672656520536F66747761726520466F756E646174696F6E2C20496E632E2C203531204672616E6B6C696E2053742C20466966746820466C6F6F722C20426F73746F6E2C204D410A202030323131302D31333031205553412C206F7220736565207468652046534620736974653A20687474703A2F2F7777772E6673662E6F72672E0A2A2F0A7061636B616765206F72672E6A77696C64666972652E6372656174652E74696E612E766172696174696F6E3B0A0A696D706F727420737461746963206F72672E6A77696C64666972652E626173652E6D6174686C69622E4D6174684C69622E4D5F50493B0A696D706F727420737461746963206F72672E6A77696C64666972652E626173652E6D6174686C69622E4D6174684C69622E636F733B0A696D706F727420737461746963206F72672E6A77696C64666972652E626173652E6D6174686C69622E4D6174684C69622E73696E3B0A696D706F727420737461746963206F72672E6A77696C64666972652E626173652E6D6174686C69622E4D6174684C69622E7371723B0A696D706F727420737461746963206F72672E6A77696C64666972652E626173652E6D6174686C69622E4D6174684C69622E737172743B0A0A696D706F7274206F72672E6A77696C64666972652E626173652E546F6F6C733B0A696D706F7274206F72672E6A77696C64666972652E6372656174652E74696E612E626173652E4C617965723B0A696D706F7274206F72672E6A77696C64666972652E6372656174652E74696E612E626173652E58466F726D3B0A696D706F7274206F72672E6A77696C64666972652E6372656174652E74696E612E626173652E58595A506F696E743B0A0A7075626C696320636C61737320487970657274696C653344324253547765616B46756E6320657874656E647320566172696174696F6E46756E63207B0A202070726976617465207374617469632066696E616C206C6F6E672073657269616C56657273696F6E554944203D20314C3B0A0A202070726976617465207374617469632066696E616C20537472696E6720504152414D5F50203D202270223B0A202070726976617465207374617469632066696E616C20537472696E6720504152414D5F51203D202271223B0A0A202070726976617465207374617469632066696E616C20537472696E675B5D20706172616D4E616D6573203D207B20504152414D5F502C20504152414D5F51207D3B0A0A20207072697661746520696E742070203D20333B0A20207072697661746520696E742071203D20373B0A0A2020404F766572726964650A20207075626C696320766F6964207472616E73666F726D28466C616D655472616E73666F726D6174696F6E436F6E746578742070436F6E746578742C2058466F726D207058466F726D2C2058595A506F696E742070416666696E6554502C2058595A506F696E74207056617254502C20646F75626C652070416D6F756E7429207B0A202020202F2A20687970657274696C65334432206279205A7565756B2C20687474703A2F2F7A7565756B2E64657669616E746172742E636F6D2F6172742F33442D4879706572626F6C69632D74696C696E672D706C7567696E732D313639303437393236202A2F0A20202020646F75626C65207232203D207371722870416666696E6554502E7829202B207371722870416666696E6554502E7929202B207371722870416666696E6554502E7A293B0A0A20202020646F75626C652078326378203D20633278202A2070416666696E6554502E783B0A0A20202020646F75626C652078203D2070416666696E6554502E78202A20733278202D206378202A20282D7232202D2031293B0A20202020646F75626C652079203D2070416666696E6554502E79202A207332793B0A0A20202020646F75626C65207672203D2070416D6F756E74202F20286332202A207232202B2078326378202B2031293B0A0A20202020646F75626C652061203D2070436F6E746578742E72616E646F6D28496E74656765722E4D41585F56414C554529202A2070613B0A20202020646F75626C652073696E61203D2073696E2861293B0A20202020646F75626C6520636F7361203D20636F732861293B0A0A202020207056617254502E78202B3D207672202A202878202A20636F7361202B2079202A2073696E61293B0A202020207056617254502E79202B3D207672202A202879202A20636F7361202D2078202A2073696E61293B0A202020207056617254502E7A202B3D207672202A202870416666696E6554502E7A202A2073327A293B0A20207D0A0A2020404F766572726964650A20207075626C696320537472696E675B5D20676574506172616D657465724E616D65732829207B0A2020202072657475726E20706172616D4E616D65733B0A20207D0A0A2020404F766572726964650A20207075626C6963204F626A6563745B5D20676574506172616D6574657256616C7565732829207B0A2020202072657475726E206E6577204F626A6563745B5D207B20702C2071207D3B0A20207D0A0A2020404F766572726964650A20207075626C696320766F696420736574506172616D6574657228537472696E6720704E616D652C20646F75626C65207056616C756529207B0A2020202069662028504152414D5F502E657175616C7349676E6F72654361736528704E616D6529290A20202020202070203D206C696D6974496E7456616C28546F6F6C732E46544F49287056616C7565292C20332C20496E74656765722E4D41585F56414C5545293B0A20202020656C73652069662028504152414D5F512E657175616C7349676E6F72654361736528704E616D6529290A20202020202071203D206C696D6974496E7456616C28546F6F6C732E46544F49287056616C7565292C20332C20496E74656765722E4D41585F56414C5545293B0A20202020656C73650A2020202020207468726F77206E657720496C6C6567616C417267756D656E74457863657074696F6E28704E616D65293B0A20207D0A0A2020404F766572726964650A20207075626C696320537472696E67206765744E616D652829207B0A2020202072657475726E2022687970657274696C653344324253747765616B223B0A20207D0A0A20207072697661746520646F75626C652070612C2071612C2063782C2063322C206332782C207332782C207332792C2073327A3B0A0A2020404F766572726964650A20207075626C696320766F696420696E697428466C616D655472616E73666F726D6174696F6E436F6E746578742070436F6E746578742C204C6179657220704C617965722C2058466F726D207058466F726D2C20646F75626C652070416D6F756E7429207B0A202020207061203D2032202A204D5F5049202F20703B0A202020207161203D2032202F204D5F5049202F20713B0A0A20202020646F75626C652072203D202D28636F7328706129202D203129202F2028636F7328706129202B20636F7328716129293B0A202020206966202872203E2030290A20202020202072203D2031202F20737172742831202B2072293B0A20202020656C73650A20202020202072203D20313B0A0A202020206378203D20723B0A202020206332203D20737172286378293B0A20202020633278203D2032202A2063783B0A0A20202020733278203D2031202B20737172286378293B0A20202020733279203D2031202D20737172286378293B0A2020202073327A203D2031202D20737172286378293B0A20207D0A0A7D0A" coefs="-1.0 -2.7755575615628914E-16 2.7755575615628914E-16 -1.0 0.0 0.0" chaos="1.0 1.0"/>
  <xform weight="0.5" color="0.0" symmetry="0.0" material="0.0" material_speed="0.0" mod_gamma="0.0" mod_gamma_speed="0.0" mod_contrast="0.0" mod_contrast_speed="0.0" mod_saturation="0.0" mod_saturation_speed="0.0" mod_hue="0.0" mod_hue_speed="0.0" obj_mesh_primitive_wf="1.0" obj_mesh_primitive_wf_fx_priority="0" obj_mesh_primitive_wf_primitive="0" obj_mesh_primitive_wf_scale_x="1.0" obj_mesh_primitive_wf_scale_y="1.0" obj_mesh_primitive_wf_scale_z="1.0" obj_mesh_primitive_wf_offset_x="0.0" obj_mesh_primitive_wf_offset_y="0.0" obj_mesh_primitive_wf_offset_z="0.0" obj_mesh_primitive_wf_subdiv_level="0" obj_mesh_primitive_wf_subdiv_smooth_passes="12" obj_mesh_primitive_wf_subdiv_smooth_lambda="0.42" obj_mesh_primitive_wf_subdiv_smooth_mu="-0.45" coefs="1.104536101718726 0.0 0.0 1.104536101718726 0.0 0.0" post="0.5507068873606156 0.0 0.0 0.5507068873606156 0.0 0.0" chaos="1.0 1.0"/>
  <palette count="256" format="RGB">
DAB9A9D6C197D2BD8DCAC684B2A971A6A26795855E857867796D5E6D6954696554696955
6D6D556D6D556D6D55756D5E81816789925E92A65E92A655899555858D558D8D55899255
8D895E899167929A719EA27A9DA6719AAA7196AA7AA6B684C2B18DD2B98DDAB997E6B48D
EAB496EAB08DE6AC83D69D71C69171B68067996C5E8D6454796554755C546D585E60505E
794C5E755C5E75695E755C5E81645E857D67998467AE8D7ABE9471C2A571DBA17AE6B48D
E6B48DEEB48DEA9D97E6AC8DEA9DA0EA9C96E69DA9DE9597DB918DCE957AC68C71BE8071
BA8867C28068C28867CA8C67CA9171CA9871D29871DEA171DEA97ADBA57ADBA984D6A984
D2A584D6A184DB918DDB8D84DE8D8DDB918DD6A18DCEA884CAAD84AEAA7A95956789855E
716C55655D54514D4B4D514B5555546D615489704B95705EA5775EBA7B5EBA8068C28871
C29471CEA584DEC5A0FAF5D8DEC5A0D6B5A0D6B5B3FAC5C5EEA4A9EA9DA0EAA096EA9197
DB8D8DCE898DBA9084B29984A6A57AA2AA7192A66789966795895EAE9D67BEAD67CAC671
CEDB84CECA71BEB57AAEA9718D8D5E6971554D514B3C4042302C2F2C2C25242025182025
24242F34283850404154484B695854797167918D71A2957ABA9D8DCAB597D2BD97D2C1A0
DEC5A0DABD96CEB58DD2A584D2997AD2997ADB8D84DB8984CE897ACE947ACE917ADB8984
DB8D84DE918DDE9997DEA496DB9997DB9197CE8997A9848DA58D84918171916C67855C67
8968677D71677D7567917467A18067B2985EB2A167B2A55EA6AE5E9AA65EAEA95E9AA25E
9995559D895EBA845EBA7F5EBE805EC28868BE8868C28C5ECA8C5ECA9167CA9171CE957A
CE9584D28D8DD6898DCE898DCE8984C68D84C6917AC2917AB2947AAEA17AA6A567A2B25E
9EAA67A2BA71B2BA5EBEC267BEB17AC6AD84BAA197CE9197D68D8DDB8D84CE8D7ADB8971
CA917AC28C7AB68871B6846795785E7969545D4C4155444248444B30304230282F2C2C2F
2C282F282C2F20282F1C28382024382C2C3844384255514169654B75755589855585895E
917855856C4B6161424C444B  </palette>
</flame>


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: hypertile3D2BStweak
PostPosted: Sat Oct 22, 2016 7:36 pm 
Offline
User avatar

Joined: Wed Nov 26, 2014 1:33 pm
Posts: 65
Location: Germany
Thank you Brad very useful and can do lots with it :-)


Top
   
 Post subject: Re: hypertile3D2BStweak
PostPosted: Sun Oct 23, 2016 9:22 am 
Offline
User avatar

Joined: Mon Jun 08, 2015 4:40 am
Posts: 306
This is wonderful Brad! Thanks!!!


Top
   
 Post subject: Re: hypertile3D2BStweak
PostPosted: Mon Aug 26, 2019 3:53 pm 
Offline
User avatar

Joined: Sun May 31, 2015 2:39 pm
Posts: 604
Added more variables and changed name to hypertile3D2b. Most of the time when you change the variables you "break" it but gives some interesting results. Not worth committing.
Code:
/*
  JWildfire - an image and animation processor written in Java 
  Copyright (C) 1995-2011 Andreas Maschke

  This 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 (at your option) any later version.
 
  This software 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 
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License along with this software; 
  if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jwildfire.create.tina.variation;

import static org.jwildfire.base.mathlib.MathLib.M_PI;
import static org.jwildfire.base.mathlib.MathLib.cos;
import static org.jwildfire.base.mathlib.MathLib.sin;
import static org.jwildfire.base.mathlib.MathLib.sqr;
import static org.jwildfire.base.mathlib.MathLib.sqrt;

import org.jwildfire.base.Tools;
import org.jwildfire.create.tina.base.Layer;
import org.jwildfire.create.tina.base.XForm;
import org.jwildfire.create.tina.base.XYZPoint;

public class Hypertile3D2bFunc extends VariationFunc {
  private static final long serialVersionUID = 1L;

  private static final String PARAM_P = "p";
  private static final String PARAM_Q = "q";

  private static final String PARAM_B = "b";
  private static final String PARAM_C = "c";
  private static final String PARAM_D = "d";
  private static final String PARAM_E = "e";
  private static final String PARAM_F = "f";
  private static final String PARAM_G = "g";
  private static final String PARAM_H = "h";
  private static final String PARAM_I = "i";
  private static final String PARAM_J = "j";
  private static final String PARAM_K = "k";

  private static final String[] paramNames = { PARAM_P, PARAM_Q, PARAM_B, PARAM_C, PARAM_D, PARAM_E, PARAM_F, PARAM_G, PARAM_H, PARAM_I, PARAM_J, PARAM_K };

  private int p = 3;
  private int q = 7;

  private double b = 2.0;
  private double c = 2.0;
  private double d = 1.0;
  private double e = 1.0;
  private double f = 1.0;
  private double g = 2.0;
  private double h = 1.0;
  private double i = 1.0;
  private double j = 1.0;
  private double k = 1.0;

  @Override
  public void transform(FlameTransformationContext pContext, XForm pXForm, XYZPoint pAffineTP, XYZPoint pVarTP, double pAmount) {
    /* hypertile3D2 by Zueuk, http://zueuk.deviantart.com/art/3D-Hyperbolic-tiling-plugins-169047926 */
    double r2 = sqr(pAffineTP.x) + sqr(pAffineTP.y) + sqr(pAffineTP.z);

    double x2cx = c2x * pAffineTP.x;

    double x = pAffineTP.x * s2x - cx * (-r2 - 1);
    double y = pAffineTP.y * s2y;

    double vr = pAmount / (c2 * r2 + x2cx + h);

    double a = pContext.random(Integer.MAX_VALUE) * pa;
    double sina = sin(a);
    double cosa = cos(a);

    pVarTP.x += vr * (x * cosa + y * sina);
    pVarTP.y += vr * (y * cosa - x * sina);
    pVarTP.z += vr * (pAffineTP.z * s2z);
  }

  @Override
  public String[] getParameterNames() {
    return paramNames;
  }

  @Override
  public Object[] getParameterValues() {
    return new Object[] { p, q, b, c, d, e, f, g, h, i, j, k };
  }

  @Override
  public void setParameter(String pName, double pValue) {
    if (PARAM_P.equalsIgnoreCase(pName))
      p = limitIntVal(Tools.FTOI(pValue), 3, Integer.MAX_VALUE);
    else if (PARAM_Q.equalsIgnoreCase(pName))
      q = limitIntVal(Tools.FTOI(pValue), 3, Integer.MAX_VALUE);
   else if (PARAM_B.equalsIgnoreCase(pName)) {
      b = pValue;
    } else if (PARAM_C.equalsIgnoreCase(pName)) {
      c = pValue;
    } else if (PARAM_D.equalsIgnoreCase(pName)) {
      d = pValue;
    } else if (PARAM_E.equalsIgnoreCase(pName)) {
      e = pValue;
    } else if (PARAM_F.equalsIgnoreCase(pName)) {
      f = pValue;
    } else if (PARAM_G.equalsIgnoreCase(pName)) {
      g = pValue;
    } else if (PARAM_H.equalsIgnoreCase(pName)) {
      h = pValue;    
    } else if (PARAM_I.equalsIgnoreCase(pName)) {
      i = pValue;
    } else if (PARAM_J.equalsIgnoreCase(pName)) {
      j = pValue;
    } else if (PARAM_K.equalsIgnoreCase(pName)) {
      k = pValue;   }         
    else
      throw new IllegalArgumentException(pName);
  }

  @Override
  public String getName() {
    return "hypertile3D2b";
  }

  private double pa, qa, cx, c2, c2x, s2x, s2y, s2z;

  @Override
  public void init(FlameTransformationContext pContext, Layer pLayer, XForm pXForm, double pAmount) {
    pa = b * M_PI / p;
    qa = c * M_PI / q;

    double r = -(cos(pa) - d) / (cos(pa) + cos(qa));
    if (r > 0)
      r = e / sqrt(f + r);
    else
      r = 1;

    cx = r;
    c2 = sqr(cx);
    c2x = g * cx;

    s2x = i + sqr(cx);
    s2y = j - sqr(cx);
    s2z = k - sqr(cx);
  }

}


Top
   
 Post subject: Re: hypertile3D2BStweak
PostPosted: Fri Aug 30, 2019 6:15 pm 
Offline

Joined: Tue Nov 25, 2014 7:08 pm
Posts: 43
Thanks Brad for all the great work you do!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
Theme Created by HOLLYSMOKE
Theme updated to phpBB 3.1.6 by KamijouTouma
Theme Version is 3.1.6-ss2