A question for math pro´s

This forum is for topics related to pro shop operation and bowling center maintenance.
Usual topics include: shop gear, fitting, drilling and lane maintenance.

Moderator: Moderators

Post Reply
User avatar
Nsane
Certified Coach
Certified Coach
Posts: 650
Joined: June 15th, 2010, 5:01 pm
THS Average: 190
Positive Axis Point: 5 3/16 - 7/8 up
Speed: 17
Rev Rate: 300
Axis Tilt: 13°
Axis Rotation: 55°
Heavy Oil Ball: Brunswick Tenacity, Radical Tremendous
Medium Oil Ball: Guru mighty,
Light Oil Ball: Motiv venom cobra
Preferred Company: Radical
Location: Germany

A question for math pro´s

Post by Nsane »

I wanna make a JavaScript based free App that works like the Ebomite Oval calculator, wich is a part of the ProShop Coordinator.

Did anybody know the formulas how to calculate ovals including the splitting in several cuts?

And can anybody explain me what the following Text means. Remember i´m not american and english is not my nativ Language.

Out of EBONITE MILL DRILL OPERATIONS MANUAL page 16.

" Subtract the thickness from the width and that is how much you need to add to the hole in width. NOTE this is the total that you need to cut not the number that you move the tables. When using movements of both X and Y it basically adds 1/3 to the cut. In other words if you wanted to make a cut at 45degrees and add 30 thousandths in width to the hole you would move X (which is Left or right) .021 and then you would move Y (which is forward and back) .021 Then when you run the bit back in the existing hole it will add .030 to the hole at 45 degrees"
Image
Ducati what else?
---------------------------------------------------------------------------------------
nice people press +
User avatar
kellytehuna
Senior Member
Senior Member
Posts: 2891
Joined: January 18th, 2010, 11:11 pm
THS Average: 195
Positive Axis Point: 3.75", 1" up
Speed: 18
Rev Rate: 480
Axis Tilt: 17
Axis Rotation: 40
Heavy Oil Ball: Morich DestroyR
Medium Oil Ball: Morich Perpetual Motion
Light Oil Ball: Morich Mojave
Preferred Company: Morich
Location: Hazard, KY

Re: A question for math pro´s

Post by kellytehuna »

Nsane wrote:I wanna make a JavaScript based free App that works like the Ebomite Oval calculator, wich is a part of the ProShop Coordinator.

Did anybody know the formulas how to calculate ovals including the splitting in several cuts?

And can anybody explain me what the following Text means. Remember i´m not american and english is not my nativ Language.

Out of EBONITE MILL DRILL OPERATIONS MANUAL page 16.

" Subtract the thickness from the width and that is how much you need to add to the hole in width. NOTE this is the total that you need to cut not the number that you move the tables. When using movements of both X and Y it basically adds 1/3 to the cut. In other words if you wanted to make a cut at 45degrees and add 30 thousandths in width to the hole you would move X (which is Left or right) .021 and then you would move Y (which is forward and back) .021 Then when you run the bit back in the existing hole it will add .030 to the hole at 45 degrees"
I'm assuming you're a programmer, so I assume you're comfortable with variables, so this problems breaks down like this:

Code: Select all

/* The following need to come from an input source, like a form */
var pilot_size = .891; // The size of the pilot drill bit eg. 57/64"
var total_size = .955;  // Total size of the hole
var total_diff  = total_size - pilot_size; // The difference between the pilot and total hole size
var oval_angle = 20; // The oval angle (in degrees)

/* From here we're getting down to business */
var num_cuts = ceil(total_diff / .015); // total number of cuts

/* From here its a matter of doing a look up to find the appropriate movement for 0.015 at the given angle */
var x = 0.014, y = 0.005; // X and Y movements of the mill table

var movements = [];

for(var i = 1; i <= num_cuts; i++) {
  movements.push({x: x*i, y: y*i});
}

/* movements now contains all the necessary mill table movements, all you have to do now is output*/
Father, Husband, Bowler, Web developer

15lb Morich DestroyR, Mania, Perpetual Motion, Craze, Frenzy, Mojave
15lb Radical Yeti
15lb Brunswick Slingshot, Avalanche Urethane

