Welcome, Guest. Please Login
SLINGING.ORG
 
Home Help Search Login


Pages: 1 2 3 4 
Send Topic Print
Clay Golf balls? (Read 4756 times)
NooneOfConsequence
Slinging.org Moderator
*****
Offline



Posts: 2983
Texas
Re: Clay Golf balls?
Reply #30 - Sep 10th, 2020 at 11:59pm
 
*Edit... I cleaned up the code for readability and fixed the relationship between the divots and the ball.  There was no point in leaving bad code (not that this is good... just less-bad), so I replaced my original post with the fixed code below...

try this script CA...  Smiley
you can scale the ball to get an elongated glande, but the divots will also stretch.  It's a start anyway...
========================================================
//=============
// Parametric Golf Ball
//   Written for Curious Aardvark
//   www.slinging.org
//
//
//=============


//User-Settable Parameters
//========================================
ball_dia = 42;

divot_dia = 5;

divot_depth = 1;

//divots around the equator of a golf ball = 30
numdivots_ring = 30;
// number of rings of divots between the equator and the pole of the ball... total number of actual rings is 2*numrings+1
numrings = 6;


//Calculated Parameters - Do not change
//========================================
ball_rad = ball_dia/2;
divot_rad = divot_dia/2;
//virtual surface radius where the divot beads go
divot_surface_rad = ball_rad+divot_rad-divot_depth;

//angle between divot beads
angle_increments= 360/numdivots_ring;

$fn = 50;


module main()
{
    difference()
    {
        positives();
        negatives();
    }
   
    //This next line is just for visualization of how the divots are made... should be commented out most of the time
    //%negatives();
   
    module positives()
    {
        sphere(d=ball_dia);
    }
   
    module negatives()
    {
       for(j=[0:numrings])
       {
           working_ring_rad = divot_surface_rad*cos(j*90/(numrings+1));
           ring_distance_from_center = divot_surface_rad*sin(j*90/(numrings+1));
           numdivots_ring = floor(3.14159*2*working_ring_rad/divot_dia);
          angle_increments = (360/numdivots_ring);
          rotate([0,j*angle_increments/2,0])
          for(i= [0:angle_increments:360])
          {
              //divots on right side
              translate([0,ring_distance_from_center,0]) rotate([0,i,0]) translate([divot_surface_rad*-cos(j*90/(numrings+1)),0,0]) scale([1,1,1])sphere(d=divot_dia);
              //divots on left side
             translate([0,-ring_distance_from_center,0]) rotate([0,i,0]) translate([divot_surface_rad*-cos(j*90/(numrings+1)),0,0]) scale([1,1,1])sphere(d=divot_dia);
             
          }
      
      }
      //cap the two ends with a single divot
      translate([0,divot_surface_rad,0]) sphere(d=divot_dia);
      translate([0,-divot_surface_rad,0]) sphere(d=divot_dia);
    }
}


scale([1,1,1]) main();
Back to top
« Last Edit: Sep 11th, 2020 at 10:11am by NooneOfConsequence »  

golfball.jpg (207 KB | 14 )
golfball.jpg

“My final hour is at hand. We face an enemy more numerous and cunning than the world has yet seen. Remember your training, and do not fear the hordes of Judas. I, without sin, shall cast the first stone. That will be your sign to attack! But you shall not fight this unholy enemy with stones. No! RAZOR GLANDES!  Aim for the eyes! May the Lord have mercy, for we shall show none!“  -Jesus the Noodler
 
IP Logged
 
NooneOfConsequence
Slinging.org Moderator
*****
Offline



Posts: 2983
Texas
Re: Clay Golf balls?
Reply #31 - Sep 11th, 2020 at 8:16am
 
IronGoober wrote on Sep 10th, 2020 at 3:05pm:
CA, I may join you in your OpenSCAD quest for a dimpled sphere. and I agree it isn't as simple as a for loop of rings of subtracted spheres. The dimples are close packed on a golf ball. A few nested for loops might do it, but I'm not convinced, I think the needed equation and/or algorithm to get the close packing is a bit more complex than that.


Now are you convinced IG? Grin
Back to top
 

“My final hour is at hand. We face an enemy more numerous and cunning than the world has yet seen. Remember your training, and do not fear the hordes of Judas. I, without sin, shall cast the first stone. That will be your sign to attack! But you shall not fight this unholy enemy with stones. No! RAZOR GLANDES!  Aim for the eyes! May the Lord have mercy, for we shall show none!“  -Jesus the Noodler
 
IP Logged
 
