Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FLAME FILE:
- <flame name="updated dc_carpet BS" smooth_gradient="0" version="JWildfire V3.30 (21.12.2017)" size="1080 1080" center="-0.4619622801440984 0.44712862894681094" scale="526.66380000576" rotate="35.770290315744866" filter="0.75" filter_type="ADAPTIVE" filter_kernel="MITCHELL_SINEPOW" filter_indicator="0" filter_sharpness="4.0" filter_low_density="0.025" oversample="2" 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="4.0" 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="-2.5691246589356527" cam_yaw="0.06283185307179587" 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" 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" preserve_z="1" antialias_amount="0.0" antialias_radius="0.0" 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" sld_render_enabled="1" sld_render_ao_enabled="1" sld_render_ao_intensity="0.6" sld_render_ao_search_radius="4.0" sld_render_ao_blur_radius="1.5" sld_render_ao_radius_samples="6" sld_render_ao_azimuth_samples="7" sld_render_ao_falloff="0.5" sld_render_ao_affect_diffuse="0.1" sld_render_shadow_type="FAST" sld_render_shadow_smooth_radius="1.0" sld_render_shadowmap_size="2048" sld_render_shadowmap_bias="0.01" post_bokeh_filter_kernel="SINEPOW15" post_bokeh_intensity="0.005" post_bokeh_brightness="1.0" post_bokeh_size="2.0" post_bokeh_activation="0.2" sld_render_material_count="2" sld_render_material_diffuse0="0.14" sld_render_material_ambient0="1.52" sld_render_material_phong0="0.0634" sld_render_material_phong_size0="12.0" sld_render_material_phong_red0="1.0" sld_render_material_phong_green0="1.0" sld_render_material_phong_blue0="1.0" sld_render_material_refl_map_intensity0="0.5" sld_render_material_refl_map_filename0="" sld_render_material_refl_mappping0="BLINN_NEWELL" sld_render_material_light_diif_func0="COSA_SQUARE" sld_render_material_diffuse1="0.1" sld_render_material_ambient1="1.0" sld_render_material_phong1="0.6" sld_render_material_phong_size1="15.0" sld_render_material_phong_red1="1.0" sld_render_material_phong_green1="1.0" sld_render_material_phong_blue1="1.0" sld_render_material_refl_map_intensity1="0.5" sld_render_material_refl_map_filename1="" sld_render_material_refl_mappping1="BLINN_NEWELL" sld_render_material_light_diif_func1="COSA" sld_render_ligtht_count="2" sld_render_light_altitude0="-55.238" sld_render_light_azimuth0="264.762" sld_render_light_intensity0="1.0" sld_render_light_red0="1.0" sld_render_light_green0="1.0" sld_render_light_blue0="1.0" sld_render_light_shadows0="1" sld_render_light_shadow_intensity0="1.0" sld_render_light_altitude1="55.0" sld_render_light_azimuth1="-15.0" sld_render_light_intensity1="0.5" sld_render_light_red1="1.0" sld_render_light_green1="1.0" sld_render_light_blue1="1.0" sld_render_light_shadows1="0" sld_render_light_shadow_intensity1="0.7" mixer_mode="OFF">
- <xform weight="0.5" color="0.0" symmetry="0.0" 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="0.5" custom_wf_full_fx_priority="0" custom_wf_full_origin="2.0" custom_wf_full_color_a="-0.7036000000000002" custom_wf_full_color_b="2.46" custom_wf_full_color_c="1.0" custom_wf_full_color_d="1.0" custom_wf_full_color_e="2.528" custom_wf_full_color_f="1.0" custom_wf_full_stretch_x="1.0" custom_wf_full_stretch_y="1.0" custom_wf_full_scale_x="1.0" custom_wf_full_scale_y="1.0" custom_wf_full_scale_z="1.584" custom_wf_full_offset_z="0.0" custom_wf_full_reset_z="0.0" custom_wf_full_code_full_variation="2F2A0A20204A57696C6466697265202D20616E20696D61676520616E6420616E696D6174696F6E2070726F636573736F72207772697474656E20696E204A617661200A2020436F707972696768742028432920313939352D3230313120416E6472656173204D617363686B650A0A202054686973206973206672656520736F6674776172653B20796F752063616E2072656469737472696275746520697420616E642F6F72206D6F6469667920697420756E64657220746865207465726D73206F662074686520474E55204C6573736572200A202047656E6572616C205075626C6963204C6963656E7365206173207075626C697368656420627920746865204672656520536F66747761726520466F756E646174696F6E3B206569746865722076657273696F6E20322E31206F6620746865200A20204C6963656E73652C206F722028617420796F7572206F7074696F6E2920616E79206C617465722076657273696F6E2E0A200A20205468697320736F66747761726520697320646973747269627574656420696E2074686520686F706520746861742069742077696C6C2062652075736566756C2C2062757420574954484F555420414E592057415252414E54593B20776974686F7574200A20206576656E2074686520696D706C6965642077617272616E7479206F66204D45524348414E544142494C495459206F72204649544E45535320464F52204120504152544943554C415220505552504F53452E205365652074686520474E55200A20204C65737365722047656E6572616C205075626C6963204C6963656E736520666F72206D6F72652064657461696C732E0A0A2020596F752073686F756C642068617665207265636569766564206120636F7079206F662074686520474E55204C65737365722047656E6572616C205075626C6963204C6963656E736520616C6F6E672077697468207468697320736F6674776172653B200A20206966206E6F742C20777269746520746F20746865204672656520536F66747761726520466F756E646174696F6E2C20496E632E2C203531204672616E6B6C696E2053742C20466966746820466C6F6F722C20426F73746F6E2C204D410A202030323131302D31333031205553412C206F7220736565207468652046534620736974653A20687474703A2F2F7777772E6673662E6F72672E0A2A2F0A7061636B616765206F72672E6A77696C64666972652E6372656174652E74696E612E766172696174696F6E3B0A0A696D706F727420737461746963206F72672E6A77696C64666972652E626173652E6D6174686C69622E4D6174684C69622E666162733B0A696D706F727420737461746963206F72672E6A77696C64666972652E626173652E6D6174686C69622E4D6174684C69622E666D6F643B0A0A696D706F7274206F72672E6A77696C64666972652E6372656174652E74696E612E626173652E4C617965723B0A696D706F7274206F72672E6A77696C64666972652E6372656174652E74696E612E626173652E58466F726D3B0A696D706F7274206F72672E6A77696C64666972652E6372656174652E74696E612E626173652E58595A506F696E743B0A0A7075626C696320636C61737320444343617270657446756E6320657874656E647320566172696174696F6E46756E63207B0A0970726976617465207374617469632066696E616C206C6F6E672073657269616C56657273696F6E554944203D20314C3B0A0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F4F524947494E203D20226F726967696E223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F434F4C4F525F41203D2022636F6C6F725F61223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F434F4C4F525F42203D2022636F6C6F725F62223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F434F4C4F525F43203D2022636F6C6F725F63223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F434F4C4F525F44203D2022636F6C6F725F64223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F434F4C4F525F45203D2022636F6C6F725F65223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F434F4C4F525F46203D2022636F6C6F725F66223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F535452455443485F58203D2022737472657463685F78223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F535452455443485F59203D2022737472657463685F79223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F5343414C455F58203D20227363616C655F78223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F5343414C455F59203D20227363616C655F79223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F5343414C455A203D20227363616C655F7A223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F4F46465345545A203D20226F66667365745F7A223B0A0970726976617465207374617469632066696E616C20537472696E6720504152414D5F52455345545A203D202272657365745F7A223B0A0A0970726976617465207374617469632066696E616C20537472696E675B5D20706172616D4E616D6573203D207B20504152414D5F4F524947494E2C20504152414D5F434F4C4F525F412C20504152414D5F434F4C4F525F422C20504152414D5F434F4C4F525F432C0A090909504152414D5F434F4C4F525F442C20504152414D5F434F4C4F525F452C20504152414D5F434F4C4F525F462C20504152414D5F535452455443485F582C20504152414D5F535452455443485F592C20504152414D5F5343414C455F582C20504152414D5F5343414C455F592C0A090909504152414D5F5343414C455A2C20504152414D5F4F46465345545A2C20504152414D5F52455345545A207D3B0A097072697661746520646F75626C65206F726967696E203D20302E353B0A097072697661746520646F75626C6520636F6C6F725F61203D20302E353B0A097072697661746520646F75626C6520636F6C6F725F62203D20312E303B0A097072697661746520646F75626C6520636F6C6F725F63203D20312E303B0A097072697661746520646F75626C6520636F6C6F725F64203D20312E303B0A097072697661746520646F75626C6520636F6C6F725F65203D20302E353B0A097072697661746520646F75626C6520636F6C6F725F66203D20312E303B0A097072697661746520646F75626C6520737472657463685F78203D20312E303B0A097072697661746520646F75626C6520737472657463685F79203D20312E303B0A097072697661746520646F75626C65207363616C655F78203D20312E303B0A097072697661746520646F75626C65207363616C655F79203D20312E303B0A097072697661746520646F75626C65207363616C655F7A203D20302E303B0A097072697661746520646F75626C65206F66667365745F7A203D20302E303B0A097072697661746520646F75626C652072657365745F7A203D20302E303B0A0A09404F766572726964650A097075626C696320766F6964207472616E73666F726D28466C616D655472616E73666F726D6174696F6E436F6E746578742070436F6E746578742C2058466F726D207058466F726D2C2058595A506F696E742070416666696E6554502C2058595A506F696E74207056617254502C0A090909646F75626C652070416D6F756E7429207B0A09092F2A0A0909202A2064635F63617270657420627920587972757330322C20687474703A2F2F61706F7068797369732D37782E6F72672F657874656E73696F6E73206164646564207661726961626C65732062790A0909202A20427261642053746566616E6F760A0909202A2F0A0909696E74207830203D202870436F6E746578742E72616E646F6D2829203C20302E3529203F202D31203A20313B0A0909696E74207930203D202870436F6E746578742E72616E646F6D2829203E20302E3529203F202D31203A20313B0A0A0909646F75626C652078203D2070416666696E6554502E78202B207830202A20737472657463685F782C2079203D2070416666696E6554502E79202B207930202A20737472657463685F793B0A0909646F75626C652078305F786F725F7930203D2028646F75626C652920287830205E207930293B0A0909646F75626C65206868203D202D48202B2028636F6C6F725F62202D2078305F786F725F793029202A20483B0A0A09097056617254502E78202B3D2070416D6F756E74202A20287058466F726D2E6765745859436F65666630302829202A2078202B207058466F726D2E6765745859436F65666631302829202A2079202B207058466F726D2E6765745859436F6566663230282929202A207363616C655F783B0A09097056617254502E79202B3D2070416D6F756E74202A20287058466F726D2E6765745859436F65666630312829202A2078202B207058466F726D2E6765745859436F65666631312829202A2079202B207058466F726D2E6765745859436F6566663231282929202A207363616C655F793B0A09097056617254502E636F6C6F72203D20666D6F642866616273287056617254502E636F6C6F72202A20636F6C6F725F61202A2028636F6C6F725F63202B20686829202B2078305F786F725F7930202A2028636F6C6F725F64202D20686829202A20636F6C6F725F65292C0A09090909636F6C6F725F66293B0A0A09096966202870436F6E746578742E697350726573657276655A436F6F7264696E617465282929207B0A0909097056617254502E7A202B3D2070416D6F756E74202A2070416666696E6554502E7A3B0A09097D0A0909646F75626C6520647A203D207056617254502E636F6C6F72202A207363616C655F7A202B206F66667365745F7A3B0A09096966202872657365745F7A203E203029207B0A0909097056617254502E7A203D20647A3B0A09097D20656C7365207B0A0909097056617254502E7A202B3D20647A3B0A09097D0A097D0A0A09404F766572726964650A097075626C696320537472696E675B5D20676574506172616D657465724E616D65732829207B0A090972657475726E20706172616D4E616D65733B0A097D0A0A09404F766572726964650A097075626C6963204F626A6563745B5D20676574506172616D6574657256616C7565732829207B0A090972657475726E206E6577204F626A6563745B5D207B206F726967696E2C20636F6C6F725F612C20636F6C6F725F622C20636F6C6F725F632C20636F6C6F725F642C20636F6C6F725F652C20636F6C6F725F662C20737472657463685F782C20737472657463685F792C0A090909097363616C655F782C207363616C655F792C207363616C655F7A2C206F66667365745F7A2C2072657365745F7A207D3B0A097D0A0A09404F766572726964650A097075626C696320766F696420736574506172616D6574657228537472696E6720704E616D652C20646F75626C65207056616C756529207B0A090969662028504152414D5F4F524947494E2E657175616C7349676E6F72654361736528704E616D652929207B0A0909096F726967696E203D207056616C75653B0A09097D20656C73652069662028504152414D5F434F4C4F525F412E657175616C7349676E6F72654361736528704E616D652929207B0A090909636F6C6F725F61203D207056616C75653B0A09097D20656C73652069662028504152414D5F434F4C4F525F422E657175616C7349676E6F72654361736528704E616D652929207B0A090909636F6C6F725F62203D207056616C75653B0A09097D20656C73652069662028504152414D5F434F4C4F525F432E657175616C7349676E6F72654361736528704E616D652929207B0A090909636F6C6F725F63203D207056616C75653B0A09097D20656C73652069662028504152414D5F434F4C4F525F442E657175616C7349676E6F72654361736528704E616D652929207B0A090909636F6C6F725F64203D207056616C75653B0A09097D20656C73652069662028504152414D5F434F4C4F525F452E657175616C7349676E6F72654361736528704E616D652929207B0A090909636F6C6F725F65203D207056616C75653B0A09097D20656C73652069662028504152414D5F434F4C4F525F462E657175616C7349676E6F72654361736528704E616D652929207B0A090909636F6C6F725F66203D207056616C75653B0A09097D20656C73652069662028504152414D5F535452455443485F582E657175616C7349676E6F72654361736528704E616D652929207B0A090909737472657463685F78203D207056616C75653B0A09097D20656C73652069662028504152414D5F535452455443485F592E657175616C7349676E6F72654361736528704E616D652929207B0A090909737472657463685F79203D207056616C75653B0A09097D20656C73652069662028504152414D5F5343414C455F582E657175616C7349676E6F72654361736528704E616D652929207B0A0909097363616C655F78203D207056616C75653B0A09097D20656C73652069662028504152414D5F5343414C455F592E657175616C7349676E6F72654361736528704E616D652929207B0A0909097363616C655F79203D207056616C75653B0A09097D20656C73652069662028504152414D5F5343414C455A2E657175616C7349676E6F72654361736528704E616D6529290A0909097363616C655F7A203D207056616C75653B0A0909656C73652069662028504152414D5F4F46465345545A2E657175616C7349676E6F72654361736528704E616D6529290A0909096F66667365745F7A203D207056616C75653B0A0909656C73652069662028504152414D5F52455345545A2E657175616C7349676E6F72654361736528704E616D6529290A09090972657365745F7A203D207056616C75653B0A0909656C7365207B0A09090953797374656D2E6F75742E7072696E746C6E2822704E616D65206E6F74207265636F676E697A65643A2022202B20704E616D65293B0A0909097468726F77206E657720496C6C6567616C417267756D656E74457863657074696F6E28704E616D65293B0A09097D0A097D0A0A09404F766572726964650A097075626C696320537472696E67206765744E616D652829207B0A090972657475726E202264635F636172706574223B0A097D0A0A097072697661746520646F75626C6520483B0A0A09404F766572726964650A097075626C696320766F696420696E697428466C616D655472616E73666F726D6174696F6E436F6E746578742070436F6E746578742C204C6179657220704C617965722C2058466F726D207058466F726D2C20646F75626C652070416D6F756E7429207B0A090948203D20302E31202A206F726967696E3B0A0A097D0A0A7D" coefs="1.0 0.0 0.0 1.0 0.0 0.0" chaos="1.0"/>
- <finalxform weight="0.0" color="0.0" symmetry="0.0" mirror_pre_post_translations="0" material="0.0" material_speed="0.0" mod_gamma="-1.0" mod_gamma_speed="-1.0" mod_contrast="1.0" mod_contrast_speed="0.0" mod_saturation="0.0" mod_saturation_speed="0.0" mod_hue="0.0" mod_hue_speed="0.0" linear3D="1.0" linear3D_fx_priority="0" coefs="1.0 0.0 0.0 1.0 0.0 0.0" chaos="1.0"/>
- <palette count="256" format="RGB">
- F9B9FDE5A7FCD196FCBD84FBA873FAB27DDFC692BBDBA697EFBB72E2B155AF853F7B5929
- 482C132209012F0A023D0A024B0B03580B035F26396542736B5FAD717BE7888CEEA997DC
- C9A2C9E9ADB7FCABA1FB9486FA7C6BFA6550F9553BFA7253FB906BFBAE83FCCB9BFCD1A0
- FCD3A3FCD5A6FCD7A9FCC99DFBB187FA9971F9B9FDE5A7FCD196FCBD84FBA873FAB27DDF
- C692BBDBA697EFBB72E2B155AF853F7B5929482C132209012F0A023D0A024B0B03580B03
- 5F26396542736B5FAD717BE7888CEEA997DCC9A2C9E9ADB7FCABA1FB9486FA7C6BFA6550
- F9553BFA7253FB906BFBAE83FCCB9BFCD1A0FCD3A3FCD5A6FCD7A9FCC99DFBB187FA9971
- F9B9FDE5A7FCD196FCBD84FBA873FAB27DDFC692BBDBA697EFBB72E2B155AF853F7B5929
- 482C132209012F0A023D0A024B0B03580B035F26396542736B5FAD717BE7888CEEA997DC
- C9A2C9E9ADB7FCABA1FB9486FA7C6BFA6550F9553BFA7253FB906BFBAE83FCCB9BFCD1A0
- FCD3A3FCD5A6FCD7A9FCC99DFBB187FA9971F9B9FDE5A7FCD196FCBD84FBA873FAB27DDF
- C692BBDBA697EFBB72E2B155AF853F7B5929482C132209012F0A023D0A024B0B03580B03
- 5F26396542736B5FAD717BE7888CEEA997DCC9A2C9E9ADB7FCABA1FB9486FA7C6BFA6550
- F9553BFA7253FB906BFBAE83FCCB9BFCD1A0FCD3A3FCD5A6FCD7A9FCC99DFBB187FA9971
- F9B9FDE5A7FCD196FCBD84FBA873FAB27DDFC692BBDBA697EFBB72E2B155AF853F7B5929
- 482C132209012F0A023D0A024B0B03580B035F26396542736B5FAD717BE7888CEEA997DC
- C9A2C9E9ADB7FCABA1FB9486FA7C6BFA6550F9553BFA7253FB906BFBAE83FCCB9BFCD1A0
- FCD3A3FCD5A6FCD7A9FCC99DFBB187FA9971F9B9FDE5A7FCD196FCBD84FBA873FAB27DDF
- C692BBDBA697EFBB72E2B155AF853F7B5929482C132209012F0A023D0A024B0B03580B03
- 5F26396542736B5FAD717BE7888CEEA997DCC9A2C9E9ADB7FCABA1FB9486FA7C6BFA6550
- F9553BFA7253FB906BFBAE83FCCB9BFCD1A0FCD3A3FCD5A6FCD7A9FCC99DFBB187FA9971
- F9805CF97C58F97854F97451 </palette>
- </flame>
- JAVA 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 static org.jwildfire.base.mathlib.MathLib.fabs;
- import static org.jwildfire.base.mathlib.MathLib.fmod;
- import org.jwildfire.create.tina.base.Layer;
- import org.jwildfire.create.tina.base.XForm;
- import org.jwildfire.create.tina.base.XYZPoint;
- public class DCCarpetFunc extends VariationFunc {
- private static final long serialVersionUID = 1L;
- private static final String PARAM_ORIGIN = "origin";
- private static final String PARAM_COLOR_A = "color_a";
- private static final String PARAM_COLOR_B = "color_b";
- private static final String PARAM_COLOR_C = "color_c";
- private static final String PARAM_COLOR_D = "color_d";
- private static final String PARAM_COLOR_E = "color_e";
- private static final String PARAM_COLOR_F = "color_f";
- private static final String PARAM_STRETCH_X = "stretch_x";
- private static final String PARAM_STRETCH_Y = "stretch_y";
- private static final String PARAM_SCALE_X = "scale_x";
- private static final String PARAM_SCALE_Y = "scale_y";
- private static final String PARAM_SCALEZ = "scale_z";
- private static final String PARAM_OFFSETZ = "offset_z";
- private static final String PARAM_RESETZ = "reset_z";
- private static final String[] paramNames = { PARAM_ORIGIN, PARAM_COLOR_A, PARAM_COLOR_B, PARAM_COLOR_C,
- PARAM_COLOR_D, PARAM_COLOR_E, PARAM_COLOR_F, PARAM_STRETCH_X, PARAM_STRETCH_Y, PARAM_SCALE_X, PARAM_SCALE_Y,
- PARAM_SCALEZ, PARAM_OFFSETZ, PARAM_RESETZ };
- private double origin = 0.5;
- private double color_a = 0.5;
- private double color_b = 1.0;
- private double color_c = 1.0;
- private double color_d = 1.0;
- private double color_e = 0.5;
- private double color_f = 1.0;
- private double stretch_x = 1.0;
- private double stretch_y = 1.0;
- private double scale_x = 1.0;
- private double scale_y = 1.0;
- private double scale_z = 0.0;
- private double offset_z = 0.0;
- private double reset_z = 0.0;
- @Override
- public void transform(FlameTransformationContext pContext, XForm pXForm, XYZPoint pAffineTP, XYZPoint pVarTP,
- double pAmount) {
- /*
- * dc_carpet by Xyrus02, http://apophysis-7x.org/extensions added variables by
- * Brad Stefanov
- */
- int x0 = (pContext.random() < 0.5) ? -1 : 1;
- int y0 = (pContext.random() > 0.5) ? -1 : 1;
- double x = pAffineTP.x + x0 * stretch_x, y = pAffineTP.y + y0 * stretch_y;
- double x0_xor_y0 = (double) (x0 ^ y0);
- double hh = -H + (color_b - x0_xor_y0) * H;
- pVarTP.x += pAmount * (pXForm.getXYCoeff00() * x + pXForm.getXYCoeff10() * y + pXForm.getXYCoeff20()) * scale_x;
- pVarTP.y += pAmount * (pXForm.getXYCoeff01() * x + pXForm.getXYCoeff11() * y + pXForm.getXYCoeff21()) * scale_y;
- pVarTP.color = fmod(fabs(pVarTP.color * color_a * (color_c + hh) + x0_xor_y0 * (color_d - hh) * color_e),
- color_f);
- if (pContext.isPreserveZCoordinate()) {
- pVarTP.z += pAmount * pAffineTP.z;
- }
- double dz = pVarTP.color * scale_z + offset_z;
- if (reset_z > 0) {
- pVarTP.z = dz;
- } else {
- pVarTP.z += dz;
- }
- }
- @Override
- public String[] getParameterNames() {
- return paramNames;
- }
- @Override
- public Object[] getParameterValues() {
- return new Object[] { origin, color_a, color_b, color_c, color_d, color_e, color_f, stretch_x, stretch_y,
- scale_x, scale_y, scale_z, offset_z, reset_z };
- }
- @Override
- public void setParameter(String pName, double pValue) {
- if (PARAM_ORIGIN.equalsIgnoreCase(pName)) {
- origin = pValue;
- } else if (PARAM_COLOR_A.equalsIgnoreCase(pName)) {
- color_a = pValue;
- } else if (PARAM_COLOR_B.equalsIgnoreCase(pName)) {
- color_b = pValue;
- } else if (PARAM_COLOR_C.equalsIgnoreCase(pName)) {
- color_c = pValue;
- } else if (PARAM_COLOR_D.equalsIgnoreCase(pName)) {
- color_d = pValue;
- } else if (PARAM_COLOR_E.equalsIgnoreCase(pName)) {
- color_e = pValue;
- } else if (PARAM_COLOR_F.equalsIgnoreCase(pName)) {
- color_f = pValue;
- } else if (PARAM_STRETCH_X.equalsIgnoreCase(pName)) {
- stretch_x = pValue;
- } else if (PARAM_STRETCH_Y.equalsIgnoreCase(pName)) {
- stretch_y = pValue;
- } else if (PARAM_SCALE_X.equalsIgnoreCase(pName)) {
- scale_x = pValue;
- } else if (PARAM_SCALE_Y.equalsIgnoreCase(pName)) {
- scale_y = pValue;
- } else if (PARAM_SCALEZ.equalsIgnoreCase(pName))
- scale_z = pValue;
- else if (PARAM_OFFSETZ.equalsIgnoreCase(pName))
- offset_z = pValue;
- else if (PARAM_RESETZ.equalsIgnoreCase(pName))
- reset_z = pValue;
- else {
- System.out.println("pName not recognized: " + pName);
- throw new IllegalArgumentException(pName);
- }
- }
- @Override
- public String getName() {
- return "dc_carpet";
- }
- private double H;
- @Override
- public void init(FlameTransformationContext pContext, Layer pLayer, XForm pXForm, double pAmount) {
- H = 0.1 * origin;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement