|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ok, I'm just being stupid, it should be diagonal. I'll work on that now.
CShake wrote:
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sorry about the incorrect last one, that was just a square bumps thing,
here's a real knurl.
Once again, the shape of the 'cylinder' itself is defined, then the
spacing of the peaks (this time different for vertical and horizontal,
to allow for non-45degree angles of knurling). Tops of peaks can be
flattened off, and the valleys can be chopped too (though that isn't
possible when doing this on a lathe).
As before, it is an optimized mesh2 with the minimum possible number of
vertexes and triangles, and if anyone wants it I can post the macro.
cshake
Post a reply to this message
Attachments:
Download 'knurling.png' (275 KB)
Preview of image 'knurling.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
CShake <cshake+pov### [at] gmailcom> wrote:
> As before, it is an optimized mesh2 with the minimum possible number of
> vertexes and triangles, and if anyone wants it I can post the macro.
How 'bout adding it to the POV object collection?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Beautiful... next time we'll have to work together. =)
This would have saved me quite a lot of frustration and time.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka wrote:
> How 'bout adding it to the POV object collection?
>
Done. Have fun.
I followed all the specifications on the help page for standards
compliance, though the file does produce a runtime parse warning (patch
objects not allowed in an intersection) but works as expected with no
artifacts or anything. Tested in MegaPOV 1.2.1 and POV 3.7b31
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
CShake <cshake+pov### [at] gmailcom> wrote:
> Sorry about the incorrect last one, that was just a square bumps thing,
> here's a real knurl.
> Once again, the shape of the 'cylinder' itself is defined, then the
> spacing of the peaks (this time different for vertical and horizontal,
> to allow for non-45degree angles of knurling). Tops of peaks can be
> flattened off, and the valleys can be chopped too (though that isn't
> possible when doing this on a lathe).
>
Beautiful work! This is a 'keeper' image for me, going into my collection.
I was wondering if you had previously tried the 'quilted' pattern (as turned
into a function, for use with the HF_Cylinder macro in shapes.inc)? That would
seem to be an alternate method to create a knurling effect on a cylinder,
although I haven't tried it myself.
Ken W.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Kenneth wrote:
> I was wondering if you had previously tried the 'quilted' pattern (as turned
> into a function, for use with the HF_Cylinder macro in shapes.inc)? That would
> seem to be an alternate method to create a knurling effect on a cylinder,
> although I haven't tried it myself.
>
> Ken W.
>
>
Actually I hadn't thought of that, I just have a mental association
between functions and normals, so I never thought of using it as a
heightfield. I may look into that at some point, maybe see if there are
performance gains for one implementation over the other.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
CShake <cshake+pov### [at] gmailcom> wrote:
> Actually I hadn't thought of that, I just have a mental association
> between functions and normals, so I never thought of using it as a
> heightfield. I may look into that at some point, maybe see if there are
> performance gains for one implementation over the other.
A cylindrical HF macro will do nothing different from what you did - it actually
creates a mesh, too - except that it cannot optimize, and you may get
"interference pattern" if you choose a too low resolution. So I guess your
custom-tailored knurl mesh should always be faster and of better quality.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"clipka" <nomail@nomail> wrote:
> A cylindrical HF macro will do nothing different from what you did - it actually
> creates a mesh, too - except that it cannot optimize, and you may get
> "interference pattern" if you choose a too low resolution. So I guess your
> custom-tailored knurl mesh should always be faster and of better quality.
Ah yes, you're right about that. And the HF_Cylinder macro can be quite slow at
hi-rez.
KW
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |