|
![](/i/fill.gif) |
I found a way to do almost what I was after. Check this out:
http://www.wwwmwww.com/images/MyLogo2.png
If this is my original prism:
#declare wwwmwww1 = prism {
linear_sweep
bezier_spline
0, // sweep the following shape from here ...
10, // ... up through here
348, // the number of points making up the shape ...
#declare Ctr = 0;
#while (Ctr < 85.5)
P1[Ctr],C1[Ctr+1],C2[Ctr],P1[Ctr+1],
#declare Ctr = Ctr+1;
#end
P1[Ctr],C1[Ctr+1],C2[Ctr],P1[Ctr+1]
}
Then all I had to do was this:
#declare shell = difference {
sphere {<0,0,0>,1}
sphere {<0,0,0>,0.95}
}
#declare wwwmwww3 = prism {
conic_sweep
bezier_spline
0, // sweep the following shape from here ...
1, // ... up through here
348, // the number of points making up the shape ...
#declare Ctr = 0;
#while (Ctr < 85.5)
<tan(radians(f1*P1[Ctr].x)),
tan(radians(f1*P1[Ctr].y))/cos(radians(f1*P1[Ctr].x))>,
<tan(radians(f1*C1[Ctr+1].x)),
tan(radians(f1*C1[Ctr+1].y))/cos(radians(f1*C1[Ctr+1].x))>,
<tan(radians(f1*C2[Ctr].x)),
tan(radians(f1*C2[Ctr].y))/cos(radians(f1*C2[Ctr].x))>,
<tan(radians(f1*P1[Ctr+1].x)),
tan(radians(f1*P1[Ctr+1].y))/cos(radians(f1*P1[Ctr+1].x))>,
#declare Ctr = Ctr+1;
#end
<tan(radians(f1*P1[Ctr].x)),
tan(radians(f1*P1[Ctr].y))/cos(radians(f1*P1[Ctr].x))>,
<tan(radians(f1*C1[Ctr+1].x)),
tan(radians(f1*C1[Ctr+1].y))/cos(radians(f1*C1[Ctr+1].x))>,
<tan(radians(f1*C2[Ctr].x)),
tan(radians(f1*C2[Ctr].y))/cos(radians(f1*C2[Ctr].x))>,
<tan(radians(f1*P1[Ctr+1].x)),
tan(radians(f1*P1[Ctr+1].y))/cos(radians(f1*P1[Ctr+1].x))>
}
#declare wwwmwww = intersection {
object {shell}
object {wwwmwww3}
}
In fact I think I like this more then what I was after. However I'm
surprised that if its this easy to cut my logo from a sphere that it seems
so much harder to cut it out of a cylinder.
Thanks,
Carl
P.S. f1 above is just a scaling factor used to convert the original x and y
values into degrees. Also note this method can only be used to wrap the
logo half way around the sphere. I think if I break the logo up into 2
prisms though I can get more then 180 degree coverage.
Post a reply to this message
|
![](/i/fill.gif) |