jwildfire.org

The official JWildfire forum
It is currently Mon May 27, 2019 4:36 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Cone
PostPosted: Wed Mar 06, 2019 2:21 pm 
Offline
User avatar

Joined: Sun May 31, 2015 2:39 pm
Posts: 578
A mix of julia and hemisphere that creates a cone shape.

Example images.
ImageImage

Custom 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 org.jwildfire.create.tina.base.XForm;
import org.jwildfire.create.tina.base.XYZPoint;
import static org.jwildfire.base.mathlib.MathLib.*;

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

private static final String PARAM_RADIUS1 = "radius1";
private static final String PARAM_RADIUS2 = "radius2";
private static final String PARAM_SIZE1 = "size1";
private static final String PARAM_SIZE2 = "size2";
private static final String PARAM_YWAVE = "ywave";
private static final String PARAM_XWAVE = "xwave";
private static final String PARAM_HEIGHT = "height";
private static final String PARAM_WARP = "warp";
private static final String PARAM_WEIGHT = "weight";

private static final String[] paramNames = { PARAM_RADIUS1, PARAM_RADIUS2, PARAM_SIZE1, PARAM_SIZE2, PARAM_YWAVE, PARAM_XWAVE, PARAM_HEIGHT,
PARAM_WARP, PARAM_WEIGHT };
private double radius1 = 0.5;
private double radius2 = 1.0;
private double size1 = 0.5;
private double size2 = 2.0;
private double ywave = 1.0;
private double xwave = 1.0;
private double height = 1.0;
private double warp = 1.0;
private double weight = 2.0;

@Override
public void transform(FlameTransformationContext pContext, XForm pXForm, XYZPoint pAffineTP, XYZPoint pVarTP,
double pAmount) {
//A mix of julia and hemisphere that creates a cone shape by Brad Stefanov
double r = pAmount / sqrt(pAffineTP.x * pAffineTP.x *warp+ pAffineTP.y * pAffineTP.y + size1)*size2;
double xx = pAffineTP.getPrecalcAtan()* radius1 + M_PI * (int) (weight * pContext.random())*radius2;
double sina = sin(xx*ywave);
double cosa = cos(xx*xwave);
pVarTP.x += r * cosa;
pVarTP.y += r * sina;
pVarTP.z += r*height;

}

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

@Override
public Object[] getParameterValues() {
return new Object[] { radius1, radius2, size1, size2, ywave, xwave, height, warp, weight };
}

@Override
public void setParameter(String pName, double pValue) {
if (PARAM_RADIUS1.equalsIgnoreCase(pName)) {
radius1 = pValue;
} else if (PARAM_RADIUS2.equalsIgnoreCase(pName)) {
radius2 = pValue;
} else if (PARAM_SIZE1.equalsIgnoreCase(pName)) {
size1 = pValue;
} else if (PARAM_SIZE2.equalsIgnoreCase(pName)) {
size2 = pValue;
} else if (PARAM_YWAVE.equalsIgnoreCase(pName)) {
ywave = pValue;
} else if (PARAM_XWAVE.equalsIgnoreCase(pName)) {
xwave = pValue;
} else if (PARAM_HEIGHT.equalsIgnoreCase(pName)) {
height = pValue;
} else if (PARAM_WARP.equalsIgnoreCase(pName)) {
warp = pValue;
} else if (PARAM_WEIGHT.equalsIgnoreCase(pName)) {
weight = pValue;
} else {
System.out.println("pName not recognized: " + pName);
throw new IllegalArgumentException(pName);
}
}

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


}


Custom_wf_flame:

<flame smooth_gradient="0" version="JWildfire V4.00 revision 2 (20.12.2018)" size="1080 1080" center="0.17239152892561987 -1.6406249999999998" scale="133.77227528316305" rotate="0.0" filter="0.75" filter_type="GLOBAL_SHARPENING" filter_kernel="MITCHELL_SMOOTH" filter_indicator="0" filter_sharpness="4.0" filter_low_density="0.025" oversample="1" post_noise_filter="0" post_noise_filter_threshold="0.35" quality="100.0" background_type="GRADIENT_2X2_C" background_ul="0.0 0.0 0.0" background_ur="0.0 0.0 0.0" background_ll="0.0 0.0 0.0" background_lr="0.0 0.0 0.0" background_cc="0.0 0.0 0.0" bg_transparency="0" brightness="51.6" 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="1.5707963267948966" cam_yaw="0.0" cam_persp="0.096" 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" low_density_brightness="0.24" balancing_red="1.0" balancing_green="1.0" balancing_blue="1.0" cam_dof_shape="BUBBLE" cam_dof_scale="1.0" cam_dof_rotate="0.0" cam_dof_fade="1.0" 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" zbuffer_scale="1.0" mixer_mode="OFF">
<xform weight="0.5" color="0.45809212557419166" symmetry="0.8454577878362669" mirror_pre_post_translations="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_radius1="0.5" custom_wf_full_radius2="1.0" custom_wf_full_size1="0.5" custom_wf_full_size2="2.0" custom_wf_full_ywave="1.0" custom_wf_full_xwave="1.0" custom_wf_full_height="1.0" custom_wf_full_warp="1.0" custom_wf_full_weight="2.0" custom_wf_full_code_full_variation="2F2A0A20204A57696C6466697265202D20616E20696D61676520616E6420616E696D6174696F6E2070726F636573736F72207772697474656E20696E204A617661200A2020436F707972696768742028432920313939352D3230313120416E6472656173204D617363686B650A202054686973206973206672656520736F6674776172653B20796F752063616E2072656469737472696275746520697420616E642F6F72206D6F6469667920697420756E64657220746865207465726D73206F662074686520474E55204C6573736572200A202047656E6572616C205075626C6963204C6963656E7365206173207075626C697368656420627920746865204672656520536F66747761726520466F756E646174696F6E3B206569746865722076657273696F6E20322E31206F6620746865200A20204C6963656E73652C206F722028617420796F7572206F7074696F6E2920616E79206C617465722076657273696F6E2E0A200A20205468697320736F66747761726520697320646973747269627574656420696E2074686520686F706520746861742069742077696C6C2062652075736566756C2C2062757420574954484F555420414E592057415252414E54593B20776974686F7574200A20206576656E2074686520696D706C6965642077617272616E7479206F66204D45524348414E544142494C495459206F72204649544E45535320464F52204120504152544943554C415220505552504F53452E205365652074686520474E55200A20204C65737365722047656E6572616C205075626C6963204C6963656E736520666F72206D6F72652064657461696C732E0A2020596F752073686F756C642068617665207265636569766564206120636F7079206F662074686520474E55204C65737365722047656E6572616C205075626C6963204C6963656E736520616C6F6E672077697468207468697320736F6674776172653B200A20206966206E6F742C20777269746520746F20746865204672656520536F66747761726520466F756E646174696F6E2C20496E632E2C203531204672616E6B6C696E2053742C20466966746820466C6F6F722C20426F73746F6E2C204D410A202030323131302D31333031205553412C206F7220736565207468652046534620736974653A20687474703A2F2F7777772E6673662E6F72672E0A2A2F0A7061636B616765206F72672E6A77696C64666972652E6372656174652E74696E612E766172696174696F6E3B0A0A0A696D706F7274206F72672E6A77696C64666972652E6372656174652E74696E612E626173652E58466F726D3B0A696D706F7274206F72672E6A77696C64666972652E6372656174652E74696E612E626173652E58595A506F696E743B0A696D706F727420737461746963206F72672E6A77696C64666972652E626173652E6D6174686C69622E4D6174684C69622E2A3B0A0A7075626C696320636C61737320436F6E6546756E6320657874656E647320566172696174696F6E46756E63207B0A0970726976617465207374617469632066696E616C206C6F6E672073657269616C56657273696F6E554944203D20314C3B0A0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F52414449555331203D202272616469757331223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F52414449555332203D202272616469757332223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F53495A4531203D202273697A6531223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F53495A4532203D202273697A6532223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F5957415645203D20227977617665223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F5857415645203D20227877617665223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F484549474854203D2022686569676874223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F57415250203D202277617270223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F574549474854203D2022776569676874223B0A0A0970726976617465207374617469632066696E616C20537472696E675B5D20706172616D4E616D6573203D207B20504152414D5F524144495553312C20504152414D5F524144495553322C20504152414D5F53495A45312C20504152414D5F53495A45322C20504152414D5F59574156452C20504152414D5F58574156452C20504152414D5F4845494748542C0A090909504152414D5F574152502C20504152414D5F574549474854207D3B0A097072697661746520646F75626C652072616469757331203D20302E353B0A097072697661746520646F75626C652072616469757332203D20312E303B0A097072697661746520646F75626C652073697A6531203D20302E353B0A097072697661746520646F75626C652073697A6532203D20322E303B0A097072697661746520646F75626C65207977617665203D20312E303B0A097072697661746520646F75626C65207877617665203D20312E303B0A097072697661746520646F75626C6520686569676874203D20312E303B0A097072697661746520646F75626C652077617270203D20312E303B0A097072697661746520646F75626C6520776569676874203D20322E303B0A0A09404F766572726964650A097075626C696320766F6964207472616E73666F726D28466C616D655472616E73666F726D6174696F6E436F6E746578742070436F6E746578742C2058466F726D207058466F726D2C2058595A506F696E742070416666696E6554502C2058595A506F696E74207056617254502C0A090909646F75626C652070416D6F756E7429207B0A092F2F41206D6978206F66206A756C696120616E642068656D6973706865726520746861742063726561746573206120636F6E6520736861706520627920427261642053746566616E6F760909090A09646F75626C652072203D2070416D6F756E74202F20737172742870416666696E6554502E78202A2070416666696E6554502E78202A776172702B2070416666696E6554502E79202A2070416666696E6554502E79202B2073697A6531292A73697A65323B0A09646F75626C65207878203D2070416666696E6554502E67657450726563616C634174616E28292A2072616469757331202B204D5F5049202A2028696E74292028776569676874202A2070436F6E746578742E72616E646F6D2829292A726164697573323B0A09646F75626C652073696E61203D2073696E2878782A7977617665293B0A09646F75626C6520636F7361203D20636F732878782A7877617665293B0A097056617254502E78202B3D2072202A20636F73613B0A097056617254502E79202B3D2072202A2073696E613B0A097056617254502E7A202B3D20722A6865696768743B0A0A097D0A0A09404F766572726964650A097075626C696320537472696E675B5D20676574506172616D657465724E616D65732829207B0A090972657475726E20706172616D4E616D65733B0A097D0A0A09404F766572726964650A097075626C6963204F626A6563745B5D20676574506172616D6574657256616C7565732829207B0A090972657475726E206E6577204F626A6563745B5D207B20726164697573312C20726164697573322C2073697A65312C2073697A65322C2079776176652C2078776176652C206865696768742C20776172702C20776569676874207D3B0A097D0A0A09404F766572726964650A097075626C696320766F696420736574506172616D6574657228537472696E6720704E616D652C20646F75626C65207056616C756529207B0A090969662028504152414D5F524144495553312E657175616C7349676E6F72654361736528704E616D652929207B0A09090972616469757331203D207056616C75653B0A09097D20656C73652069662028504152414D5F524144495553322E657175616C7349676E6F72654361736528704E616D652929207B0A09090972616469757332203D207056616C75653B0A09097D20656C73652069662028504152414D5F53495A45312E657175616C7349676E6F72654361736528704E616D652929207B0A09090973697A6531203D207056616C75653B0A09097D20656C73652069662028504152414D5F53495A45322E657175616C7349676E6F72654361736528704E616D652929207B0A09090973697A6532203D207056616C75653B0A09097D20656C73652069662028504152414D5F59574156452E657175616C7349676E6F72654361736528704E616D652929207B0A0909097977617665203D207056616C75653B0A09097D20656C73652069662028504152414D5F58574156452E657175616C7349676E6F72654361736528704E616D652929207B0A0909097877617665203D207056616C75653B0A09097D20656C73652069662028504152414D5F4845494748542E657175616C7349676E6F72654361736528704E616D652929207B0A090909686569676874203D207056616C75653B0A09097D20656C73652069662028504152414D5F574152502E657175616C7349676E6F72654361736528704E616D652929207B0A09090977617270203D207056616C75653B0A09097D20656C73652069662028504152414D5F5745494748542E657175616C7349676E6F72654361736528704E616D652929207B0A090909776569676874203D207056616C75653B0909090A09097D20656C7365207B0A09090953797374656D2E6F75742E7072696E746C6E2822704E616D65206E6F74207265636F676E697A65643A2022202B20704E616D65293B0A0909097468726F77206E657720496C6C6567616C417267756D656E74457863657074696F6E28704E616D65293B0A09097D0A097D0A0A09404F766572726964650A097075626C696320537472696E67206765744E616D652829207B0A090972657475726E2022636F6E65223B0A097D0A0A0A7D" coefs="1.438657940494489 0.6236811266045614 -0.6236811266045614 1.438657940494489 0.22598140495867658 -0.8199896694214883" chaos="1.0"/>
<palette count="256" format="RGB">
3D3149312853362C513B3050362B4831274031243E32223D2D1E3337283E413249493353
51355E4E3A604B406251405E57405A43334D4B3049542E455D3A436746416B49436F4C46
7C52567A585E795E67825F658B61639365679B696CAC706FBB706BCB827CCD806DCF7F5E
D5866ADC8E77D1897CC685819A5665794861583A5E422A432D1B29211421160E1908060B
01000000000008060B100D16261C2E3C2C474333564B3A666D51846B4C796A476F65456C
614369624668634A676D545A7654558B5D60915E5F98605F99605E9B615DA15B53A16658
9F6768996C7E937194916691905B8F965B7E9C5C6D9864669D676593625E895A567F524F
794E4A734A46703D28553131402C4F49325B523868553D6759436775586A89636E8A5991
986C9F9E6CABA973B3B57ABCBC80C4C386CCC58ACAC488C6BA8DA19A687E7A445C703D51
66364643294431213C24152A211829321F353E253C4B2B435A44466B384B6D3B58794F50
975642A75D3AB76432AF633CA86346AC6E63B6758DBF86A6D398ACC88499CC8995D08E92
DB9EA6E8A5AEF4C7CCF6C6D4FFFFFFF9FEDEF3FDBEF6F0ADFAE39DDEDCE7F8BEE4D190D2
B276B29469728E646D886068845F6689636E9764699B696CC38789C88A8CCE8E8FCC9696
CF8E8AC78B8BB281879E6E6C86666B88596189595B8B5A558A584D89594B85594E7C5254
79504E76504F745050704D496E4F4C694E555E496861466967435D6B52586D4C436B4A41
6147485B45486049535D46627E606A906971A27379BF8A9CDB8F99F2A7A1F2D683F1BD67
D19188BB7170955E5B6F4B4B4D37393B2E283623272417281A131B110F120B08110D0A13
160B19321823391F2A4127404A2E454329443F28454330434934454E354A4F354E5D4346
5C42416A37485D4150533C564934473726382E212A301B2C351B28311A2C2A182627182D
28202F26182925162B211227180E19170E0F170D1615121B1F14222F1F3A3525403F2D53
4838694B3A6E553C765741724E3B6948315D4B2F5740304A3826362416251A1221031021
13101B1A12212E1C323F2747 </palette>
</flame>


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


Top
   
 Post subject: Re: Cone
PostPosted: Wed Mar 06, 2019 11:30 pm 
Offline
User avatar

Joined: Mon Jun 08, 2015 4:40 am
Posts: 293
Thanks so much. I am sorry I did not help test it but things here have been nuts. You can always ask me to test for you, though. I can usually make time.


Top
   
 Post subject: Re: Cone
PostPosted: Wed Mar 06, 2019 11:48 pm 
Offline
User avatar

Joined: Sun May 31, 2015 2:39 pm
Posts: 578
Quote:
Thanks so much. I am sorry I did not help test it but things here have been nuts. You can always ask me to test for you, though. I can usually make time.
Cool I will keep that in mind :)


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

All times are UTC+01:00


Who is online

Users browsing this forum: Exabot [Bot] 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