コード例 #1
0
ファイル: latoomutalpha.c プロジェクト: kmatheussen/libpd
void *latoomutalpha_new(t_symbol *s, int argc, t_atom *argv) {
	latoomutalpha_struct *latoomutalpha = (latoomutalpha_struct *) pd_new(latoomutalpha_class);
	if (latoomutalpha != NULL) {
		outlet_new(&latoomutalpha -> x_obj, &s_float);
		latoomutalpha -> outlets[0] = outlet_new(&latoomutalpha -> x_obj, &s_float);
		latoomutalpha -> search_outlet = outlet_new(&latoomutalpha -> x_obj, &s_list);
		latoomutalpha -> vars_outlet = outlet_new(&latoomutalpha -> x_obj, &s_list);
		latoomutalpha -> params_outlet = outlet_new(&latoomutalpha -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			latoomutalpha -> vars_init[M_x] = latoomutalpha -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			latoomutalpha -> vars_init[M_y] = latoomutalpha -> vars[M_y] = (double) atom_getfloatarg(1, argc, argv);
			latoomutalpha -> a = (double) atom_getfloatarg(2, argc, argv);
			latoomutalpha -> b = (double) atom_getfloatarg(3, argc, argv);
			latoomutalpha -> c = (double) atom_getfloatarg(4, argc, argv);
			latoomutalpha -> d = (double) atom_getfloatarg(5, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for latoomutalpha fractal. Expecting 6 arguments.");
			}
			latoomutalpha -> vars_init[M_x] = 0.1;
			latoomutalpha -> vars_init[M_y] = 0.1;
			latoomutalpha -> a = 1;
			latoomutalpha -> b = 1;
			latoomutalpha -> c = 1;
			latoomutalpha -> d = 1;
		}
		constrain(latoomutalpha, NULL, 0, NULL);
		lyap(latoomutalpha, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)latoomutalpha;
}
コード例 #2
0
ファイル: rossler.c プロジェクト: kmatheussen/libpd
void *rossler_new(t_symbol *s, int argc, t_atom *argv) {
	rossler_struct *rossler = (rossler_struct *) pd_new(rossler_class);
	if (rossler != NULL) {
		outlet_new(&rossler -> x_obj, &s_float);
		rossler -> outlets[0] = outlet_new(&rossler -> x_obj, &s_float);
		rossler -> outlets[1] = outlet_new(&rossler -> x_obj, &s_float);
		rossler -> search_outlet = outlet_new(&rossler -> x_obj, &s_list);
		rossler -> vars_outlet = outlet_new(&rossler -> x_obj, &s_list);
		rossler -> params_outlet = outlet_new(&rossler -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			rossler -> vars_init[M_x] = rossler -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			rossler -> vars_init[M_y] = rossler -> vars[M_y] = (double) atom_getfloatarg(1, argc, argv);
			rossler -> vars_init[M_z] = rossler -> vars[M_z] = (double) atom_getfloatarg(2, argc, argv);
			rossler -> h = (double) atom_getfloatarg(3, argc, argv);
			rossler -> a = (double) atom_getfloatarg(4, argc, argv);
			rossler -> b = (double) atom_getfloatarg(5, argc, argv);
			rossler -> c = (double) atom_getfloatarg(6, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for rossler fractal. Expecting 7 arguments.");
			}
			rossler -> vars_init[M_x] = 0.1;
			rossler -> vars_init[M_y] = 0;
			rossler -> vars_init[M_z] = 0;
			rossler -> h = 0.01;
			rossler -> a = 0.2;
			rossler -> b = 0.2;
			rossler -> c = 5.7;
		}
		constrain(rossler, NULL, 0, NULL);
		lyap(rossler, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)rossler;
}
コード例 #3
0
ファイル: dejong.c プロジェクト: Angeldude/pd
void *dejong_new(t_symbol *s, int argc, t_atom *argv) {
	dejong_struct *dejong = (dejong_struct *) pd_new(dejong_class);
	if (dejong != NULL) {
		outlet_new(&dejong -> x_obj, &s_float);
		dejong -> outlets[0] = outlet_new(&dejong -> x_obj, &s_float);
		dejong -> search_outlet = outlet_new(&dejong -> x_obj, &s_list);
		dejong -> vars_outlet = outlet_new(&dejong -> x_obj, &s_list);
		dejong -> params_outlet = outlet_new(&dejong -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			dejong -> vars_init[M_x] = dejong -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			dejong -> vars_init[M_y] = dejong -> vars[M_y] = (double) atom_getfloatarg(1, argc, argv);
			dejong -> a = (double) atom_getfloatarg(2, argc, argv);
			dejong -> b = (double) atom_getfloatarg(3, argc, argv);
			dejong -> c = (double) atom_getfloatarg(4, argc, argv);
			dejong -> d = (double) atom_getfloatarg(5, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for dejong fractal. Expecting 6 arguments.");
			}
			dejong -> vars_init[M_x] = 0.01;
			dejong -> vars_init[M_y] = 0;
			dejong -> a = -2.24;
			dejong -> b = -0.65;
			dejong -> c = 0.43;
			dejong -> d = -2.43;
		}
		constrain(dejong, NULL, 0, NULL);
		lyap(dejong, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)dejong;
}
コード例 #4
0
ファイル: pickover.c プロジェクト: MatiasDelera/pd-macambira
void *pickover_new(t_symbol *s, int argc, t_atom *argv) {
	pickover_struct *pickover = (pickover_struct *) pd_new(pickover_class);
	if (pickover != NULL) {
		outlet_new(&pickover -> x_obj, &s_float);
		pickover -> outlets[0] = outlet_new(&pickover -> x_obj, &s_float);
		pickover -> outlets[1] = outlet_new(&pickover -> x_obj, &s_float);
		pickover -> search_outlet = outlet_new(&pickover -> x_obj, &s_list);
		pickover -> vars_outlet = outlet_new(&pickover -> x_obj, &s_list);
		pickover -> params_outlet = outlet_new(&pickover -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			pickover -> vars_init[M_x] = pickover -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			pickover -> vars_init[M_y] = pickover -> vars[M_y] = (double) atom_getfloatarg(1, argc, argv);
			pickover -> vars_init[M_z] = pickover -> vars[M_z] = (double) atom_getfloatarg(2, argc, argv);
			pickover -> a = (double) atom_getfloatarg(3, argc, argv);
			pickover -> b = (double) atom_getfloatarg(4, argc, argv);
			pickover -> c = (double) atom_getfloatarg(5, argc, argv);
			pickover -> d = (double) atom_getfloatarg(6, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for pickover fractal. Expecting 7 arguments.");
			}
			pickover -> vars_init[M_x] = 0.01;
			pickover -> vars_init[M_y] = 0;
			pickover -> vars_init[M_z] = 0;
			pickover -> a = 2.24;
			pickover -> b = 0.43;
			pickover -> c = -0.65;
			pickover -> d = -2.43;
		}
		constrain(pickover, NULL, 0, NULL);
		lyap(pickover, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)pickover;
}
コード例 #5
0
ファイル: popcorn.c プロジェクト: kmatheussen/libpd
void *popcorn_new(t_symbol *s, int argc, t_atom *argv) {
	popcorn_struct *popcorn = (popcorn_struct *) pd_new(popcorn_class);
	if (popcorn != NULL) {
		outlet_new(&popcorn -> x_obj, &s_float);
		popcorn -> outlets[0] = outlet_new(&popcorn -> x_obj, &s_float);
		popcorn -> search_outlet = outlet_new(&popcorn -> x_obj, &s_list);
		popcorn -> vars_outlet = outlet_new(&popcorn -> x_obj, &s_list);
		popcorn -> params_outlet = outlet_new(&popcorn -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			popcorn -> vars_init[M_x] = popcorn -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			popcorn -> vars_init[M_y] = popcorn -> vars[M_y] = (double) atom_getfloatarg(1, argc, argv);
			popcorn -> h = (double) atom_getfloatarg(2, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for popcorn fractal. Expecting 3 arguments.");
			}
			popcorn -> vars_init[M_x] = 0;
			popcorn -> vars_init[M_y] = 0;
			popcorn -> h = 0.05;
		}
		constrain(popcorn, NULL, 0, NULL);
		lyap(popcorn, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)popcorn;
}
コード例 #6
0
ファイル: ikeda.c プロジェクト: MatiasDelera/pd-macambira
void *ikeda_new(t_symbol *s, int argc, t_atom *argv) {
	ikeda_struct *ikeda = (ikeda_struct *) pd_new(ikeda_class);
	if (ikeda != NULL) {
		outlet_new(&ikeda -> x_obj, &s_float);
		ikeda -> outlets[0] = outlet_new(&ikeda -> x_obj, &s_float);
		ikeda -> search_outlet = outlet_new(&ikeda -> x_obj, &s_list);
		ikeda -> vars_outlet = outlet_new(&ikeda -> x_obj, &s_list);
		ikeda -> params_outlet = outlet_new(&ikeda -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			ikeda -> vars_init[M_x] = ikeda -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			ikeda -> vars_init[M_y] = ikeda -> vars[M_y] = (double) atom_getfloatarg(1, argc, argv);
			ikeda -> a = (double) atom_getfloatarg(2, argc, argv);
			ikeda -> b = (double) atom_getfloatarg(3, argc, argv);
			ikeda -> c = (double) atom_getfloatarg(4, argc, argv);
			ikeda -> rho = (double) atom_getfloatarg(5, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for ikeda fractal. Expecting 6 arguments.");
			}
			ikeda -> vars_init[M_x] = 0.1;
			ikeda -> vars_init[M_y] = 0.1;
			ikeda -> a = 0.4;
			ikeda -> b = 0.9;
			ikeda -> c = 6;
			ikeda -> rho = 1;
		}
		constrain(ikeda, NULL, 0, NULL);
		lyap(ikeda, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)ikeda;
}
コード例 #7
0
ファイル: standardmap.c プロジェクト: Angeldude/pd
void *standardmap_new(t_symbol *s, int argc, t_atom *argv) {
	standardmap_struct *standardmap = (standardmap_struct *) pd_new(standardmap_class);
	if (standardmap != NULL) {
		outlet_new(&standardmap -> x_obj, &s_float);
		standardmap -> outlets[0] = outlet_new(&standardmap -> x_obj, &s_float);
		standardmap -> search_outlet = outlet_new(&standardmap -> x_obj, &s_list);
		standardmap -> vars_outlet = outlet_new(&standardmap -> x_obj, &s_list);
		standardmap -> params_outlet = outlet_new(&standardmap -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			standardmap -> vars_init[M_p] = standardmap -> vars[M_p] = (double) atom_getfloatarg(0, argc, argv);
			standardmap -> vars_init[M_q] = standardmap -> vars[M_q] = (double) atom_getfloatarg(1, argc, argv);
			standardmap -> k = (double) atom_getfloatarg(2, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for standardmap fractal. Expecting 3 arguments.");
			}
			standardmap -> vars_init[M_p] = 0.1;
			standardmap -> vars_init[M_q] = 0.1;
			standardmap -> k = 1;
		}
		constrain(standardmap, NULL, 0, NULL);
		lyap(standardmap, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)standardmap;
}
コード例 #8
0
ファイル: threeply.c プロジェクト: kmatheussen/libpd
void *threeply_new(t_symbol *s, int argc, t_atom *argv) {
	threeply_struct *threeply = (threeply_struct *) pd_new(threeply_class);
	if (threeply != NULL) {
		outlet_new(&threeply -> x_obj, &s_float);
		threeply -> outlets[0] = outlet_new(&threeply -> x_obj, &s_float);
		threeply -> search_outlet = outlet_new(&threeply -> x_obj, &s_list);
		threeply -> vars_outlet = outlet_new(&threeply -> x_obj, &s_list);
		threeply -> params_outlet = outlet_new(&threeply -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			threeply -> vars_init[M_x] = threeply -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			threeply -> vars_init[M_y] = threeply -> vars[M_y] = (double) atom_getfloatarg(1, argc, argv);
			threeply -> a = (double) atom_getfloatarg(2, argc, argv);
			threeply -> b = (double) atom_getfloatarg(3, argc, argv);
			threeply -> c = (double) atom_getfloatarg(4, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for threeply fractal. Expecting 5 arguments.");
			}
			threeply -> vars_init[M_x] = 0;
			threeply -> vars_init[M_y] = 0;
			threeply -> a = -55;
			threeply -> b = -1;
			threeply -> c = -42;
		}
		constrain(threeply, NULL, 0, NULL);
		lyap(threeply, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)threeply;
}
コード例 #9
0
ファイル: strange1.c プロジェクト: MatiasDelera/pd-macambira
void *strange1_new(t_symbol *s, int argc, t_atom *argv) {
	strange1_struct *strange1 = (strange1_struct *) pd_new(strange1_class);
	if (strange1 != NULL) {
		outlet_new(&strange1 -> x_obj, &s_float);
		strange1 -> outlets[0] = outlet_new(&strange1 -> x_obj, &s_float);
		strange1 -> search_outlet = outlet_new(&strange1 -> x_obj, &s_list);
		strange1 -> vars_outlet = outlet_new(&strange1 -> x_obj, &s_list);
		strange1 -> params_outlet = outlet_new(&strange1 -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			strange1 -> vars_init[M_x] = strange1 -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			strange1 -> vars_init[M_y] = strange1 -> vars[M_y] = (double) atom_getfloatarg(1, argc, argv);
			strange1 -> a0 = (double) atom_getfloatarg(2, argc, argv);
			strange1 -> a1 = (double) atom_getfloatarg(3, argc, argv);
			strange1 -> a2 = (double) atom_getfloatarg(4, argc, argv);
			strange1 -> a3 = (double) atom_getfloatarg(5, argc, argv);
			strange1 -> a4 = (double) atom_getfloatarg(6, argc, argv);
			strange1 -> a5 = (double) atom_getfloatarg(7, argc, argv);
			strange1 -> b0 = (double) atom_getfloatarg(8, argc, argv);
			strange1 -> b1 = (double) atom_getfloatarg(9, argc, argv);
			strange1 -> b2 = (double) atom_getfloatarg(10, argc, argv);
			strange1 -> b3 = (double) atom_getfloatarg(11, argc, argv);
			strange1 -> b4 = (double) atom_getfloatarg(12, argc, argv);
			strange1 -> b5 = (double) atom_getfloatarg(13, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for strange1 fractal. Expecting 14 arguments.");
			}
			strange1 -> vars_init[M_x] = 0;
			strange1 -> vars_init[M_y] = 0;
			strange1 -> a0 = 1;
			strange1 -> a1 = 1;
			strange1 -> a2 = 1;
			strange1 -> a3 = 1;
			strange1 -> a4 = 1;
			strange1 -> a5 = 1;
			strange1 -> b0 = 1;
			strange1 -> b1 = 1;
			strange1 -> b2 = 1;
			strange1 -> b3 = 1;
			strange1 -> b4 = 1;
			strange1 -> b5 = 1;
		}
		constrain(strange1, NULL, 0, NULL);
		lyap(strange1, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)strange1;
}
コード例 #10
0
ファイル: mlogistic.c プロジェクト: MatiasDelera/pd-macambira
void *mlogistic_new(t_symbol *s, int argc, t_atom *argv) {
	mlogistic_struct *mlogistic = (mlogistic_struct *) pd_new(mlogistic_class);
	if (mlogistic != NULL) {
		outlet_new(&mlogistic -> x_obj, &s_float);
		mlogistic -> search_outlet = outlet_new(&mlogistic -> x_obj, &s_list);
		mlogistic -> vars_outlet = outlet_new(&mlogistic -> x_obj, &s_list);
		mlogistic -> params_outlet = outlet_new(&mlogistic -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			mlogistic -> vars_init[M_x] = mlogistic -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			mlogistic -> c = (double) atom_getfloatarg(1, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for mlogistic fractal. Expecting 2 arguments.");
			}
			mlogistic -> vars_init[M_x] = 0.1;
			mlogistic -> c = 4;
		}
		constrain(mlogistic, NULL, 0, NULL);
		lyap(mlogistic, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)mlogistic;
}
コード例 #11
0
ファイル: base3.c プロジェクト: Angeldude/pd
void *base3_new(t_symbol *s, int argc, t_atom *argv) {
	base3_struct *base3 = (base3_struct *) pd_new(base3_class);
	if (base3 != NULL) {
		outlet_new(&base3 -> x_obj, &s_float);
		base3 -> search_outlet = outlet_new(&base3 -> x_obj, &s_list);
		base3 -> vars_outlet = outlet_new(&base3 -> x_obj, &s_list);
		base3 -> params_outlet = outlet_new(&base3 -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			base3 -> vars_init[M_x] = base3 -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			base3 -> a = (double) atom_getfloatarg(1, argc, argv);
			base3 -> b = (double) atom_getfloatarg(2, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for base3 fractal. Expecting 3 arguments.");
			}
			base3 -> vars_init[M_x] = 0.1;
			base3 -> a = 1;
			base3 -> b = 1;
		}
		constrain(base3, NULL, 0, NULL);
		lyap(base3, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)base3;
}
コード例 #12
0
ファイル: three_d.c プロジェクト: Angeldude/pd
void *three_d_new(t_symbol *s, int argc, t_atom *argv) {
	three_d_struct *three_d = (three_d_struct *) pd_new(three_d_class);
	if (three_d != NULL) {
		outlet_new(&three_d -> x_obj, &s_float);
		three_d -> outlets[0] = outlet_new(&three_d -> x_obj, &s_float);
		three_d -> outlets[1] = outlet_new(&three_d -> x_obj, &s_float);
		three_d -> search_outlet = outlet_new(&three_d -> x_obj, &s_list);
		three_d -> vars_outlet = outlet_new(&three_d -> x_obj, &s_list);
		three_d -> params_outlet = outlet_new(&three_d -> x_obj, &s_list);
		if (argc == M_param_count + M_var_count) {
			three_d -> vars_init[M_x] = three_d -> vars[M_x] = (double) atom_getfloatarg(0, argc, argv);
			three_d -> vars_init[M_y] = three_d -> vars[M_y] = (double) atom_getfloatarg(1, argc, argv);
			three_d -> vars_init[M_z] = three_d -> vars[M_z] = (double) atom_getfloatarg(2, argc, argv);
			three_d -> a = (double) atom_getfloatarg(3, argc, argv);
			three_d -> b = (double) atom_getfloatarg(4, argc, argv);
			three_d -> c = (double) atom_getfloatarg(5, argc, argv);
			three_d -> d = (double) atom_getfloatarg(6, argc, argv);
			three_d -> e = (double) atom_getfloatarg(7, argc, argv);
		} else {
			if (argc != 0 && argc != M_param_count + M_var_count) {
				post("Incorrect number of arguments for three_d fractal. Expecting 8 arguments.");
			}
			three_d -> vars_init[M_x] = 0;
			three_d -> vars_init[M_y] = 0;
			three_d -> vars_init[M_z] = 0;
			three_d -> a = 2.24;
			three_d -> b = 0.43;
			three_d -> c = -0.65;
			three_d -> d = -2.43;
			three_d -> e = 1;
		}
		constrain(three_d, NULL, 0, NULL);
		lyap(three_d, -1000000.0, 1000000.0, M_failure_limit);
	}
	return (void *)three_d;
}