Highest score: 279
Highest series: 818
ReSiStAnCe
Member
Member
Posts: 13
Joined: February 4th, 2010, 4:35 pm
Preferred Company: STORM

Re: A question for math pro´s

Post by ReSiStAnCe »

kellytehuna wrote: I'm assuming you're a programmer, so I assume you're comfortable with variables, so this problems breaks down like this:

Code: Select all

/* The following need to come from an input source, like a form */
var pilot_size = .891; // The size of the pilot drill bit eg. 57/64"
var total_size = .955;  // Total size of the hole
var total_diff  = total_size - pilot_size; // The difference between the pilot and total hole size
var oval_angle = 20; // The oval angle (in degrees)

/* From here we're getting down to business */
var num_cuts = ceil(total_diff / .015); // total number of cuts

/* From here its a matter of doing a look up to find the appropriate movement for 0.015 at the given angle */
var x = 0.014, y = 0.005; // X and Y movements of the mill table

var movements = [];

for(var i = 1; i <= num_cuts; i++) {
  movements.push({x: x*i, y: y*i});
}

/* movements now contains all the necessary mill table movements, all you have to do now is output*/
You don't really need the table...
If you do some sketches in a CAD-program ( I use Inventor) you soon realize that it really comes down to Pythagoras' theorem..

1) The ratio of the x and y movement determine the angle.

2) x²+y² = z² = (width of hole)²

http://en.wikipedia.org/wiki/Pythagorea ... c_identity
http://en.wikipedia.org/wiki/Pythagorean_theorem

So instead of putting a table in your program you can generate one or just calculate the necessary movements on the fly.

Just my 2c.
User avatar
kellytehuna
Senior Member
Senior Member
Posts: 2891
Joined: January 18th, 2010, 11:11 pm
THS Average: 195
Positive Axis Point: 3.75", 1" up
Speed: 18
Rev Rate: 480
Axis Tilt: 17
Axis Rotation: 40
Heavy Oil Ball: Morich DestroyR
Medium Oil Ball: Morich Perpetual Motion
Light Oil Ball: Morich Mojave
Preferred Company: Morich
Location: Hazard, KY

Re: A question for math pro´s

Post by kellytehuna »

I suspected that was the case. Good to know :)

I think a lookup table would be faster, but the Math would be simpler to implement.
Father, Husband, Bowler, Web developer

15lb Morich DestroyR, Mania, Perpetual Motion, Craze, Frenzy, Mojave
15lb Radical Yeti
15lb Brunswick Slingshot, Avalanche Urethane

Highest score: 279
Highest series: 818
User avatar
Nsane
Certified Coach
Certified Coach
Posts: 650
Joined: June 15th, 2010, 5:01 pm
THS Average: 190
Positive Axis Point: 5 3/16 - 7/8 up
Speed: 17
Rev Rate: 300
Axis Tilt: 13°
Axis Rotation: 55°
Heavy Oil Ball: Brunswick Tenacity, Radical Tremendous
Medium Oil Ball: Guru mighty,
Light Oil Ball: Motiv venom cobra
Preferred Company: Radical
Location: Germany

Re: A question for math pro´s

Post by Nsane »

the fastest whould be to calculate the single movements using the given numbers and pythagoras. but thats not my business.

@kelly! after finding a little error

var num_cuts = ceil(total_diff / .035); > var num_cuts = Math.ceil (total_diff / .035); it runs well.
But! I just get [object Object] as output. I never worked with associative Array´s.
How do i get the numbers.

I guess i have to put the script in a function and start it "onLoad", cause it can´t write in textfields that are not created. The script is runnin before the body is loaded.
Can you program the Output Loop please. Than i can write it in a formular textarea!

Thanks a lot for your commitment!


PS: I figured out a way to drill ovals without any calculations, just by using 2 Drillbits, a ProSect and a Greaser.
Image
Ducati what else?
---------------------------------------------------------------------------------------
nice people press +
User avatar
kellytehuna
Senior Member
Senior Member
Posts: 2891
Joined: January 18th, 2010, 11:11 pm
THS Average: 195
Positive Axis Point: 3.75", 1" up
Speed: 18
Rev Rate: 480
Axis Tilt: 17
Axis Rotation: 40
Heavy Oil Ball: Morich DestroyR
Medium Oil Ball: Morich Perpetual Motion
Light Oil Ball: Morich Mojave
Preferred Company: Morich
Location: Hazard, KY

