howdy folks,
sorry for the delay in responding. thank you for everyone's input.
thank you, curious aardvark, for your suggestions. i was about to post where i had gotten to when i saw your post and knew i should
rework my approach. using variables as you did makes it easier to enter the variables that one uses and receives from the formula.
also creating the sphere upside down. thanx...
there are two sphere types i am concerned with. one with just a sound hole and one with a hollow cylindrical neck as a sound hole.
here is the scad code for the first one, adapted with your help.
Quote:
// Spherical Resonator
// The formula below can be entered into a
// calculator that can do expressions, like google,
// and the result will be the diameter of the sphere in meters.
// 17.87*((d/(f^2))^(1/3))
// Where:
// d= diameter of sound hole in meters
// f= frequency(Hz)
// Example: A 220Hz
// in millimeters
$fn=100;
sd=143.38; //sphere diameter
wt=2; // thickness of sphere wall
hs=25; // hole size
difference() {
sphere(d=sd); //create sphere with diameter set by sd
sphere(d=sd-(2*wt)); //remove sphere from centre of original sphere - size defined by wt
translate([0,0,-sd/2])cylinder(d=hs,h=wt*2); // remove hole from bottom of sphere - diameter defined by hs
}
here was my approach for spheres with a neck.
Quote:
// Spherical Resonator With Neck
// The formula below can be entered into any
// calculator that can do expressions, like google, and the
// result will be the diameter of the sphere in meters.
// ((3*(d^2)*(343.59^2))/(8*L*(f^2)*(3.14^2)))^(1/3)
// Where:
// d= diameter of sound hole in meters
// L= length of the neck in meters
// f= frequency(Hz)
// Example: A 220Hz
// in millimeters
//Sphere
difference() {
sphere(r=68.24, $fn=40);
sphere(r=66.24, $fn=40); // The radius of the second sphere is the target radius
cylinder(r=12.5, h=68.24, $fn=50); // The height of the cylinder is the radius of the first sphere
}
//Neck
difference() {
translate([0,0,66.24]) // Cylinders are translated the radius of the second sphere.
cylinder(r=14.5, h=25, $fn=50);
translate([0,0,66.24])
cylinder(r=12.5, h=25, $fn=50); // Second cylinder radius is the target radius.
}
i attempted to use your variable approach for the neck in the following manner and was unsuccessful.
Quote:
$fn=100;
sd=132.48; //sphere diameter
wt=2; // thickness of sphere wall
hs=25; // hole size
ln=25; // length of neck
//Sphere
difference() {
sphere(d=sd); //create sphere with diameter set by sd
sphere(d=sd-(2*wt)); //remove sphere from centre of original sphere - size defined by wt
translate([0,0,-sd/2])cylinder(d=hs,h=wt*2); // remove hole from bottom of sphere - diameter defined by hs
}
//Neck
difference() {
translate([0,0,-sd/2])cylinder(d=hs+wt,h=ln);
translate([0,0,-sd/2])cylinder(d=hs,h=ln);
}
and thank you roxy. your help gave me a base to work from and the courage to think i could actually do this.
"most magic tricks are easy once you know the secret"
-marshall broudien