|
|
I did a bit more work trying to figure this problem out, and I came up with
the following code. My only concern is that some of the dimples don't line
up right, and the spacing isn't correct all around, except for the equator
ring. It is also a big resource hog.
#declare DimplesPattern =
union {
sphere {
0,
3
translate <0,0,-32.35>
rotate <0,8,0>
}
/*
sphere {
0,
3
translate <0,0,-32.35>
rotate <7,4,0>
}
sphere {
0,
3
translate <0,0,-32.35>
rotate <-7,4,0>
}
*/
}
#declare Dimples_Equator =
union {
#declare Count=0;
#declare CountMax=45;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,Count*8,0>
}
#declare Count=Count+1;
#end
}
#declare Dimples_1up =
union {
#declare Count=0;
#declare CountMax=44;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,-4,0>
rotate <8,Count*8.2,0>
}
#declare Count=Count+1;
#end
}
#declare Dimples_2up =
union {
#declare Count=0;
#declare CountMax=43;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,0,0>
rotate <16,Count*8.4,0>
}
#declare Count=Count+1;
#end
}
#declare Dimples_3up =
union {
#declare Count=0;
#declare CountMax=42;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,-4,0>
rotate <24,Count*8.6,0>
}
#declare Count=Count+1;
#end
}
#declare Dimples_4up =
union {
#declare Count=0;
#declare CountMax=40;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,0,0>
rotate <32,Count*9,0>
}
#declare Count=Count+1;
#end
}
#declare Dimples_5up =
union {
#declare Count=0;
#declare CountMax=39;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,-4,0>
rotate <40,Count*9.5,0>
}
#declare Count=Count+1;
#end
}
#declare Dimples_6up =
union {
#declare Count=0;
#declare CountMax=37;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,0,0>
rotate <48,Count*10.3,0>
}
#declare Count=Count+1;
#end
}
#declare Dimples_7up =
union {
#declare Count=0;
#declare CountMax=36;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,-4,0>
rotate <56,Count*10.9,0>
}
#declare Count=Count+1;
#end
}
#declare Dimples_8up =
union {
#declare Count=0;
#declare CountMax=34;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,0,0>
rotate <64,Count*11.4,0>
}
#declare Count=Count+1;
#end
}
#declare Dimples_9up =
union {
#declare Count=0;
#declare CountMax=20;
#while (Count < CountMax)
object {
DimplesPattern
translate <0,0,0>
rotate <0,-4,0>
rotate <64,Count*14,0>
}
#declare Count=Count+1;
#end
}
// Golf Ball
difference {
sphere {
0,
30
rotate <0,0,0>
translate <0,0,0>
}
object { Dimples_Equator }
union {
object { Dimples_1up }
object { Dimples_2up }
object { Dimples_3up }
object { Dimples_4up }
object { Dimples_5up }
object { Dimples_6up }
object { Dimples_7up }
object { Dimples_8up }
object { Dimples_9up }
rotate <0,180,0>
translate <0,0,0>
}
union {
object { Dimples_1up }
object { Dimples_2up }
object { Dimples_3up }
object { Dimples_4up }
object { Dimples_5up }
object { Dimples_6up }
object { Dimples_7up }
object { Dimples_8up }
object { Dimples_9up }
rotate <0,180,-180>
translate <0,0,0>
}
texture {
pigment {
color rgb <1,1,1>
}
}
translate <0,-10,0>
}
----
View My Portfolio At
http://allen.emailnuts.com/
Post a reply to this message
|
|