Advertisement
snicker02

Complex Custom variation

Nov 14th, 2017
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.14 KB | None | 0 0
  1. /*
  2. JWildfire - an image and animation processor written in Java
  3. Copyright (C) 1995-2011 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 static org.jwildfire.base.mathlib.MathLib.cos;
  20. import static org.jwildfire.base.mathlib.MathLib.cosh;
  21. import static org.jwildfire.base.mathlib.MathLib.exp;
  22. import static org.jwildfire.base.mathlib.MathLib.sin;
  23. import static org.jwildfire.base.mathlib.MathLib.sinh;
  24.  
  25. import org.jwildfire.create.tina.base.XForm;
  26. import org.jwildfire.create.tina.base.XYZPoint;
  27.  
  28. public class ComplexFunc extends VariationFunc {
  29. private static final long serialVersionUID = 1L;
  30.  
  31. private static final String PARAM_COSPOW = "cospow";
  32. private static final String PARAM_COSX1 = "cosx1";
  33. private static final String PARAM_COSX2 = "cosx2";
  34. private static final String PARAM_COSY1 = "cosy1";
  35. private static final String PARAM_COSY2 = "cosy2";
  36.  
  37. private static final String PARAM_COSHPOW = "coshpow";
  38. private static final String PARAM_COSHX1 = "coshx1";
  39. private static final String PARAM_COSHX2 = "coshx2";
  40. private static final String PARAM_COSHY1 = "coshy1";
  41. private static final String PARAM_COSHY2 = "coshy2";
  42.  
  43. private static final String PARAM_COTPOW = "cotpow";
  44. private static final String PARAM_COTX1 = "cotx1";
  45. private static final String PARAM_COTX2 = "cotx2";
  46. private static final String PARAM_COTY1 = "coty1";
  47. private static final String PARAM_COTY2 = "coty2";
  48.  
  49. private static final String PARAM_COTHPOW = "cothpow";
  50. private static final String PARAM_COTHX1 = "cothx1";
  51. private static final String PARAM_COTHX2 = "cothx2";
  52. private static final String PARAM_COTHY1 = "cothy1";
  53. private static final String PARAM_COTHY2 = "cothy2";
  54.  
  55. private static final String PARAM_CSCPOW = "cscpow";
  56. private static final String PARAM_CSCX1 = "cscx1";
  57. private static final String PARAM_CSCX2 = "cscx2";
  58. private static final String PARAM_CSCY1 = "cscy1";
  59. private static final String PARAM_CSCY2 = "cscy2";
  60.  
  61. private static final String PARAM_CSCHPOW = "cschpow";
  62. private static final String PARAM_CSCHX1 = "cschx1";
  63. private static final String PARAM_CSCHX2 = "cschx2";
  64. private static final String PARAM_CSCHY1 = "cschy1";
  65. private static final String PARAM_CSCHY2 = "cschy2";
  66.  
  67. private static final String PARAM_EXPPOW = "exppow";
  68. private static final String PARAM_EXPX1 = "expx1";
  69. private static final String PARAM_EXPY1 = "expy1";
  70. private static final String PARAM_EXPY2 = "expy2";
  71.  
  72. private static final String PARAM_SECPOW = "secpow";
  73. private static final String PARAM_SECX1 = "secx1";
  74. private static final String PARAM_SECX2 = "secx2";
  75. private static final String PARAM_SECY1 = "secy1";
  76. private static final String PARAM_SECY2 = "secy2";
  77.  
  78. private static final String PARAM_SECHPOW = "sechpow";
  79. private static final String PARAM_SECHX1 = "sechx1";
  80. private static final String PARAM_SECHX2 = "sechx2";
  81. private static final String PARAM_SECHY1 = "sechy1";
  82. private static final String PARAM_SECHY2 = "sechy2";
  83.  
  84. private static final String PARAM_SINPOW = "sinpow";
  85. private static final String PARAM_SINX1 = "sinx1";
  86. private static final String PARAM_SINX2 = "sinx2";
  87. private static final String PARAM_SINY1 = "siny1";
  88. private static final String PARAM_SINY2 = "siny2";
  89.  
  90. private static final String PARAM_SINHPOW = "sinhpow";
  91. private static final String PARAM_SINHX1 = "sinhx1";
  92. private static final String PARAM_SINHX2 = "sinhx2";
  93. private static final String PARAM_SINHY1 = "sinhy1";
  94. private static final String PARAM_SINHY2 = "sinhy2";
  95.  
  96. private static final String PARAM_TANPOW = "tanpow";
  97. private static final String PARAM_TANX1 = "tanx1";
  98. private static final String PARAM_TANX2 = "tanx2";
  99. private static final String PARAM_TANY1 = "tany1";
  100. private static final String PARAM_TANY2 = "tany2";
  101.  
  102. private static final String PARAM_TANHPOW = "tanhpow";
  103. private static final String PARAM_TANHX1 = "tanhx1";
  104. private static final String PARAM_TANHX2 = "tanhx2";
  105. private static final String PARAM_TANHY1 = "tanhy1";
  106. private static final String PARAM_TANHY2 = "tanhy2";
  107.  
  108. private static final String[] paramNames = { PARAM_COSPOW, PARAM_COSX1,
  109. PARAM_COSX2, PARAM_COSY1, PARAM_COSY2, PARAM_COSHPOW, PARAM_COSHX1,
  110. PARAM_COSHX2, PARAM_COSHY1, PARAM_COSHY2, PARAM_COTPOW,
  111. PARAM_COTX1, PARAM_COTX2, PARAM_COTY1, PARAM_COTY2, PARAM_COTHPOW,
  112. PARAM_COTHX1, PARAM_COTHX2, PARAM_COTHY1, PARAM_COTHY2,
  113. PARAM_CSCPOW, PARAM_CSCX1, PARAM_CSCX2, PARAM_CSCY1, PARAM_CSCY2,
  114. PARAM_CSCHPOW, PARAM_CSCHX1, PARAM_CSCHX2, PARAM_CSCHY1,
  115. PARAM_CSCHY2, PARAM_EXPPOW, PARAM_EXPX1, PARAM_EXPY1, PARAM_EXPY2,
  116. PARAM_SECPOW, PARAM_SECX1, PARAM_SECX2, PARAM_SECY1, PARAM_SECY2,
  117. PARAM_SECHPOW, PARAM_SECHX1, PARAM_SECHX2, PARAM_SECHY1,
  118. PARAM_SECHY2, PARAM_SINPOW, PARAM_SINX1, PARAM_SINX2, PARAM_SINY1,
  119. PARAM_SINY2, PARAM_SINHPOW, PARAM_SINHX1, PARAM_SINHX2,
  120. PARAM_SINHY1, PARAM_SINHY2, PARAM_TANPOW, PARAM_TANX1, PARAM_TANX2,
  121. PARAM_TANY1, PARAM_TANY2, PARAM_TANHPOW, PARAM_TANHX1,
  122. PARAM_TANHX2, PARAM_TANHY1, PARAM_TANHY2 };
  123. private double cospow = 1.0;
  124. private double cosx1 = 1.0;
  125. private double cosx2 = 1.0;
  126. private double cosy1 = 1.0;
  127. private double cosy2 = 1.0;
  128.  
  129. private double coshpow = 0.0;
  130. private double coshx1 = 1.0;
  131. private double coshx2 = 1.0;
  132. private double coshy1 = 1.0;
  133. private double coshy2 = 1.0;
  134.  
  135. private double cotpow = 0.0;
  136. private double cotx1 = 2.0;
  137. private double cotx2 = 2.0;
  138. private double coty1 = 2.0;
  139. private double coty2 = 2.0;
  140.  
  141. private double cothpow = 0.0;
  142. private double cothx1 = 2.0;
  143. private double cothx2 = 2.0;
  144. private double cothy1 = 2.0;
  145. private double cothy2 = 2.0;
  146.  
  147. private double cscpow = 0.0;
  148. private double cscx1 = 1.0;
  149. private double cscx2 = 1.0;
  150. private double cscy1 = 1.0;
  151. private double cscy2 = 1.0;
  152.  
  153. private double cschpow = 0.0;
  154. private double cschx1 = 1.0;
  155. private double cschx2 = 1.0;
  156. private double cschy1 = 1.0;
  157. private double cschy2 = 1.0;
  158.  
  159. private double exppow = 0.0;
  160. private double expx1 = 1.0;
  161. private double expy1 = 1.0;
  162. private double expy2 = 1.0;
  163.  
  164. private double secpow = 0.0;
  165. private double secx1 = 1.0;
  166. private double secx2 = 1.0;
  167. private double secy1 = 1.0;
  168. private double secy2 = 1.0;
  169.  
  170. private double sechpow = 0.0;
  171. private double sechx1 = 1.0;
  172. private double sechx2 = 1.0;
  173. private double sechy1 = 1.0;
  174. private double sechy2 = 1.0;
  175.  
  176. private double sinpow = 0.0;
  177. private double sinx1 = 1.0;
  178. private double sinx2 = 1.0;
  179. private double siny1 = 1.0;
  180. private double siny2 = 1.0;
  181.  
  182. private double sinhpow = 0.0;
  183. private double sinhx1 = 1.0;
  184. private double sinhx2 = 1.0;
  185. private double sinhy1 = 1.0;
  186. private double sinhy2 = 1.0;
  187.  
  188. private double tanpow = 0.0;
  189. private double tanx1 = 2.0;
  190. private double tanx2 = 2.0;
  191. private double tany1 = 2.0;
  192. private double tany2 = 2.0;
  193.  
  194. private double tanhpow = 0.0;
  195. private double tanhx1 = 2.0;
  196. private double tanhx2 = 2.0;
  197. private double tanhy1 = 2.0;
  198. private double tanhy2 = 2.0;
  199.  
  200. @Override
  201. public void transform(FlameTransformationContext pContext, XForm pXForm,
  202. XYZPoint pAffineTP, XYZPoint pVarTP, double pAmount) {
  203. /* complex vars by cothe */
  204. /* exp log sin cos tan sec csc cot sinh cosh tanh sech csch coth */
  205. /* Variables and combination by Brad Stefanov */
  206.  
  207. double x = 0.0, y = 0.0;
  208.  
  209. if (cospow != 0) {
  210. double cossin = sin(pAffineTP.x * cosx1);
  211. double coscos = cos(pAffineTP.x * cosx2);
  212. double cossinh = sinh(pAffineTP.y * cosy1);
  213. double coscosh = cosh(pAffineTP.y * cosy2);
  214. x += cospow * coscos * coscosh;
  215. y -= cospow * cossin * cossinh;
  216. }
  217.  
  218. if (coshpow != 0) {
  219. double coshsin = sin(pAffineTP.y * coshy1);
  220. double coshcos = cos(pAffineTP.y * coshy2);
  221. double coshsinh = sinh(pAffineTP.x * coshx1);
  222. double coshcosh = cosh(pAffineTP.x * coshx2);
  223. x += coshpow * coshcosh * coshcos;
  224. y += coshpow * coshsinh * coshsin;
  225. }
  226. if (cotpow != 0) {
  227. double cotsin = sin(cotx1 * pAffineTP.x);
  228. double cotcos = cos(cotx2 * pAffineTP.x);
  229. double cotsinh = sinh(coty1 * pAffineTP.y);
  230. double cotcosh = cosh(coty2 * pAffineTP.y);
  231. double cotden = 1.0 / (cotcosh - cotcos);
  232. x += cotpow * cotden * cotsin;
  233. y -= cotpow * cotden * cotsinh;
  234. }
  235. if (cothpow != 0) {
  236. double cothsin = sin(cothy1 * pAffineTP.y);
  237. double cothcos = cos(cothy2 * pAffineTP.y);
  238. double cothsinh = sinh(cothx1 * pAffineTP.x);
  239. double cothcosh = cosh(cothx2 * pAffineTP.x);
  240. double cothd = (cothcosh - cothcos);
  241. if (cothd == 0)
  242. return;
  243. double cothden = 1.0 / cothd;
  244. x += cothpow * cothden * cothsinh;
  245. y += cothpow * cothden * cothsin;
  246. }
  247. if (cscpow != 0) {
  248. double cscsin = sin(pAffineTP.x * cscx1);
  249. double csccos = cos(pAffineTP.x * cscx2);
  250. double cscsinh = sinh(pAffineTP.y * cscy1);
  251. double csccosh = cosh(pAffineTP.y * cscy2);
  252. double cscd = (cosh(2.0 * pAffineTP.y) - cos(2.0 * pAffineTP.x));
  253. if (cscd == 0) {
  254. return;
  255. }
  256. double cscden = 2.0 / cscd;
  257. x += cscpow * cscden * cscsin * csccosh;
  258. y -= cscpow * cscden * csccos * cscsinh;
  259.  
  260. }
  261.  
  262. if (cschpow != 0) {
  263. double cschsin = sin(pAffineTP.y * cschy1);
  264. double cschcos = cos(pAffineTP.y * cschy2);
  265. double cschsinh = sinh(pAffineTP.x * cschx1);
  266. double cschcosh = cosh(pAffineTP.x * cschx2);
  267. double cschd = (cosh(2.0 * pAffineTP.x) - cos(2.0 * pAffineTP.y));
  268. if (cschd == 0) {
  269. return;
  270. }
  271. double cschden = 2.0 / cschd;
  272. x += cschpow * cschden * cschsinh * cschcos;
  273. y -= cschpow * cschden * cschcosh * cschsin;
  274. }
  275.  
  276. if (exppow != 0) {
  277. double expe = exp(pAffineTP.x * expx1);
  278. double expsin = sin(pAffineTP.y * expy1);
  279. double expcos = cos(pAffineTP.y * expy2);
  280. x += exppow * expe * expcos;
  281. y += exppow * expe * expsin;
  282.  
  283. }
  284. if (secpow != 0) {
  285.  
  286. double secsin = sin(pAffineTP.x * secx1);
  287. double seccos = cos(pAffineTP.x * secx2);
  288. double secsinh = sinh(pAffineTP.y * secy1);
  289. double seccosh = cosh(pAffineTP.y * secy2);
  290. double secd = (cos(2.0 * pAffineTP.x) + cosh(2.0 * pAffineTP.y));
  291. if (secd == 0) {
  292. return;
  293. }
  294. double secden = 2.0 / secd;
  295. x += secpow * secden * seccos * seccosh;
  296. y += secpow * secden * secsin * secsinh;
  297. }
  298.  
  299. if (sechpow != 0) {
  300. double sechsinh = sin(pAffineTP.y * sechy1);
  301. double sechcosh = cos(pAffineTP.y * sechy2);
  302. double sechsin = sinh(pAffineTP.x * sechx1);
  303. double sechcos = cosh(pAffineTP.x * sechx2);
  304. double sechd = (cos(2.0 * pAffineTP.y) + cosh(2.0 * pAffineTP.x));
  305. if (sechd == 0) {
  306. return;
  307. }
  308. double sechden = 2.0 / sechd;
  309. x += sechpow * sechden * sechcos * sechcosh;
  310. y -= sechpow * sechden * sechsin * sechsinh;
  311. }
  312.  
  313. if (tanpow != 0) {
  314. double tansin = sin(tanx1 * pAffineTP.x);
  315. double tancos = cos(tanx2 * pAffineTP.x);
  316. double tansinh = sinh(tany1 * pAffineTP.y);
  317. double tancosh = cosh(tany2 * pAffineTP.y);
  318. double tand = (tancos + tancosh);
  319. if (tand == 0) {
  320. return;
  321. }
  322. double tanden = 1.0 / tand;
  323. x += tanpow * tanden * tansin;
  324. y += tanpow * tanden * tansinh;
  325. }
  326. if (tanhpow != 0) {
  327. double tanhsin = sin(pAffineTP.y * tanhy1);
  328. double tanhcos = cos(pAffineTP.y * tanhy2);
  329. double tanhsinh = sinh(pAffineTP.x * tanhx1);
  330. double tanhcosh = cosh(pAffineTP.x * tanhx2);
  331. double tanhd = (tanhcos + tanhcosh);
  332. if (tanhd == 0) {
  333. return;
  334. }
  335. double tanhden = 1.0 / tanhd;
  336. x += tanhpow * tanhden * tanhsinh;
  337. y += tanhpow * tanhden * tanhsin;
  338. }
  339. if (sinpow != 0) {
  340. double sinsin = sin(pAffineTP.x * sinx1);
  341. double sincos = cos(pAffineTP.x * sinx2);
  342. double sinsinh = sinh(pAffineTP.y * siny1);
  343. double sincosh = cosh(pAffineTP.y * siny2);
  344. x += sinpow * sinsin * sincosh;
  345. y += sinpow * sincos * sinsinh;
  346. }
  347. if (sinhpow != 0) {
  348. double sinhsin = sin(pAffineTP.y * sinhy1);
  349. double sinhcos = cos(pAffineTP.y * sinhy2);
  350. double sinhsinh = sinh(pAffineTP.x * sinhx1);
  351. double sinhcosh = cosh(pAffineTP.x * sinhx2);
  352. x += sinhpow * sinhsinh * sinhcos;
  353. y += sinhpow * sinhcosh * sinhsin;
  354. }
  355. pVarTP.x += pAmount * x;
  356. pVarTP.y += pAmount * y;
  357.  
  358. if (pContext.isPreserveZCoordinate()) {
  359. pVarTP.z += pAmount * pAffineTP.z;
  360. }
  361.  
  362. }
  363.  
  364. @Override
  365. public String[] getParameterNames() {
  366. return paramNames;
  367. }
  368.  
  369. @Override
  370. public Object[] getParameterValues() {
  371. return new Object[] { cospow, cosx1, cosx2, cosy1, cosy2, coshpow,
  372. coshx1, coshx2, coshy1, coshy2, cotpow, cotx1, cotx2, coty1,
  373. coty2, cothpow, cothx1, cothx2, cothy1, cothy2, cscpow, cscx1,
  374. cscx2, cscy1, cscy2, cschpow, cschx1, cschx2, cschy1, cschy2,
  375. exppow, expx1, expy1, expy2, secpow, secx1, secx2, secy1,
  376. secy2, sechpow, sechx1, sechx2, sechy1, sechy2, sinpow, sinx1,
  377. sinx2, siny1, siny2, sinhpow, sinhx1, sinhx2, sinhy1, sinhy2,
  378. tanpow, tanx1, tanx2, tany1, tany2, tanhpow, tanhx1, tanhx2,
  379. tanhy1, tanhy2 };
  380. }
  381.  
  382. @Override
  383. public void setParameter(String pName, double pValue) {
  384. if (PARAM_COSPOW.equalsIgnoreCase(pName))
  385. cospow = pValue;
  386. else if (PARAM_COSX1.equalsIgnoreCase(pName))
  387. cosx1 = pValue;
  388. else if (PARAM_COSX2.equalsIgnoreCase(pName))
  389. cosx2 = pValue;
  390. else if (PARAM_COSY1.equalsIgnoreCase(pName))
  391. cosy1 = pValue;
  392. else if (PARAM_COSY2.equalsIgnoreCase(pName))
  393. cosy2 = pValue;
  394. else if (PARAM_COSHPOW.equalsIgnoreCase(pName))
  395. coshpow = pValue;
  396. else if (PARAM_COSHX1.equalsIgnoreCase(pName))
  397. coshx1 = pValue;
  398. else if (PARAM_COSHX2.equalsIgnoreCase(pName))
  399. coshx2 = pValue;
  400. else if (PARAM_COSHY1.equalsIgnoreCase(pName))
  401. coshy1 = pValue;
  402. else if (PARAM_COSHY2.equalsIgnoreCase(pName))
  403. coshy2 = pValue;
  404. else if (PARAM_COTPOW.equalsIgnoreCase(pName))
  405. cotpow = pValue;
  406. else if (PARAM_COTX1.equalsIgnoreCase(pName))
  407. cotx1 = pValue;
  408. else if (PARAM_COTX2.equalsIgnoreCase(pName))
  409. cotx2 = pValue;
  410. else if (PARAM_COTY1.equalsIgnoreCase(pName))
  411. coty1 = pValue;
  412. else if (PARAM_COTY2.equalsIgnoreCase(pName))
  413. coty2 = pValue;
  414. else if (PARAM_COTHPOW.equalsIgnoreCase(pName))
  415. cothpow = pValue;
  416. else if (PARAM_COTHX1.equalsIgnoreCase(pName))
  417. cothx1 = pValue;
  418. else if (PARAM_COTHX2.equalsIgnoreCase(pName))
  419. cothx2 = pValue;
  420. else if (PARAM_COTHY1.equalsIgnoreCase(pName))
  421. cothy1 = pValue;
  422. else if (PARAM_COTHY2.equalsIgnoreCase(pName))
  423. cothy2 = pValue;
  424. else if (PARAM_CSCPOW.equalsIgnoreCase(pName))
  425. cscpow = pValue;
  426. else if (PARAM_CSCX1.equalsIgnoreCase(pName))
  427. cscx1 = pValue;
  428. else if (PARAM_CSCX2.equalsIgnoreCase(pName))
  429. cscx2 = pValue;
  430. else if (PARAM_CSCY1.equalsIgnoreCase(pName))
  431. cscy1 = pValue;
  432. else if (PARAM_CSCY2.equalsIgnoreCase(pName))
  433. cscy2 = pValue;
  434. else if (PARAM_CSCHPOW.equalsIgnoreCase(pName))
  435. cschpow = pValue;
  436. else if (PARAM_CSCHX1.equalsIgnoreCase(pName))
  437. cschx1 = pValue;
  438. else if (PARAM_CSCHX2.equalsIgnoreCase(pName))
  439. cschx2 = pValue;
  440. else if (PARAM_CSCHY1.equalsIgnoreCase(pName))
  441. cschy1 = pValue;
  442. else if (PARAM_CSCHY2.equalsIgnoreCase(pName))
  443. cschy2 = pValue;
  444. else if (PARAM_EXPPOW.equalsIgnoreCase(pName))
  445. exppow = pValue;
  446. else if (PARAM_EXPX1.equalsIgnoreCase(pName))
  447. expx1 = pValue;
  448. else if (PARAM_EXPY1.equalsIgnoreCase(pName))
  449. expy1 = pValue;
  450. else if (PARAM_EXPY2.equalsIgnoreCase(pName))
  451. expy2 = pValue;
  452. else if (PARAM_SECPOW.equalsIgnoreCase(pName))
  453. secpow = pValue;
  454. else if (PARAM_SECX1.equalsIgnoreCase(pName))
  455. secx1 = pValue;
  456. else if (PARAM_SECX2.equalsIgnoreCase(pName))
  457. secx2 = pValue;
  458. else if (PARAM_SECY1.equalsIgnoreCase(pName))
  459. secy1 = pValue;
  460. else if (PARAM_SECY2.equalsIgnoreCase(pName))
  461. secy2 = pValue;
  462. else if (PARAM_SECHPOW.equalsIgnoreCase(pName))
  463. sechpow = pValue;
  464. else if (PARAM_SECHX1.equalsIgnoreCase(pName))
  465. sechx1 = pValue;
  466. else if (PARAM_SECHX2.equalsIgnoreCase(pName))
  467. sechx2 = pValue;
  468. else if (PARAM_SECHY1.equalsIgnoreCase(pName))
  469. sechy1 = pValue;
  470. else if (PARAM_SECHY2.equalsIgnoreCase(pName))
  471. sechy2 = pValue;
  472. else if (PARAM_SINPOW.equalsIgnoreCase(pName))
  473. sinpow = pValue;
  474. else if (PARAM_SINX1.equalsIgnoreCase(pName))
  475. sinx1 = pValue;
  476. else if (PARAM_SINX2.equalsIgnoreCase(pName))
  477. sinx2 = pValue;
  478. else if (PARAM_SINY1.equalsIgnoreCase(pName))
  479. siny1 = pValue;
  480. else if (PARAM_SINY2.equalsIgnoreCase(pName))
  481. siny2 = pValue;
  482. else if (PARAM_SINHPOW.equalsIgnoreCase(pName))
  483. sinhpow = pValue;
  484. else if (PARAM_SINHX1.equalsIgnoreCase(pName))
  485. sinhx1 = pValue;
  486. else if (PARAM_SINHX2.equalsIgnoreCase(pName))
  487. sinhx2 = pValue;
  488. else if (PARAM_SINHY1.equalsIgnoreCase(pName))
  489. sinhy1 = pValue;
  490. else if (PARAM_SINHY2.equalsIgnoreCase(pName))
  491. sinhy2 = pValue;
  492. else if (PARAM_TANPOW.equalsIgnoreCase(pName))
  493. tanpow = pValue;
  494. else if (PARAM_TANX1.equalsIgnoreCase(pName))
  495. tanx1 = pValue;
  496. else if (PARAM_TANX2.equalsIgnoreCase(pName))
  497. tanx2 = pValue;
  498. else if (PARAM_TANY1.equalsIgnoreCase(pName))
  499. tany1 = pValue;
  500. else if (PARAM_TANY2.equalsIgnoreCase(pName))
  501. tany2 = pValue;
  502. else if (PARAM_TANHPOW.equalsIgnoreCase(pName))
  503. tanhpow = pValue;
  504. else if (PARAM_TANHX1.equalsIgnoreCase(pName))
  505. tanhx1 = pValue;
  506. else if (PARAM_TANHX2.equalsIgnoreCase(pName))
  507. tanhx2 = pValue;
  508. else if (PARAM_TANHY1.equalsIgnoreCase(pName))
  509. tanhy1 = pValue;
  510. else if (PARAM_TANHY2.equalsIgnoreCase(pName))
  511. tanhy2 = pValue;
  512. else
  513. throw new IllegalArgumentException(pName);
  514. }
  515.  
  516. @Override
  517. public String getName() {
  518. return "complex";
  519. }
  520.  
  521. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement