POV-Ray : Newsgroups : povray.binaries.images : A shot in the dark : Re: A shot in the dark Server Time
9 Aug 2024 23:26:39 EDT (-0400)
  Re: A shot in the dark  
From: Carl
Date: 15 Dec 2004 18:40:01
Message: <web.41c0ca6f6df40f10a54c62600@news.povray.org>
Derek Chen-Becker <pov### [at] chen-beckerorg> 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-beckerorg> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.