Pythagoras
Hi.
When designing the contrapteur mini-cnc, I had to find out how to place the diagonal bar ( so that the holes of the diagonal bar it right in front of holes in the two other angles.
Now that I have the actual angle to play with, it's quite easy, but in Sketchup, trial and error was quite a burden.
Here is an array I used, that gives the round hypotenuses for different angle lengths, it was quite usefull to decide which length to give to which angle :
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | ||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||
| 3 | 5 | |||||||||||||||||||||||||||||
| 4 | 5 | |||||||||||||||||||||||||||||
| 5 | 13 | |||||||||||||||||||||||||||||
| 6 | 10 | |||||||||||||||||||||||||||||
| 7 | 25 | |||||||||||||||||||||||||||||
| 8 | 10 | 17 | ||||||||||||||||||||||||||||
| 9 | 15 | |||||||||||||||||||||||||||||
| 10 | 26 | |||||||||||||||||||||||||||||
| 11 | ||||||||||||||||||||||||||||||
| 12 | 13 | 15 | 20 | |||||||||||||||||||||||||||
| 13 | ||||||||||||||||||||||||||||||
| 14 | ||||||||||||||||||||||||||||||
| 15 | 17 | 25 | ||||||||||||||||||||||||||||
| 16 | 20 | 34 | ||||||||||||||||||||||||||||
| 17 | ||||||||||||||||||||||||||||||
| 18 | 30 | |||||||||||||||||||||||||||||
| 19 | ||||||||||||||||||||||||||||||
| 20 | 25 | 29 | ||||||||||||||||||||||||||||
| 21 | 29 | 35 | ||||||||||||||||||||||||||||
| 22 | ||||||||||||||||||||||||||||||
| 23 | ||||||||||||||||||||||||||||||
| 24 | 25 | 26 | 30 | |||||||||||||||||||||||||||
| 25 | ||||||||||||||||||||||||||||||
| 26 | ||||||||||||||||||||||||||||||
| 27 | ||||||||||||||||||||||||||||||
| 28 | 35 | |||||||||||||||||||||||||||||
| 29 | ||||||||||||||||||||||||||||||
| 30 | 34 |
And the Perl script to generate it :
print "|| ||~ ", join('||~ ',map $_ , 1..30 ) , "||\n"; for my $x ( 1 .. 30 ){ print "||~ $x ||", join('||', map int(sqrt(($_*$_)+($x*$x)))==sqrt(($_*$_)+($x*$x)) ? int(sqrt(($_*$_)+($x*$x))) : ' ' , 1..30 ) , "||\n"; }
Just in case this can help someone else …