POV-Ray : Newsgroups : povray.newusers : how to make a screw object? Server Time
3 Nov 2024 03:02:00 EST (-0500)
  how to make a screw object? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: ehmdjii
Subject: how to make a screw object?
Date: 26 Jul 2003 12:58:48
Message: <Xns93C4C17CDA1A4ehmdjiiNOSPAMgmxnet@204.213.191.226>
hello,

what would be the best kind of object to model a screw?

thanks!


Post a reply to this message

From: Doug Eichenberg
Subject: Re: how to make a screw object?
Date: 26 Jul 2003 13:48:38
Message: <3f22bef6$1@news.povray.org>
If you don't have modelling software like Rhino, I would say probably an
isosurface or parametric if you want the actual helix pattern.

Something like this:

http://www.econym.demon.co.uk/isotut/parametric.htm


--
Doug Eichenberg
www.getinfo.net/douge
dou### [at] nlsnet


Post a reply to this message

From: Hughes, B 
Subject: Re: how to make a screw object?
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

From: mcavoys
Subject: Re: how to make a screw object?
Date: 27 Jul 2003 05:13:13
Message: <3f23979d.410318196@news.povray.org>
On 26 Jul 2003 12:58:48 -0400, ehmdjii <ehm### [at] SPAMgmxnet> wrote:

>hello,
>
>what would be the best kind of object to model a screw?
>
Advert

Helixir is a free tool for Windows 95/NT that allows you to easily create a
variety of 3D helical shapes for use with POV-Ray and Moray.
http://www.evolve.co.uk/helixir/


Regards
        Stephen


Post a reply to this message

From: BorisW37
Subject: Re: how to make a screw object?
Date: 30 Jul 2003 13:55:01
Message: <web.3f28056cb40ba1e0e8af727a0@news.povray.org>
I have worked out a vey nice screw, it follows the American screw standards
and actually looks like a real screw. All i need to do now is to make a
more realistic head. It takes a hell of a long time to render if doing good
quality. Here is the full scene text:

// ==== Standard POV-Ray Includes ====
/*#include "colors.inc"   // Standard Color definitions
#include "textures.inc"   // Standard Texture definitions
#include "functions.inc"  // internal functions usable in user defined
functions
#include "metals.inc"
*/
// perspective (default) camera
camera {
  location  <-2, 20, -22.0>
  look_at   <6, 5,  0>
  right     x*image_width/image_height
}

// An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source {
  0*x                 // light's position (translated below)
  color rgb 1.2       // light's color
  area_light
  <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
  4, 4                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  circular            // make the shape of the light circular
  orient              // orient light
  translate <40, 60, -40>   // <x y z> position of light
}

#declare Gold_Nugget =
   material  // Gold_Nugget
   {
      texture
      {
         pigment
         {
            color rgb <0.5, 0.35, 0.25>
         }
         finish
         {
            ambient 0.1
            diffuse 0.65
            brilliance 1.5
            specular 0.85
            roughness 0.01
            reflection 0.45
         }
      }
   }


// An infinite planar surface
// plane {<A, B, C>, D } where: A*x + B*y + C*z = D
plane {
  y, // <X Y Z> unit surface normal, vector points "away from surface"
  -2 // distance from the origin in the direction of the surface normal
  hollow on // has an inside pigment?
  material {Gold_Nugget}
}
/*
cylinder {
        <0,100,0>,<0,-100,0>,0.05
        pigment {Red}
}
cylinder {
        <100,0,0>,<-100,0,0>,0.05
        pigment {Red}
}
cylinder {
        <0,0,100>,<0,0,-100>,0.05
        pigment {Red}
}
*/
//-------------------------------------------------------------------------------------
//   ALL SCREW DIMENSION GO HERE \/ \/ \/


#declare p=1;    //pitch (distance between same 2 points on the thread) 1
cycle or period
#declare md=8;   //major diameter of the screw
#declare len=25; //length of screw withou the cap
#declare qual=300;//quality of the screw (number of cones per one revolution
or one pitch)
//-------------------------------------------------------------------------------------
#declare d=(p*sqrt(3)/2);
#declare pv=(1/16)*p*cos(pi/6); //NOTE to Self, rotate in degrees BUT
sin,cos, etc.. in radians
#declare n_dies=(((len/p)-1/2)*qual); //total number of cones (dies) to be
added  from cylinder
#declare mid= md-2*(d-2*pv); //minor diameter of the screw, the diameter of
the center cylinder



#declare BLUE_METAL =
   material  // BLUE_METAL
   {
      texture
      {
         pigment
         {
            color rgb <0.0, 0.0, 0.61>
         }
         finish
         {
            ambient 0.1
            diffuse 0.8
            brilliance 6.0
            phong 1.0
            phong_size 80.0
            reflection 0.7
         }
      }
   }

