POV-Ray : Newsgroups : povray.general : There must be a better way to do threads : Re: There must be a better way to do threads Server Time
2 Nov 2024 09:20:53 EDT (-0400)
  Re: There must be a better way to do threads  
From: Samuel T  Benge
Date: 25 Mar 2004 11:51:50
Message: <40630DF0.7080202@hotmail.com>
Jack Twilley wrote:

 > Help?

Hello Jack.

Here's a simple way using an isosurface and a declared pattern to make 
triangular threads:

#declare threads=
  function{
   pattern{ spiral1 1 rotate x*90 triangle_wave}
  }

isosurface {
  function{
   // cylinder, with a radius of 5 units
   sqrt(x*x+z*z)-5
   // threads
   +threads(x,y,z)/4
  }
  accuracy .01
  evaluate 5, 1.2, 0.95
  contained_by{ box{<-5,-10,-5>,<5,10,5>} }
  pigment{rgb .1}
  finish{reflection .9 specular 1 roughness .05}
}

If I think of anything else, like a faster method, I'll post more code.

-Samuel Benge


Post a reply to this message

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