Re: A question for math pro´s

Post by kellytehuna »

Full solution. Took me like... an hour! UI is fugly, but I don't care. Just proof that it works.

Code: Select all

<!DOCTYPE HTML>
<html>
<head>
<title></title>

<style type="text/css">
#wrapper { width: 400px; padding: 15px; border: 1px solid #999; background: #efefef; border-radius: 10px; -webkit-border: 10px; -moz-border-radius: 10px; }
fieldset { border: none; padding: 0; margin: 0; }
fieldset div { padding: 5px; } 

label { width: 100px; display: inline-block; }
input { width: 50px; }
select, option { width: 56px; }

button { background: #aaa; border: 1px solid #333; color: #333; }

#mill { display: none; border-top: 1px solid #333; margin-top: 15px; padding-top: 15px; }
#movements { width: 200px; border-collapse: collapse; }
#movements tr th { padding: 5px; border: 1px solid #333; background: #999; }
#movements tr td { padding: 5px; border: 1px solid #999; background: #f9f9f9; }
#movements tr:nth-child(2n) td { background: #ddd; }
</style>
</head>
<body>
    <div id="wrapper">
        <h1>Oval mill movements</h1>
        <form action="#" id="hole_specs">
            <fieldset>
                <legend>Bowler oval thumb specs</legend>
                <div>
                    <label for="pilot">Pilot hole size</label>
                    <select name="pilot" id="pilot">
                        <option value="0.500">1/2"</option>
                        <option value="0.516">33/64"</option>
                        <option value="0.531">17/32"</option>
                        <option value="0.547">35/64"</option>
                        <option value="0.563">9/16"</option>
                        <option value="0.578">37/64"</option>
                        <option value="0.594">19/32"</option>
                        <option value="0.609">39/64"</option>
                        <option value="0.625">5/8"</option>
                        <option value="0.641">41/64"</option>
                        <option value="0.656">21/32"</option>
                        <option value="0.672">43/64"</option>
                        <option value="0.688">11/16"</option>
                        <option value="0.703">45/64"</option>
                        <option value="0.719">23/32"</option>
                        <option value="0.734">47/64"</option>
                        <option value="0.750">3/4"</option>
                        <option value="0.766">49/64"</option>
                        <option value="0.781">25/32"</option>
                        <option value="0.797">51/64"</option>
                        <option value="0.813">13/16"</option>
                        <option value="0.828">53/64"</option>
                        <option value="0.843">27/32"</option>
                        <option value="0.859">55/64"</option>
                        <option value="0.875">7/8"</option>
                        <option value="0.891">57/64"</option>
                        <option value="0.906">29/32"</option>
                        <option value="0.922">59/64"</option>
                        <option value="0.938">15/16"</option>
                        <option value="0.953">61/64"</option>
                        <option value="0.969">31/32"</option>
                        <option value="0.984">63/64"</option>
                        <option value="1.000">1"</option>
                        <option value="1.016">1 1/64"</option>
                        <option value="1.031">1 1/32"</option>
                        <option value="1.047">1 3/64"</option>
                        <option value="1.063">1 1/16"</option>
                        <option value="1.078">1 5/64"</option>
                        <option value="1.094">1 3/32"</option>
                        <option value="1.109">1 7/64"</option>
                        <option value="1.125">1 1/8"</option>
                        <option value="1.141">1 9/64"</option>
                        <option value="1.156">1 5/32"</option>
                        <option value="1.172">1 11/64"</option>
                        <option value="1.186">1 3/16"</option>
                        <option value="1.203">1 13/64"</option>
                        <option value="1.219">1 7/32"</option>
                        <option value="1.234">1 15/64"</option>
                        <option value="1.250">1 1/4"</option>
                        <option value="1.266">1 17/64"</option>
                        <option value="1.281">1 9/32"</option>
                        <option value="1.287">1 19/64"</option>
                        <option value="1.313">1 5/16"</option>
                        <option value="1.328">1 21/64"</option>
                        <option value="1.344">1 11/32"</option>
                        <option value="1.359">1 23/64"</option>
                        <option value="1.375">1 3/8"</option>
                        <option value="1.391">1 25/64"</option>
                        <option value="1.406">1 13/32"</option>
                        <option value="1.422">1 27/64"</option>
                        <option value="1.438">1 7/16"</option>
                        <option value="1.453">1 29/64"</option>
                        <option value="1.469">1 15/32"</option>
                        <option value="1.484">1 31/64"</option>
                        <option value="1.500">1 1/2"</option>
                    </select>
                </div>
                <div>
                    <label for="total">Total hole size</label>
                    <input name="total" id="total" type="text" value="0.547"/>
                </div>
                <div>
                    <label for="angle">Oval angle</label>
                    <select name="angle" id="angle">
                        <option value="20">20&deg;</option>
                        <option value="25">25&deg;</option>
                        <option value="30">30&deg;</option>
                        <option value="35">35&deg;</option>
                        <option value="40">40&deg;</option>
                        <option value="45">45&deg;</option>
                        <option value="50">50&deg;</option>
                        <option value="55">55&deg;</option>
                        <option value="60">60&deg;</option>
                        <option value="65">65&deg;</option>
                        <option value="70">70&deg;</option>
                    </select>
                </div>
                <div class="buttons">
                    <button type="submit" name="submit">Submit</button>
                </div>
            </fieldset>
        </form>

        <div id="mill">
            <table id="movements">
                <thead>
                    <tr>
                        <th>X</th>
                        <th>Y</th>
                        <th>Width</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td class="x"></td>
                        <td class="y"></td>
                        <td class="cut"></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
    var mill_table = {
        20 : {x: 0.014, y: 0.005},
        25 : {x: 0.0135, y: 0.0065},
        30 : {x: 0.013, y: 0.0075},
        35 : {x: 0.0125, y: 0.0085},
        40 : {x: 0.0115, y: 0.0095},
        45 : {x: 0.0105, y: 0.0105},
        50 : {x: 0.0095, y: 0.0115},
        55 : {x: 0.0085, y: 0.0125},
        60 : {x: 0.0075, y: 0.013},
        65 : {x: 0.0065, y: 0.0135},
        70 : {x: 0.005, y: 0.014}
    };

    $('#hole_specs').submit(function(e) {
        e.stopPropagation();
        e.preventDefault();

        $('#mill').fadeOut('800');

        var pilot = Math.round(parseFloat($('select[name=pilot]').val()) * 1000) / 1000,
            total = Math.round(parseFloat($('input[name=total]').val()) * 1000) / 1000,
            angle = parseInt($('select[name=angle]').val(),10);

        var difference = total - pilot,
            x = Math.round(mill_table[angle].x * 1000) / 1000,
            y = Math.round(mill_table[angle].y * 1000) / 1000,
            cut_size = Math.sqrt(Math.pow(x,2) + Math.pow(y,2)),
            cuts = Math.ceil(difference / cut_size),
            table = $('#movements'),
            rows = [],
            row = $('tbody tr:first-child', table).clone(),
            r = null;

        for(var i = 0; i < cuts; i++) {
            r = row.clone();
            r.find('.x').text(Math.round(i * x * 1000) / 1000).end()
             .find('.y').text(Math.round(i * y * 1000) / 1000).end()
             .find('.cut').text(Math.round((pilot + (i * cut_size)) * 1000) / 1000).end();

            rows.push(r);
        }

        $('tbody',table).empty();

        $.each(rows, function(idx, item) {
            $('tbody', table).append(item);
        });

        $('#mill').fadeIn('800');
    });
});
</script>
</body>
</html>
As for "associative" arrays, you can access it use dot notation OR array-style access.