#declare die=
        cone {
                <0,0,0>, (p*7/16)
                <(d-2*pv),0,0>, (p/16)
                translate <mid/2,0,0>

                //texture {Chrome_Metal}
        }
#declare die_set=
    union {
        #declare n_dies_con=n_dies;
        #while (n_dies>0)
          object { die
                rotate <0,((360/qual)*( n_dies_con-n_dies)),0>
                translate <0,((p/qual)*( n_dies_con-n_dies)),0>
        }
        #declare n_dies=(n_dies-1);
        #end


   }
#declare main =
        union {
                object {die_set }
                cylinder {
                                <0,0,0>,<0,len-1/2*p,0>,mid/2
                        }
                cylinder {<0,len-1/2*p,0>,<0,len,0>,md/2
                        }
                        rotate <0,0,0>
                        translate <0,0,0>

        }

#declare nl=(2*sqrt(3)*0.75*md)/3;

#declare head_hex=
                // extrude a closed 2-D shape along an axis
        prism {
          linear_sweep  // or conic_sweep for tapering to a point
          linear_spline // linear_spline | quadratic_spline | cubic_spline |
bezier_spline
           len,         // height 1
           len +2/3*md,         // height 2
          7,           // number of points
          // (--- the <u,v> points ---)
          <.5*nl,-0.75*md>,<nl,0>,<.5*nl,0.75*md>,
          <-.5*nl,0.75*md>,<-nl,0>,<-.5*nl,-0.75*md>,
          <.5*nl,-0.75*md>
          // , <0.2,   0.2> // match 2nd point, if quadratic_spline add this
          // , <0.2,  -1.0> // match 1st point, if cubic_spline add this as
well as the other
          // [open]
          // [sturm]
        }
#declare screw= union {object {main} object {head_hex}
                       // texture {Chrome_Metal}
                       material {BLUE_METAL}
                      }



object {screw rotate <0,20,-90> translate <-8,5,0>}



------------------------------------------


Try rendering with lower quality first, to see how it comes out. This is my
backround for my desktop and i used 25000 quality seting. It took around
4hrs to render on 2ghz Athlon xp.

Please tell me what you think of this screw...


Post a reply to this message

From: Peter Ketting
Subject: Re: how to make a screw object?
Date: 30 Jul 2003 14:18:40
Message: <3f280c00@news.povray.org>
"BorisW37" wrote in message

> Try rendering with lower quality first, to see how it comes out. This is
my
> backround for my desktop and i used 25000 quality seting. It took around
> 4hrs to render on 2ghz Athlon xp.
>
> Please tell me what you think of this screw...

Could you post an image to p.b.i? I would like to see it but if I would
render it, it could probably take up to 16 hours for me :)

Cheers,
Peter


Post a reply to this message

From: mcavoys
Subject: Re: how to make a screw object?
Date: 31 Jul 2003 03:52:09
Message: <3f28ca44.1288452@news.povray.org>
On Wed, 30 Jul 2003 13:50:36 EDT, "BorisW37" <Bor### [at] yahoocom> wrote:

>I have worked out a vey nice screw, it follows the American screw standards
>and actually looks like a real screw. All i need to do now is to make a
>more realistic head. It takes a hell of a long time to render if doing good
>quality. Here is the full scene text:
>
snip
>Try rendering with lower quality first, to see how it comes out. This is my
>backround for my desktop and i used 25000 quality seting. It took around
>4hrs to render on 2ghz Athlon xp.
>
>Please tell me what you think of this screw...
>
Very nice indeed it only took 35 sec on my m/c, 512x384 with no AA. 1 min 52 sec
with AA =0.3. I would change the material, as it looks like the threads are
painted and we don't want that :-}
Anyway it looks good, as you say you need to chamfer the hexagonal head and I
would call it a bolt not a screw :-}

Regards
        Stephen


Post a reply to this message

From: BorisW37
Subject: Re: how to make a screw object?
Date: 31 Jul 2003 21:50:02
Message: <web.3f29c6f3b40ba1e082690c900@news.povray.org>
ok, for those of you who dont feel like rendering it to see it here is the
link
http://www.boriswww.web1000.com/

I dont know what texture i should use to make it look better any
suggestions?
also, i can make the vertical edges rounded on the hex head of the
bolt/screw, but how do i make the other edges round, the ones that are in
the hex head plane?


Post a reply to this message

From: BorisW37
Subject: Re: how to make a screw object?
Date: 31 Jul 2003 22:25:01
Message: <web.3f29ce89b40ba1e082690c900@news.povray.org>


Post a reply to this message

From: Doug Eichenberg
Subject: Re: how to make a screw object?
Date: 31 Jul 2003 23:34:19
Message: <3f29dfbb$1@news.povray.org>
Here's one I did in autocad.  I cheated though... it's not actually a helix,
but no one's ever actually noticed :P

http://www.getinfo.net/douge/inject2.htm

--
Doug Eichenberg
www.getinfo.net/douge
dou### [at] nlsnet


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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