IronGoober
Interfector Viris Spurii
*****
Offline


...and now, No. 1, the
larch...

Posts: 1593
California
Gender: male
Re: Clay Golf balls?
Reply #32 - Sep 11th, 2020 at 10:13am
 
That looks pretty good! Better than I expected for sure. But I wonder if you could fully get the close packing of dimples (one dimple surrounded by 6 others, all touching) using this method.  I think you'd have to play with the spacing and rotation of each ring.

I'll take a swing at it when I get back from my vacation. Certainly did better than I expected.
Back to top
 

John R.
 
IP Logged
 
NooneOfConsequence
Slinging.org Moderator
*****
Offline



Posts: 2983
Texas
Re: Clay Golf balls?
Reply #33 - Sep 11th, 2020 at 10:58am
 
If you have nothing better to do with your time than reinvent the wheel in an unnecessarily complicated way, then I suppose you can do that IG, but there’s absolutely no need to do that. This  design is parametric. If you want the divots to touch, just change the parameters.  You can either increase divot_depth or increase divot_dia to get that result.

Increasing divot_dia will make the divots wider but not deeper. Increasing divot_depth will increase both the diameter and the depth of the divots. 
Back to top
 

“My final hour is at hand. We face an enemy more numerous and cunning than the world has yet seen. Remember your training, and do not fear the hordes of Judas. I, without sin, shall cast the first stone. That will be your sign to attack! But you shall not fight this unholy enemy with stones. No! RAZOR GLANDES!  Aim for the eyes! May the Lord have mercy, for we shall show none!“  -Jesus the Noodler
 
IP Logged
 
NooneOfConsequence
Slinging.org Moderator
*****
Offline



Posts: 2983
Texas
Re: Clay Golf balls?
Reply #34 - Sep 11th, 2020 at 11:09am
 
...by the way,  I think this conversation may have moved into the “too-much maths“ category, but when you try to do this your way, you will eventually realize that you can only pack circles perfectly touching 6 other circles on a planar surface (if all of the circles are the same size). When the surface you are packing is a sphere, the geometry doesn’t work out the same.

If you look at a real golf ball, a handful of the divots are smaller than the others because of this.
Back to top
 

“My final hour is at hand. We face an enemy more numerous and cunning than the world has yet seen. Remember your training, and do not fear the hordes of Judas. I, without sin, shall cast the first stone. That will be your sign to attack! But you shall not fight this unholy enemy with stones. No! RAZOR GLANDES!  Aim for the eyes! May the Lord have mercy, for we shall show none!“  -Jesus the Noodler
 
IP Logged
 
Curious Aardvark
Forum Moderation
*****
Offline


Taller than the average
Dwarf

Posts: 13965
Midlands England
Gender: male
Re: Clay Golf balls?
Reply #35 - Sep 11th, 2020 at 11:47am
 
right been doing some research.
Actually watching a video of a guy making dimpled fan blades - who actually did the research, I've just nicked it  Smiley

So - depth of golf ball dimples is 0.254mm ie: really bloody shallow.

Random patterns work better than regular patterns and it doesn't matter if the dimples overlap.
What is important is simply that the surface disrupts the flow of air.
An irregularly 'dimpled' surface is all that is requaired.

Which alll makes things a lot easier Smiley

Larger shallower dimples will have the same result as larger numbers of smaller ones.

So noc - while a great script (albeit formatted by a programmer and really bloody difficult to read whistle )  - it's too regular Smiley

But with with larger shallower dimples should be a good place to start.
Back to top
 

Do All things with Honour and Generosity: Regret Nothing, Envy None, Apologise Seldom and Bow your head to No One  - works for me Smiley
 
IP Logged
 
Curious Aardvark
Forum Moderation
*****
Offline


Taller than the average
Dwarf

Posts: 13965
Midlands England
Gender: male
Re: Clay Golf balls?
Reply #36 - Sep 11th, 2020 at 11:56am
 
lol - see this is where my -'what the hell does this do if I add some random numbers and rinse and repeat' method is better for this kind of thing.

You're script won't do large shallow dimples. The larger the dimples the fewer it generates and making them really shalow, just leaves pinpricks.

There probably needs to be a 'resize' or 'scale' in there for the dimple spheres. To keep the same surface area covered when you move them further away from the central sphere. 
Back to top
 

Do All things with Honour and Generosity: Regret Nothing, Envy None, Apologise Seldom and Bow your head to No One  - works for me Smiley
 
IP Logged
 
NooneOfConsequence
Slinging.org Moderator
*****
Offline



