|
![](/i/fill.gif) |
Derek Chen-Becker <pov### [at] chen-becker org> wrote:
> Very nice, how did you get the outlines on the parts?
There are basically 3 tricks I used. Say this is the shape I wanted to
outline:
box {<-50,20,-75>,<100,150,75>}
sphere {<100, 120, -85>,75}
The strait edges I'd outline with cylinders connected by spheres. For
simple perfectly round outlines I'd use tori.
So for the above shape I'd draw a sphere at each corner of the box:
sphere{<-50,20,-75> 10}
sphere{<-50,20,75> 10}
sphere{<-50,150,-75> 10}
sphere{<-50,150,75> 10}
sphere{<100,20,-75> 10}
sphere{<100,20,75> 10}
sphere{<100,150,-75> 10}
sphere{<100,150,75> 10}
The radius can be adjusted with the width of the outline. Next is a
cylinder at each edge:
cone {<-50,20,-75>, 10 <-50,20,75>, 10}
cone {<-50,20,-75>, 10 <-50,150,-75>, 10}
cone {<-50,20,-75>, 10 <100,20,-75>, 10}
cone {<-50,150,75>, 10 <-50,150,-75>, 10}
cone {<-50,150,75>, 10 <-50,20,75>, 10}
cone {<-50,150,75>, 10 <100,150,75>, 10}
cone {<100,20,75>, 10 <100,20,-75>, 10}
cone {<100,20,75>, 10 <100,150,75>, 10}
cone {<100,20,75>, 10 <-50,20,75>, 10}
cone {<100,150,-75>, 10 <100,150,75>, 10}
cone {<100,150,-75>, 10 <100,20,-75>, 10}
cone {<100,150,-75>, 10 <-50,150,-75>, 10}
Next is the line formed by the intersection of the box and the sphere. That
is drawn with this:
intersection {
box {<-60,10,-85>, <110,160,85>}
sphere {<100,120,-85> ,85}
}
And finally comes the outline of the sphere. That is drawn with this:
sphere {<100,120,-85>, 85.001
texture {pigment {rgbt 1}}
interior_texture {OUTLINE_TEXTURE_HERE} no_shadow no_reflection
}
So as you can see the outline of my cannon is a far more complicated part
then the cannon itself.
Derek Chen-Becker <pov### [at] chen-becker org> wrote:
> Just a thought, but you could also put a transparent distortion
> (ripple?) perpendicular to the muzzle to indicate the compression
> wave from the projectile.
Very cool idea. I like. Do you have any suggestions oh how to code that?
Thanks,
Carl
Post a reply to this message
|
![](/i/fill.gif) |