knighty
Fractal Iambus
Posts: 819
|
|
« Reply #45 on: May 09, 2010, 03:56:28 PM » |
|
It's exacty the same algorithm. The only things that change are the center of scaling and the scale factor. this is not surprising because icosahedron and dodecahedron have the same symmetries. if you change the position of the scaling center and the scale factor you'll get the sierpinski-like fractals corresponding to dodecahedron family of semi-regular polyhedrons. (This is not totaly true because the set I've given is not the full set... I'm working on it)
|
|
|
Logged
|
|
|
|
msltoe
Iterator
Posts: 187
|
|
« Reply #46 on: May 09, 2010, 04:46:41 PM » |
|
It looks like the dodeca01 is like my icosahedral vertex reflection. Too bad there's few platonic solids in 3-d. But, I have a hunch that non-platonic shapes may produce interesting fractals because of the "interference" effects we see in the Mandelbox.
-mike
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #47 on: May 09, 2010, 06:01:39 PM » |
|
Yes they are the same. Under "full" symmetry planes set, you can obtain a morph between a regular-polyhedra-sierpinski to their its dual s by changing the position of the center of symmetry. Some of the in-between polyhedras are semi-regular. All of them have the same symmetries. for example, for the tetrahedra which is self dual, under full set of plane symmetries: x+y=0; x-y=0; x+z=0; x-z=0; y+z=0 and y-z=0;(one have to be careful about the orientation of these planes) If we define the "center of scaling" this way: CS=a*(1,1,1)+b*(0,1,0)+c*(-1/3,1,-1/3); a+b+c=1 (barycentric coordinates) and vary a,b and c, we should get the family of tetrahedron-siepinski. a=1 gives tetrahedron-sierpinski. b=1 gives octahedron-sierpinski. c=1 gives another tetrahedron-sierpinski. It's exacty the same algorithm. The only things that change are the center of scaling and the scale factor. this is not surprising because icosahedron and dodecahedron have the same symmetries. if you change the position of the scaling center and the scale factor you'll get the sierpinski-like fractals corresponding to dodecahedron family of semi-regular polyhedrons. (This is not totaly true because the set I've given is not the full set... I'm working on it)
Must say that in the case of dodecahedra, the two last symmetries (in the code I've provided above) are not necessary.
|
|
« Last Edit: May 20, 2010, 11:16:46 PM by knighty, Reason: I\'ve confused dodeca and icosa :/ »
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #48 on: May 10, 2010, 03:36:16 PM » |
|
Yes they are the same. Under "full" symmetry planes set, you can obtain a morph between a regular-polyhedra-sierpinski to their duals by changin the position of the center of symmetry. Some of the in-between polyhedras are semi-regular. All of them have the same symmetries. for example, for the tetrahedra which is self dual, under full set of plane symmetries: x+y=0; x-y=0; x+z=0; x-z=0; y+z=0 and y-z=0;(one have to be careful about the orientation of these planes) If we define the "center of scaling" this way: CS=a*(1,1,1)+b*(0,1,0)+c*(-1/3,1,-1/3); a+b+c=1 (barycentric coordinates) and vary a,b and c, we should get the family of tetrahedron-siepinski. a=1 gives tetrahedron-sierpinski. b=1 gives octahedron-sierpinski. c=1 gives another tetrahedron-sierpinski. I did some research and found this wiki article about Wythoff Kaleidoscopic construction ( http://en.wikipedia.org/wiki/Wythoff_construction). That should make the previous post clearer. I was amazed to see that the word " Kaleidoscopic" is already used. Softology posted some nice videos of Kaleidoscopic menger sponge at Youtube.
http://www.youtube.com/v/bCP7yeFQvnc&rel=1&fs=1&hd=1
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #49 on: May 10, 2010, 04:15:02 PM » |
|
Just to illustrate the two posts above. Algorithm: tetra-sierpinski full symmetry planes set. Parameters for each picture: (a=1, b=0, c=0, scale=2); (a=1/3, b=2/3, c=0, scale=2); (a=0, b=1, c=0, scale=2); (a=1/3, b=1/3, c=1/3, scale=2); (a=1/4, b=0, c=3/4, scale=2); (a=1/4, b=0, c=3/4, scale=3);
|
|
|
Logged
|
|
|
|
kram1032
|
|
« Reply #50 on: May 10, 2010, 08:17:37 PM » |
|
knighty: Are those supposed to be the duals? They rather look like half way throughs, exactly between the two duals
|
|
|
Logged
|
|
|
|
Softology
|
|
« Reply #51 on: May 11, 2010, 05:42:08 AM » |
|
Thanks for sharing these methods. Very interesting. A few questions... (In my implementation [CX,CY,CZ] is constrained to be on the unit sphere) This gives 1+3+3+2=9 parameters in total (scale->1,rotation1->3,rotation2->3,center of stretch->2).
By constrained to the unit sphere you mean normalize the CX,CY,CZ? And the center of stretch should have 3 parameters, not 2 as quoted? I've used your Menger sponge algorithm as a starting point and found with scale of 1.3, a single rotation r.y of 25 degs and C values of [2, 4.8, 0] I get these tree structures. The sequence is made by changing r.y. The last image has a Glynn type fractal in there I tried these parameters and cannot see the trees. Can you give me a zoomed out look at this one? Using your parameters and normailizing CX,CY,CZ I get this image (view full size to see all the finer details) Thanks for any clarifications. I am getting some nice results from these http://www.flickr.com/photos/39445835@N05/sets/72157623985965428/Jason.
|
|
« Last Edit: May 11, 2010, 10:06:29 AM by Softology »
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #52 on: May 11, 2010, 12:25:25 PM » |
|
knighty: Are those supposed to be the duals? They rather look like half way throughs, exactly between the two duals The images do not represent the duals but the semi-regular polyhedron-sierpinski family of the tetrahedron-sierpinski generated by moving the center of stretch over the fundamental triangle (see the reference to Withoff construction). some of them have more symmetries than the tetrahedron (they have octahedron symmetries) and one of them is regular (platonic): the octahedra. Just like the tetrahedron, tetrahedron-sierpinski is self dual. (In my implementation [CX,CY,CZ] is constrained to be on the unit sphere) This gives 1+3+3+2=9 parameters in total (scale->1,rotation1->3,rotation2->3,center of stretch->2).
By constrained to the unit sphere you mean normalize the CX,CY,CZ? And the center of stretch should have 3 parameters, not 2 as quoted? Yes, I normalize the CX,CY,CZ. I do so because multiplying [CX,CY,CZ] by a constant changes only the size of the fractal. If normalised, a vector will have 2 free parameters not 3 because it's length is constrained to be constante (=1 in this case). Your renderings are awesome...
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #53 on: May 11, 2010, 01:21:48 PM » |
|
I've used your Menger sponge algorithm as a starting point and found with scale of 1.3, a single rotation r.y of 25 degs and C values of [2, 4.8, 0] I get these tree structures. The sequence is made by changing r.y. The last image has a Glynn type fractal in there I tried these parameters and cannot see the trees. Can you give me a zoomed out look at this one? Using your parameters and normailizing CX,CY,CZ I get this image (view full size to see all the finer details) Maybe you are using a left handed coordinates system. It should look like this:
|
|
|
Logged
|
|
|
|
kram1032
|
|
« Reply #54 on: May 11, 2010, 08:52:28 PM » |
|
knighty: Ok, that's what I thought and what I tried to say Softology: I have to say, that I actually prefer that variant over the other one
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #55 on: May 11, 2010, 09:01:22 PM » |
|
knighty: Ok, that's what I thought and what I tried to say My bad! I've corrected the mistake in this post.
|
|
« Last Edit: May 11, 2010, 09:03:51 PM by knighty »
|
Logged
|
|
|
|
Softology
|
|
« Reply #56 on: May 11, 2010, 11:49:39 PM » |
|
Maybe you are using a left handed coordinates system.
Can you share the snippet of code you use to rotate the X Y Z point around the CX CY CZ point? Then I should be able to get the same results. These are the routines I currently use to do the rotations procedure Rotate2(const Rx,Ry,Rz:Double; const x,y,z:Double; Var Nx,Ny,Nz:Double); Var TempX : Double; TempY : Double; TempZ : Double; SinX : Double; SinY : Double; SinZ : Double; CosX : Double; CosY : Double; CosZ : Double; XRadAng: Double; YRadAng: Double; ZRadAng: Double; Begin
XRadAng := Rx*PIDiv180; YRadAng := Ry*PIDiv180; ZRadAng := Rz*PIDiv180;
SinX := Sin(XRadAng); SinY := Sin(YRadAng); SinZ := Sin(ZRadAng);
CosX := Cos(XRadAng); CosY := Cos(YRadAng); CosZ := Cos(ZRadAng);
Tempy := y*CosY - z*SinY; Tempz := y*SinY + z*CosY; Tempx := x*CosX - Tempz*SinX;
Nz := x*SinX + Tempz*CosX; Nx := Tempx*CosZ - TempY*SinZ; Ny := Tempx*SinZ + TempY*CosZ;
End;
procedure Rotate(const Rx,Ry,Rz:Double; const x,y,z,ox,oy,oz:Double; Var Nx,Ny,Nz:Double); Begin Rotate2(Rx,Ry,Rz,x-ox,y-oy,z-oz,Nx,Ny,Nz); Nx := Nx+ox; Ny := Ny+oy; Nz := Nz+oz; End;
Here is a Kaleidoscopic IFS Cube Thanks, Jason.
|
|
|
Logged
|
|
|
|
subblue
|
|
« Reply #57 on: May 12, 2010, 08:20:02 AM » |
|
This might help: // Return rotation matrix for rotating around vector v by angle float3x3 rotationMatrix(float3 v, float angle) { float c = cos(radians(angle)); float s = sin(radians(angle));
return float3x3(c + (1.0 - c) * v.x * v.x, (1.0 - c) * v.x * v.y - s * v.z, (1.0 - c) * v.x * v.z + s * v.y, (1.0 - c) * v.x * v.y + s * v.z, c + (1.0 - c) * v.y * v.y, (1.0 - c) * v.y * v.z - s * v.x, (1.0 - c) * v.x * v.z - s * v.y, (1.0 - c) * v.y * v.z + s * v.x, c + (1.0 - c) * v.z * v.z); }
--
# 3x3 rotation matrix float3x3 objRotation = rotationMatrix(float3(1, 0, 0), objectRotation.x) * rotationMatrix(float3(0, 1, 0), objectRotation.y) * rotationMatrix(float3(0, 0, 1), objectRotation.z);
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #58 on: May 12, 2010, 12:45:58 PM » |
|
@Softology: Are you doing rotation around [Cx,Cy,Cz] instead of [0,0,0]? This will give you different results. Here is how I set up the rotation matrix (I haven't checked if it is correct. Too lazy ) //salpha: rotation about Z axis angle //sbeta: rotation about Y axis angle //stheta: rotation about X axis angle s1=sin(sbeta);c1=cos(sbeta); s2=sin(stheta);c2=cos(stheta); s3=sin(salpha);c3=cos(salpha); rotmat[0][0]=c1*c3+s1*s2*s3; rotmat[0][1]=c2*s3; rotmat[0][2]=c1*s2*s3-c3*s1; rotmat[1][0]=c3*s1*s2-c1*s3; rotmat[1][1]=c2*c3; rotmat[1][2]=s1*s3+c1*c3*s2; rotmat[2][0]=c2*s1; rotmat[2][1]=-s2; rotmat[2][2]=c1*c2;
And how I apply it: x1=rot[0][0]*x+rot[1][0]*y+rot[2][0]*z; y1=rot[0][1]*x+rot[1][1]*y+rot[2][1]*z; z1=rot[0][2]*x+rot[1][2]*y+rot[2][2]*z; x=x1;y=y1;z=z1;
@subblue: Thanks for the snippet. I was looking for it . I guess ||v|| should be equal to 1, right?
|
|
|
Logged
|
|
|
|
subblue
|
|
« Reply #59 on: May 12, 2010, 01:19:31 PM » |
|
@subblue: Thanks for the snippet. I was looking for it . I guess ||v|| should be equal to 1, right? Yes, 'v' is a normalised direction vector. I think my rotation matrix could probably be replaced with a Quaternion implementation, which should be a little quicker - although the matrices are only calculated once at the start so will have negligible overhead compared with the rest of the script.
|
|
|
Logged
|
|
|
|
|