Posts: 2983
Texas
Re: Clay Golf balls?
Reply #37 - Sep 11th, 2020 at 12:11pm
 
Yes, I just noticed that I wrote it to NOT overlap the dimples... here's a fixed version where I added something called "overlap_constant" that allows the number of dimples to be unevenly spaced around each ring.  Try this version out instead and play around with the divot dia and overlap constant relationships and see if that gives you what you are looking for...
==================================

//=============
// Parametric Golf Ball
//   Written for Curious Aardvark
//   www.slinging.org
//
//
//=============


//User-Settable Parameters
//========================================
ball_dia = 43;

divot_dia = 7;

divot_depth = 1.25;

overlap_constant = 1.5;

//divots around the equator of a golf ball = 30
numdivots_ring = 30;
// number of rings of divots between the equator and the pole of the ball... total number of actual rings is 2*numrings+1
numrings = 6;


//Calculated Parameters - Do not change
//========================================
ball_rad = ball_dia/2;
divot_rad = divot_dia/2;
//virtual surface radius where the divot beads go
divot_surface_rad = ball_rad+divot_rad-divot_depth;

//angle between divot beads
angle_increments= 360/numdivots_ring;

$fn = 50;


module main()
{
    difference()
    {
        positives();
        negatives();
    }
   
    //This next line is just for visualization of how the divots are made... should be commended out most of the time
    //%negatives();
   
    module positives()
    {
        sphere(d=ball_dia);
    }
   
    module negatives()
    {
       for(j=[0:numrings])
       {
           working_ring_rad = divot_surface_rad*cos(j*90/(numrings+1));
           ring_distance_from_center = divot_surface_rad*sin(j*90/(numrings+1));
           numdivots_ring = floor(3.14159*2*working_ring_rad/divot_dia+overlap_constant);
          angle_increments = (360/numdivots_ring);
          rotate([0,j*angle_increments/3,0])
          for(i= [0:angle_increments:360])
          {
              //divots on right side
              translate([0,ring_distance_from_center,0]) rotate([0,i,0]) translate([divot_surface_rad*-cos(j*90/(numrings+1)),0,0]) scale([1,1,1])sphere(d=divot_dia);
              //divots on left side
             translate([0,-ring_distance_from_center,0]) rotate([0,i,0]) translate([divot_surface_rad*-cos(j*90/(numrings+1)),0,0]) scale([1,1,1])sphere(d=divot_dia);
             
          }
      
      }
      //cap the two ends with a single divot
      translate([0,divot_surface_rad,0]) sphere(d=divot_dia);
      translate([0,-divot_surface_rad,0]) sphere(d=divot_dia);
    }
}


scale([1,1,1]) main();
Back to top
 

“My final hour is at hand. We face an enemy more numerous and cunning than the world has yet seen. Remember your training, and do not fear the hordes of Judas. I, without sin, shall cast the first stone. That will be your sign to attack! But you shall not fight this unholy enemy with stones. No! RAZOR GLANDES!  Aim for the eyes! May the Lord have mercy, for we shall show none!“  -Jesus the Noodler
 
IP Logged
 
NooneOfConsequence
Slinging.org Moderator
*****
Offline



Posts: 2983
Texas
Re: Clay Golf balls?
Reply #38 - Sep 11th, 2020 at 12:29pm
 
Curious Aardvark wrote on Sep 11th, 2020 at 11:56am:
lol - see this is where my -'what the hell does this do if I add some random numbers and rinse and repeat' method is better for this kind of thing.

You're script won't do large shallow dimples. The larger the dimples the fewer it generates and making them really shalow, just leaves pinpricks.



Whatever you have to tell yourself to avoid learning basic geometry Grin

To get large, shallow dimples, you will have to increase the number of rings too. I could make the script smarter and have it automatically figure out the right ring spacing, but I get the feeling that you and IG will both just insist on doing this your own way anyway. Well... I demonstrated that you CAN use nested for loops to dimple a ball anyway. If you want to use a different approach, I won’t stop you Smiley
Back to top
 

“My final hour is at hand. We face an enemy more numerous and cunning than the world has yet seen. Remember your training, and do not fear the hordes of Judas. I, without sin, shall cast the first stone. That will be your sign to attack! But you shall not fight this unholy enemy with stones. No! RAZOR GLANDES!  Aim for the eyes! May the Lord have mercy, for we shall show none!“  -Jesus the Noodler
 
IP Logged
 
Curious Aardvark
Forum Moderation
*****
Offline


Taller than the average
Dwarf

