POV-Ray : Newsgroups : povray.binaries.images : Knurling Macro : Knurling Macro Server Time
4 Nov 2024 14:00:37 EST (-0500)
  Knurling Macro  
From: CShake
Date: 25 Mar 2009 00:28:05
Message: <49c9b2d5$1@news.povray.org>
Just finished a macro that will generate a knurled cylinder (since you 
can't really knurl anything else, it's a lathe operation...).

Parameters are:
major_radius (radius to the middle of the knurl)
knurl_depth
edge_length (edge being the sides of the square for each point)
cylinder_height
flatten_percent (amount of the point flattened off)

Thanks to clipka for how to CSG with a mesh and have it preserve 
interior, I had never seen inside_vector before.

It was inspired by the impressive looking hockey puck by P Brewer, and 
since he said it was too hard to figure out the mesh, I took it as a 
math challenge. It is mainly a mesh2, fully optimized with no 
overlapping vertexes.
If there is any desire, I will clean it up and post an include file in 
p.b.sf, else I'll just be happy with my own work.

cshake


Post a reply to this message


Attachments:
Download 'knurling.jpg' (32 KB)

Preview of image 'knurling.jpg'
knurling.jpg


 

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