POV-Ray : Newsgroups : povray.newusers : how to make a screw object? : Re: how to make a screw object? Server Time
4 Nov 2024 13:58:20 EST (-0500)
  Re: how to make a screw object?  
From: Hughes, B 
Date: 26 Jul 2003 15:17:58
Message: <3f22d3e6@news.povray.org>
"ehmdjii" <ehm### [at] SPAMgmxnet> wrote in message
news:Xns### [at] 204213191226...
>
> what would be the best kind of object to model a screw?

If rendering time is a concern and/or the screw isn't going to be the main
subject matter you could use a simple cylinder with surface normal pattern
such as spiral1, along with some CSG to add the head. However, to make one
with actual threads you'd want to use a function in a isosurface.

You could also get the threads done with a series of positive and negative
strength components of a blob, but that is rather slow to render so
isosurface would be better. Except you might have more control if using
blob, for example to do a wood or sheetmetal screw with pointed tip.

Anyway, depends a lot on the type needed and how it will be shown.

Bob H.

Simple example of isosurface screw or bolt threads:

// iso-screw threads
#declare ThreadDepth=0.5;
#declare TPI=0.3; // 1=1 thread per inch, 0.1=10 tpi (2 units=1")

#declare fn_Spiral1 = function {
 pigment {spiral1 1 triangle_wave rotate 90*x scale TPI*2*y }
}

isosurface {
  function {
   (fn_Spiral1(x,y,z).gray*ThreadDepth) + (x*x + z*z) }
  contained_by { box { -1, 1 } }
  threshold 1
  accuracy 0.005
  max_gradient 4
texture {
  pigment {rgb 0.9}
  normal {bumps 0.1 scale 0.01}
  finish {
    ambient 0.05 diffuse 0.2
    specular 0.8 roughness 0.02
    reflection {0.3,0.6 falloff 3
     metallic 1 exponent 1.5
    }
    brilliance 2
  }
}
}


Post a reply to this message

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