Wanfang Diao

23 Jan 2014

DE4EA6FA-98BC-4793-BEA1-80D2E1FD3330
6A159F10-A7C0-4135-9892-831FBF3725C9
In this project I tried to generative spheres as a flower. The first one is radiative and screw shape, the second is use 3 loops to create a flower cluster. I did the second one from make a difference of two sphere as a petal and route them as a flower.I think OpenSCAD is a great tools to do iterative 3D modeling works. It makes maths beautiful. But The second one really ran slow on my mac, it takes long time to render the work, I guess this is the crucial  weakness of the software.

code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!--StartFragment-->module d001()
 
{
 
for(i = [1:1000]) {
 
rotate([360*i/24,360*i/24,360*i/24]) {
 
translate([360*i/24, sin(360*i/6)*80, cos(360*i/6)*80])
 
sphere(600,600,600);}
 
}
 
}
 
d001();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module d002()
 
{
 for(k = [1:10]) {
			   rotate([0,360*k/6,0])
			   union(){
			   for(i = [1:10]) {
 
							 rotate([0,0,360*i/6])
                 				 translate([0,240,240])
							 scale([3,3,3])
							 union()
						       {
 							    for(j = [1:10])
  				 				  {
 //translate([360*i/24, sin(360*i/6)*80, cos(360*i/6)*80])
								   rotate([0,360*j/6,0])
								   union()
								    {
								     difference(){
									color("Plum")
								     sphere(50,50,50); 
								     translate([0,20,30])
								     sphere(70,70,70);
								     }
    								   }
  	 			 	              }
				               }	
				             }
		             }
	          }
 
} 
d002();