Posts: 13965
Midlands England
Gender: male
Re: Clay Golf balls?
Reply #39 - Sep 13th, 2020 at 3:17pm
 
@noc - that looks aloty better - but I think we'll have to agree to disagree on what 'readibility' means in terms of openscad Smiley

I hate indents and like to keep one operation on one line, not stick each seperate command on a seperate line. And I hate really long variable names Smiley

Not a programmer Smiley

But the golf ball looks good Smiley

well until you put divot depth at 0.25 - at which point it all goes to pot Smiley

What we ned are reallly SHALLOW and wide 'divots'.
basically you need to reshape the sphere into a more flying saucer shape. to give maximum amount of 'sphere' in touch with the main sphere.

So why does everyone else use radius and not diameter ?

If I use diameter I know how big a sphere/cylinder is without having to think about it.
If you use radius you have to mentally double everything to get the actual size.

Just seems more work than necessary.
Back to top
 

Do All things with Honour and Generosity: Regret Nothing, Envy None, Apologise Seldom and Bow your head to No One  - works for me Smiley
 
IP Logged
 
Curious Aardvark
Forum Moderation
*****
Offline


Taller than the average
Dwarf

Posts: 13965
Midlands England
Gender: male
Re: Clay Golf balls?
Reply #40 - Sep 13th, 2020 at 3:27pm
 
I don't know about you noc - but I keep wanting to turn it into a deathstar Smiley
Back to top
 

Do All things with Honour and Generosity: Regret Nothing, Envy None, Apologise Seldom and Bow your head to No One  - works for me Smiley
 
IP Logged
 
NooneOfConsequence
Slinging.org Moderator
*****
Offline



Posts: 2983
Texas
Re: Clay Golf balls?
Reply #41 - Sep 13th, 2020 at 3:44pm
 
Ok CA... I will play around with the parameters and see if I can give you what you want.  The requirements keep changing. First it was a dimpled ball, then the dimples had to touch, then the pattern needed to be random, and then wide and shallow. Assuming that it stops changing, I can probably modify my script to give you what you want... unless what you really want is to just do it yourself... in which case I should stop “helping” Smiley
Back to top
 

“My final hour is at hand. We face an enemy more numerous and cunning than the world has yet seen. Remember your training, and do not fear the hordes of Judas. I, without sin, shall cast the first stone. That will be your sign to attack! But you shall not fight this unholy enemy with stones. No! RAZOR GLANDES!  Aim for the eyes! May the Lord have mercy, for we shall show none!“  -Jesus the Noodler
 
IP Logged
 
Captain_Twine
Descens
***
Offline


Substance is a Word.

Posts: 116
Somewhere with crummy rocks
Gender: male
Re: Clay Golf balls?
Reply #42 - Sep 14th, 2020 at 10:33am
 
Curious Aardvark wrote on Sep 13th, 2020 at 3:27pm:
I don't know about you noc - but I keep wanting to turn it into a deathstar Smiley

You'd need one heck of a sling for that, CA. Grin
Back to top
 

“For as this ought, or ought not, expresses some new relation or affirmation, 'tis necessary that it should be observed and explained; and... a reason should be given, for what seems altogether inconceivable, how this new relation can be a deduction from others, which are entirely different from it. ..[V]ice and virtue is not founded merely on the relations of objects, nor is perceived by reason.”
 
IP Logged
 
Archaic Arms
Funditor
****
Offline


Testing and inventing
"Archaic" weapons.

Posts: 728
Re: Clay Golf balls?
Reply #43 - Mar 10th, 2021 at 7:30pm
 
Any update on this?
Personally I think this would make for the great practice ammo once fired, and could fly far as well.
Perhaps a different route should be taken? Such as manually making a mould directly from a golf ball, or taking a smooth clay ball and rolling it on a dimpled sheet?
Back to top
 

Regards,
Lewis
WWW  
IP Logged
 
xud9a - call me zud 👍
Funditor
****
Offline


Ringing Slocks !

Posts: 567
Nottinghamshire, England
Gender: male
Re: Clay Golf balls?
Reply #44 - Mar 10th, 2021 at 8:27pm
 
No, stop, my Brian hurtings  xx
Back to top
 

My outlook on life is Aristotalean; on seeing an Acorn I see a potential oak tree rather than Plato's view that it is a failed copy.
BE SAFE,    BE SMILEY,   BE STRANGE
 
IP Logged
 
Pages: 1 2 3 4 
Send Topic Print
(Moderators: joe_meadmaker, Morphy, Kick, Chris, Rat Man, Curious Aardvark, vetryan15)