Code: Select all

var assoc = {
a: 'hello',
b: 'world',
c: 'um... yeah'
};

// assoc.a contains 'hello', as does assoc['a']
// assoc.b contains 'world', as does assoc['b']
// assoc.c contains 'um... yeah', as does assoc['c']
Look at that, Javascript lessons on a bowling forum. Who'd have thought...
Father, Husband, Bowler, Web developer

15lb Morich DestroyR, Mania, Perpetual Motion, Craze, Frenzy, Mojave
15lb Radical Yeti
15lb Brunswick Slingshot, Avalanche Urethane

Highest score: 279
Highest series: 818
User avatar
Nsane
Certified Coach
Certified Coach
Posts: 650
Joined: June 15th, 2010, 5:01 pm
THS Average: 190
Positive Axis Point: 5 3/16 - 7/8 up
Speed: 17
Rev Rate: 300
Axis Tilt: 13°
Axis Rotation: 55°
Heavy Oil Ball: Brunswick Tenacity, Radical Tremendous
Medium Oil Ball: Guru mighty,
Light Oil Ball: Motiv venom cobra
Preferred Company: Radical
Location: Germany

Re: A question for math pro´s

Post by Nsane »

WOW!!!

Much much more as i expected. With my question for programing, i just asked for a loop to read the datas out of the array cause my result was allways [object Object].
Your work is classes better than mine. I´m mediendesigner but just work with Joomla and rarely PHP an MySql but not with Javascript and its a long time ago i learnd the basics of it. How ever.
You did a cool work that others can use also. We should put it in the Wiki as downloadible HTML-file to make it for all forumusers availible.

