POV-Ray : Newsgroups : povray.object-collection : Knurledcylinder.inc, v1 : Re: Knurledcylinder.inc, v1 Server Time
30 Mar 2023 19:47:19 EDT (-0400)
  Re: Knurledcylinder.inc, v1  
From: Tim Attwood
Date: 19 Apr 2009 02:45:35
Message: <49eac88f$1@news.povray.org>
> I'm trying to use the KnurledCylinder.inc, from cshake, and I'm getting 
> overlap
> at start/finish?
> How would I formulate how many peaks, instead of horizontalspacing? 
> Probably
> based on radius and some other math...
> #include "KnurledCylinder.inc"
> //KnurledCylinder(Radius, CylinderHeight, KnurlDepth, HorizontalSpacing,
> // VerticalSpacing, FlattenPercent, RaisePercent)
> KnurledCylinder(.98/2,.34,.02,.065/2,.095/2,.50,.50)
> object{KnurledCylinder(.98/2,.4,.02,.065/2,.095/2,.50,.50) 
> translate<0,.425,0>}
> It's with other CSG and moved around.
> I'll post a picture.

I had a look at the macro...
The cylinder height is wrong because intersections
work poorly with mesh2, and the mesh goes a bit high.
The inside vector is outside as well, which can't be good.
Attached is a modified include that fixes that stuff.

As for using a count of peaks that's just 2*pi*radius...

// example
#declare rad = 0.5; // radius
#declare hpeaks = 32; // number of peaks
#declare hspacing = (2*pi*rad)/hpeaks;
#declare kc = KnurledCylinder(rad,1,0.025,hspacing,0.05,0.50,0.25);

Post a reply to this message

Download 'us-ascii' (5 KB)

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