Degress to radians conversion

42 views
Skip to first unread message

Johnphilip Casanare

unread,
Jun 28, 2014, 10:10:38 PM6/28/14
to mitappinv...@googlegroups.com
Hi guys. I'll just ask for a little help. I'm having a difficulty on my app which is conversion on degress to radians and vice versa. When i convert my degree value to pi radians, I divide my value to 180 so I got a decimal answer. What I want to know is how to end up on a fraction answer on lowest term already and not a decimal. I'll appreciate your effort. Thank YOU!

Abraham Getzler

unread,
Jun 28, 2014, 11:46:11 PM6/28/14
to mitappinv...@googlegroups.com

You want to show something like this?


There's an exhaustive discussion of how to show math in html at
http://www.cs.tut.fi/~jkorpela/math/

The webviewer component and html and javascript might do it.

A simpler approach would be take an image of pi,  and
nest horizontal and vertical screen arrangements  and labels
and images to build your two different conversion samples, like in
the format in the above picture.

If you want something less fancy but simpler to code, you could display
your equations in pure text:
(270/1) * (pi/180) = (27/1) * (pi/18) = (3/1) * (pi/2) = (3/2)*pi

You would have to keep your numerators and denominators in separate variables,
and simplify them in pairs by seeing if you can divide them both evenly by increasing factors
ranging from 2 up to the lesser of the two.

ABG


Abraham Getzler

unread,
Jul 2, 2014, 4:13:44 PM7/2/14
to mitappinv...@googlegroups.com
For fun, I coded the fraction reduction part of the radian/degrees
conversion problem you mentioned.

The objective here is to illustrate the factorization and simplification
process,

I did not tackle the Pi display problem.

I used lists of components, so this can easily be extended to
multiplying three or more fractions.

Examples are generated randomly when the Randomize
button is pressed.

ABG


Image 001.png
Image 002.png
Image 003.png
Image 004.png
fraction_reduction.aia
Reply all
Reply to author
Forward
0 new messages