Good work!

Let me know if a can do something for you!

Thomas
Image
Ducati what else?
---------------------------------------------------------------------------------------
nice people press +
User avatar
kellytehuna
Senior Member
Senior Member
Posts: 2891
Joined: January 18th, 2010, 11:11 pm
THS Average: 195
Positive Axis Point: 3.75", 1" up
Speed: 18
Rev Rate: 480
Axis Tilt: 17
Axis Rotation: 40
Heavy Oil Ball: Morich DestroyR
Medium Oil Ball: Morich Perpetual Motion
Light Oil Ball: Morich Mojave
Preferred Company: Morich
Location: Hazard, KY

Re: A question for math pro´s

Post by kellytehuna »

You're welcome. If you want to use, its yours to use as you please :) It's dependent on the jQuery javascript library. It's actually pretty rough still, but the bare essentials are there.

I'm actually a PHP/MySQL developer, but I'm very comfortable with HTML, Javascript and CSS, so all this was fairly simple.
Father, Husband, Bowler, Web developer

15lb Morich DestroyR, Mania, Perpetual Motion, Craze, Frenzy, Mojave
15lb Radical Yeti
15lb Brunswick Slingshot, Avalanche Urethane

Highest score: 279
Highest series: 818
User avatar
Nsane
Certified Coach
Certified Coach
Posts: 650
Joined: June 15th, 2010, 5:01 pm
THS Average: 190
Positive Axis Point: 5 3/16 - 7/8 up
Speed: 17
Rev Rate: 300
Axis Tilt: 13°
Axis Rotation: 55°
Heavy Oil Ball: Brunswick Tenacity, Radical Tremendous
Medium Oil Ball: Guru mighty,
Light Oil Ball: Motiv venom cobra
Preferred Company: Radical
Location: Germany

Re: A question for math pro´s

Post by Nsane »

Hi Kelly!!

I have tested a bit and this is the result of your first program!
Check it out!!! Test it with diffrent sizes and angels!

Code: Select all

<html><head>
<script type="text/javascript" language="JavaScript">
<!--
// ------- Input -----Dateneingabe------------------------------------------------------------------------------------------


