Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com Help Wanted Math Problems
 User Name Remember Me? Password

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
07-02-2006, 11:40 AM   PM User | #1
marceltinka
New to the CF scene

Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Help Wanted Math Problems

I do not know how to use javascript math.
Is there a good explanation where complicated formulas are being discussed.

K3 = [k0sin^41" (nu) sin(lat)cos^3(lat)/24][(5 - tan^2(lat) + 9e'^2cos^2(lat) + 4e'^4cos4(lat)]
where:
sin1" = pi/(180*60*60)
e = SQRT(1-b2/a2)
e'2 = (ea/b)2 = e2/(1-e2)
nu = a/(1-e2sin2(lat))1/2

^2 means x² and ^3 x³ and so on...
lat, k0, nu, e' are variables...

My tries causes wrong results.

The line is an example of some lines I need.
(attached files show topic and all formulas)

May someone can help me?

Thanks

Marcel
Attached Files
 allFormulas.zip (10.9 KB, 103 views)

 07-02-2006, 11:47 PM PM User | #2 joeframbach Regular Coder   Join Date: Dec 2002 Location: a bit west of pittsburgh Posts: 236 Thanks: 1 Thanked 0 Times in 0 Posts i am confused over this. sin(1") = pi/(180*60*60). shouldn't it be 1"=pi/(180*60*60)? either way, it is so close to 0 that sin(1") approximates 1", or 4.8481368 x 10^-6, or 0.0000048481368, so we'll just use that. Also, be very verbose when using * for multiplication and ^ for powers. try: Code: ```K3 = [k0 * sin(1")^4 * (nu) * sin(lat) * cos(lat)^3 /24] [ 5 - tan(lat)^2 + 9 * e'^2 * cos(lat)^2 + 4 * e'^4 * cos(lat)^4] where: sin1" = pi/(180*60*60) e = SQRT(1-b^2/a^2) e'2 = (e*a/b)^2 = e^2/(1-e^2) nu = a/(1-e^2 * sin(lat)^2) ^ (1/2)``` to explain the problem. Otherwise it is very hard to decipher without really looking into the documentation provided. Now to the solution: Code: ```var sin_one_minute = 0.0000048481368; var e = Math.sqrt(1-b*b/a*a); var e_prime_2 = Math.pow((e*a/b),2); var nu = a / Math.sqrt(1 - e*e * Math.pow(Math.sin(lat),2)); K3 = (k0 * Math.pow(sin_one_minute,4) * nu * Math.sin(lat) * Math.pow(Math.cos(lat),3) / 24) * (5 - Math.pow(Math.tan(lat),2) + 9 * e_prime_2 * Math.pow(Math.cos(lat),2) + 4 * Math.pow(e_prime_2,2) * Math.pow(Math.cos(lat),4));``` Note: I don't even know if this works. I just threw it together. All the necessary Math functions, Math.pow, Math.sqrt, Math.sin, Math.cos, Math.tan, are all you should need. Just note that they use radian measure and not degree measure.

 Bookmarks

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 12:28 AM.