Quote:I might be mistaken in my belief and I would be pleased if someone could prove me wrong as it would be fun to create such images.
Hello,
I am not into math...
but maybe I can prove you wrong...
I did a 3D graph plotter, and in the last function
I used something similar from
http://local.wasp.uwa.edu.au/~pbourke/geometry/cresent/ - see code snippet below.
The full thing is found under
http://www.openprocessing.org/visuals/?visualID=7098But it doesn't run in my browser, you would have to download.
Cheers!
Greetings, Chris
void InitGraph_Cresent() {
// see http://local.wasp.uwa.edu.au/~pbourke/geometry/cresent/
//x = (2 + sin(2 pi u) sin(2 pi v)) sin(3 pi v)
//y = (2 + sin(2 pi u) sin(2 pi v)) cos(3 pi v)
//
//z = cos(2 pi u) sin(2 pi v) + 4 v - 2
//
//with 0 <= u <= 1, 0 <= v <= 1
float r1 = 100 ;
float u= 0;
float x1,y1,z1;
int indexI=0;
int indexJ = 0;
for (int i = 0; i < 101; i = i+1) {
float v=0;
indexJ = 0;
for (int j = 0; j < 101; j = j+1) {
x1 = (2 + sin(2 *PI *u) * sin(2 *PI *v)) *sin(3 *PI *v) ;
y1 = (2 + sin(2 *PI *u) * sin(2 *PI *v)) *cos(3 *PI *v);
z1 = cos(2 *PI *u) *sin(2 *PI *v) + 4 *v - 2 ;
MyResults[indexI][indexJ] = new PVector(100*x1,100*y1,100*z1);
v = v + 0.03; // .01
indexJ=indexJ+1;
}
u = u + 0.03; // .01
indexI=indexI+1;
}
MaxindexJ = indexJ - 1;
MaxindexI = indexI - 1;
}