function ovalcalc(){

var breite = document.ovalform.oval.value;
var dicke = document.ovalform.pilot.value;
var winkel = document.ovalform.angel.value;
var rest_brutto  = breite - dicke;		 // The difference between the pilot and total hole size

var cut = 0.052; 



if(winkel < 31){
	cut = 0.045;
	};

if(winkel > 60){
	cut = 0.045;
	};


alert(cut);
var radians = winkel *(Math.PI / 180);  	// useable angel calc (pi/180*angel);

var rest= Math.round(rest_brutto *1000)/1000;

var num_cuts = Math.floor(rest / cut) ;    //  number of cuts


//--Moves-------------------------------------------------------------------------------------------------------------

// Berechnung der x Bewegungen, calculation of the x-moves with cosinus

var x_cosi = cut * Math.cos(radians);
var x = Math.round(x_cosi * 1000)/1000;

// Berechnung der y Bewegungen, calculation of the moves by using tangens of x

var y_brutto =  x* Math.tan(radians);  
var y = Math.round(y_brutto * 1000)/1000;

// ------finalcut----------------------------------------------------------------------

var finalcut = rest - (num_cuts * cut);  
			// for last cut
finalcut = Math.round(finalcut * 1000)/1000;	// down to 3 numbers behind .




var finalcut_x_brutto  = finalcut * Math.cos(radians);	// calc x not rounded
var finalcut_x = Math.round(finalcut_x_brutto * 1000)/1000;   // down to 3 numbers behind .

var finalcut_y_brutto  =finalcut_x * Math.tan(radians);	// calc y not rounded
var finalcut_y = Math.round(finalcut_y_brutto * 1000)/1000;   // down to 3 numbers behind .



// ------------------Output--------Ausgabe----------------------------------------------------------------------

	document.ovalform.cuts.value = num_cuts;
	document.ovalform.x_move.value = x;
	document.ovalform.y_move.value = y;
	document.ovalform.fc_x.value = finalcut_x;
	document.ovalform.fc_y.value = finalcut_y;
	document.ovalform.angel.value = winkel;
	document.ovalform.oval.value = breite;
	document.ovalform.pilot.value = dicke;
	document.ovalform.reste.value = rest;

	if (num_cuts < 1){
				document.ovalform.x_move.value = "";
				document.ovalform.y_move.value = "";
				document.ovalform.cuts.value = "keine";
			};
};
document.write(finalcut,rest,num_cuts,cut);
//-->
</script>
<style type="text/css">
<!--
th {
	text-align: right;
}
body {
	text-align: center;
	font-family: "Courier New", Courier, monospace;
	font-weight: bold;
	background-color: #FC0;
}
table {
	background-repeat: no-repeat;
	background-position: right top;
}
#input {
	background-color: #000;
	color: #FC0;
	text-align: left;
	font-family: Verdana, Geneva, sans-serif;
	font-weight: bold;
	font-size: 24px;
}
#output {
	color: #FC0;
	background-color: #000;
	text-align: left;
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 24px;
}
#out {
	margin-top: 30px;
}
.felder {
	background-color: #333;
	padding-left: 5px;
	font-family: Verdana, Geneva, sans-serif;
	color: #6F0;
	font-weight: bolder;
	font-size: 18px;
}
#out {
	text-align: left;
	color: #000;
}
#feld {
	width: 350px;
	margin-right: auto;
	margin-left: auto;
	border: medium inset #000;
	padding: 25px;
	background-image: url(verlauf_calc.jpg);
	background-repeat: repeat-y;
	border-radius: 20px;
	-webkit-border: 20px;
	-moz-border-radius: 20px;
	font-size: 16px;
	color: #000;
	text-align: left;
	font-family: Verdana, Geneva, sans-serif;
	float: none;
}
#feld fieldset legend {
	display: block;
	text-align: left;
	color: #F00;
	font-size: 36px;
	font-family: "Times New Roman", Times, serif;
	padding-top: 0px;
	padding-right: 0px;
	padding-bottom: 0px;
	padding-left: 10px;
}
#feld fieldset {
	background-attachment: fixed;
	background-image: url(bit.png);
	background-repeat: no-repeat;
	background-position: right top;
	border: 1px solid #000;
	border-radius: 10px;
	-webkit-border: 10px;
	-moz-border-radius: 10px;
}
.oval {
	color: #000;
}
-->
</style>
<title>Topschi´s Ovalrechner</title>
</head>
<body>


