POV-Ray : Newsgroups : povray.newusers : vis ou pas de vis ? : Re: vis ou pas de vis ? Server Time
6 Sep 2024 04:21:54 EDT (-0400)
  Re: vis ou pas de vis ?  
From: Ken
Date: 17 Feb 1999 12:09:55
Message: <36CAF77E.C7B2020C@pacbell.net>
bassompierre laurent wrote:
> 



> vis, surtout le filetage.
> L'utilisation d'une directive "normal" dans la texture sera-t-elle

> quelquepart sur le Oueb.

> 
> Merci d'avance,
> 
> lba### [at] ubifr


 /*  One example for making threads with Pov-Ray - Enjoy !   */

  // Wood Screw
  #declare Screw_Wood =
  union      {
   #declare   aa = 0.00;
   #while    (aa < 2000)
    union    {
     cylinder{y*-1.4,y*1.4,0.22}
     cone    {x*0.2,0.35,x*0.50,0.0
      scale     < 1.0, 0.45, 0.51>
      translate < 0.0,-1.20, 0.00>
      rotate    < 0.0,-1.125*aa, 0.0>
      translate < 0.0,0.00125*aa, 0.0>
     }
    }
   #declare aa = aa + 1.0;
   #end 
  }

   // Machine Thread Screw
  #declare Screw_Machine =
  union     {
   #declare cc = 0.00;
   #while   (cc < 2000)
    cone    {x*0.2, 0.25,x*0.40,0.0
     scale     < 1.0, 0.5, 1.0>
     translate < 0.0,-1.2, 0.0>
     rotate    < 0.0,   -3.0*cc, 0.0>
     translate < 0.0,0.00125*cc, 0.0>
    }
   #declare cc = cc + 1.0;
   #end
  }

  #declare Screw_Texture = 
  texture {
  pigment { rgb< 0.91, 0.98, 0.99>}
  finish  { ambient 0.3 diffuse 0.25}}

  object{Screw_Wood    translate x* 1.5 texture{Screw_Texture}}
  object{Screw_Machine translate x*-1.5 texture{Screw_Texture}}

  camera{location<0,0.3,-7>look_at y*0.2}

  light_source{<-10, 100, -10>rgb 1}
  light_source{<0.0, 0.0,-200>rgb 1}

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

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