Create A Biorhythm Calculator

Step 1: Define all constants like PI, Month.

Step 2: Take the month, year, date as input from user.

Step 3: Create a date object with Date library.

Step 4: Calculate the number of  alive days by getting difference between current date and date of birth.  (Year must be greater than the current year).

Step 5: Calculate physical level.

Step 6: Calculate emotional level.

Step 7: Calculate intellectual level.


p_Level = Math.sin((2 * Math.PI * age) / Physical)

e_Level = Math.sin((2 * Math.PI * age) / Emotional)

i_Level = Math.sin((2 * Math.PI * age) / Intellectual)

physical_Level = (p_Level * 100).toFixed(1)

emotional_Level = (e_Level * 100).toFixed(1)

intell_Level = (i_Level * 100).toFixed(1)

Step 8: Display all the energy level by adding into html page by ID.

Share this post

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp

Related posts

Keep in touch with the trends