<form name="ovalform" action="#" method="post" onSubmit="return false">
  <div id="feld">Eingabe der Daten Daumenbreite und Daumenhöhe mit dem Dezimalunkt "." und nicht mit dem Komma!
  <fieldset>
    <legend><span class="oval">Oval</span>calculator</legend>
    <table width="302" border="0" cellpadding="2">
      <tr id="input">
        <th colspan="2" align="center" scope="row">Input</th>
        </tr>
        <tr>
        <th bgcolor="#CCCCCC" scope="row">Daumenbreite </th>
        <td><input name="oval" type="text" class="felder" id="oval" value="." size="5" maxlength="5">"</td>
        </tr>
      <tr>
        <th width="140" bgcolor="#CCCCCC" scope="row">Daumenhöhe</th>
        <td width="136"><input name="pilot" type="text" class="felder" id="pilot" value="." size="5" maxlength="5">"</td>
        </tr>
      <tr>
        <th bgcolor="#CCCCCC" scope="row"><label>Daumenwinkel </label></th>
        <td><input name="angel" type="text" class="felder" id="angel" value="" size="4" maxlength="2">°</td>
        </tr>
      <tr>
        <th bgcolor="#CCCCCC" scope="row"></th>
        <td>
          <input type="submit" name="button" id="button" value="berechnen " onClick="javascript:ovalcalc()">
          </td>
        </tr>
      </table> 
      
      <!-- ------output ------------------------------------------------------------------------------------------------>
      
    <table width="300" border="0" cellpadding="2" id="out">
      <tr id="output">
        <th colspan="2" scope="row">Output</th>
        </tr>
      <tr>
        <th bgcolor="#CCCCCC" scope="row">Differenz </th>
        <td><label>
          <input name="reste" type="text" class="felder" id="reste" value=""  size="10" maxlength="5" readonly="readonly">
        </label></td>
      </tr>
      <tr>
        <th bgcolor="#CCCCCC" scope="row">Extracuts</th>
        <td><label>
          <input name="cuts" type="text" class="felder" id="cuts" value="" size="3" maxlength="2" readonly="readonly">
          </label></td>
        </tr>
      <tr>
        <th width="147" bgcolor="#CCCCCC" scope="row">x</th>
        <td width="139"><label>
          <input name="x_move" type="text" class="felder" id="x_move" value="" size="10" maxlength="5" readonly="readonly">
          </label></td>
        </tr>
      <tr>
        <th bgcolor="#CCCCCC" scope="row"><label>y</label></th>
        <td><input name="y_move" type="text" class="felder" id="y_move" value="" size="10" maxlength="5" readonly="readonly"></td>
        </tr>
      <tr class="tabellenbezeichnung" id="finalcut">
        <th bgcolor="#CCCCCC" class="felder" scope="row">Finalcut</th>
        <th scope="row">&nbsp;</th>
        </tr>
      <tr>
        <th bgcolor="#CCCCCC" scope="row">x </th>
        <td><label>
          <input name="fc_x" type="text" class="felder" id="fc_x" value="" size="10" maxlength="5" readonly="readonly">
          </label></td>
        </tr>
      <tr>
        <th bgcolor="#CCCCCC" scope="row">y</th>
        <td><input name="fc_y" type="text" class="felder" id="fc_y" value="" size="10" maxlength="5 " readonly="readonly"></td>
      </tr>
      <tr>
        <th bgcolor="#CCCCCC" scope="row">&nbsp;</th>
        <td><label>
          <input type="reset" name="button2" id="button2" value="Zur&uuml;cksetzen">
        </label></td>
      </tr>
      </table>
  </fieldset>
  </div>
</form>
</body>
</head>
Thomas <--- He never gives up!
Image
Ducati what else?
---------------------------------------------------------------------------------------
nice people press +
User avatar
Mo Pinel
Rest In Peace
Rest In Peace
Posts: 10054
Joined: January 26th, 2010, 6:10 pm
Preferred Company: MoRich, & now RADICAL BT
Location: Richmond, VA

Re: A question for math pro´s

Post by Mo Pinel »

Nsane wrote:I wanna make a JavaScript based free App that works like the Ebomite Oval calculator, wich is a part of the ProShop Coordinator.

Did anybody know the formulas how to calculate ovals including the splitting in several cuts?

And can anybody explain me what the following Text means. Remember i´m not american and english is not my nativ Language.

Out of EBONITE MILL DRILL OPERATIONS MANUAL page 16.

" Subtract the thickness from the width and that is how much you need to add to the hole in width. NOTE this is the total that you need to cut not the number that you move the tables. When using movements of both X and Y it basically adds 1/3 to the cut. In other words if you wanted to make a cut at 45degrees and add 30 thousandths in width to the hole you would move X (which is Left or right) .021 and then you would move Y (which is forward and back) .021 Then when you run the bit back in the existing hole it will add .030 to the hole at 45 degrees"

That's easy! Use the Pythagorean theorem. C squared = A squared + B squared.

If you use a 45* oval, the relationship is that the total cut equals the horizontal (or vertical) cut times 1.414! That's a mathematical fact. Bear in mind that there is play in the shaft of the mill, therefore the real cut will be less than the theoretical number.
Rest In Peace (1942-2021)
Post Reply