#A way of calculating trigs I found

1 messages · Page 1 of 1 (latest)

hot quarry
#

btw I made the diagram

cedar smelt
hot quarry
#

which calculates 15°

#

here's a small script that I wrote that calculates the angle closest to the "middle" diameter, though its got basically no comments for some reasons (I probably messed up when writing it and it worked so I didn't bother)

fallen widget
hot quarry
#

nvm the method doesn't really work

hot quarry
#

another way that I found

fallen widget
#

this will depend a lot on how you lay out your lines

#

if they are all equal angles apart, it will work

#

but going for sin(x) by approximating x/(π/2) and then going for the line in that index is probably not going to work in any other case

#

averaging the indices could work slightly better, or averaging the values of the lines in the 2 indices from sin and cos

#

not sure

#

calculating a set of equal-angle lines is not very hard
pick a starting slope (0.1, say) and apply (x+0.1)/(1-0.1x) repeatedly

#

0.1, 20/99, 299/970, ugh this gets tedious

ripe karma
#

just use taylor series lol

hot quarry
ripe karma
#

you only need to expand it out until sinx is accurate at pi/4

#

3 or 4 terms is enough to calculate sinx for any x, to extreme levels of accuracy

#

its the way computers do it

fallen widget
#

do it by measuring a triangle

ripe karma
#

or just

brittle nexusBOT
ripe karma
#

this will be more accurate and less computationally intensive

fallen widget
#

or just do the triangle thing

#

get a really big protractor

#

preferably with a radius of at least 1 m

#

very sharp pencil

#

ruler with fine marks

#

i mean unless you want to calculate 1.5^9/9!

#

that's fine

#

0.0001

ripe karma
#

iits more accurate if you use the part between [0,pi/4]

#

the rest of the sin graph is just copies of this

fallen widget
#

hmm, unless i guess you can use some sin(x) = 2sin(x/2)cos(x/2) tricks

ripe karma
#

The section from pi/4 to pi/2 is the same, it is just rotated 180 degrees around (pi/4,1/2)

fallen widget
ripe karma
#

i MEANT pi/2, idk why my hands wrote pi/4

#

i guess i misremembered

#

to specify, i mean the part of the sin graph, from 0, to the peak :)

fallen widget
#

sin(x) = sqrt(1 - sin^2(pi/2 - x))

#

that makes sense