Announcement

Collapse

TBH Maintenance


TBH maintenance - There will be interruptions this weekend as we prepare for a hosting switchover.
See more
See less

Calling Math Whizzes!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Calling Math Whizzes!

    I need to reverse engineer the calculator on this page https://imagelights.ca/calculator/

    it calculates the footage of Christmas lights required to light various natural trees. I’m going to take the calculations a step further and break it down into specific materials lists needed.

    but I can’t quite replicate how this calculation works with the 4 user inputs.

    seriously any help is greatly appreciated

    #2


    ___ 2 Top Diameter 6.28 = 2 * 3.14

    _______ 4 12.56 = 4 * 3.14

    ___________6 Bottom Diameter 18.84 = 6 * 3.14
    |

    6.28 + 12.56 + 18.84 = 37.68 total feet
    Height = 3 ( ground to the bottom diameter counts as one of your spaces)
    ​spacing = 1



    It's just a bunch of permutations based on the diameter and the number of spaces you have

    You could change this tree example to height of 5 and keep the same spacing and you'd basically do (2*3.14) + (3 *3.14) + .... + (6*3.14)

    Much easier to do with a computer program and a loop
    Last edited by gumbl3; 08-06-2024, 12:32 PM.

    Comment


      #3
      ugh .. it erases my spaces so i can't post it the way i type it out

      Comment


        #4
        I would go with gumbl3.

        Comment


          #5
          [QUOTE=gumbl3;n26858756]

          ___ 2 Top Diameter 6.28 = 2 * 3.14

          _______ 4 12.56 = 4 * 3.14

          ___________6 Bottom Diameter 18.84 = 6 * 3.14
          |

          6.28 + 12.56 + 18.84 = 37.68 total feet
          Height = 3 ( ground to the bottom diameter counts as one of your spaces)
          ​spacing = 1



          It's just a bunch of permutations based on the diameter and the number of spaces you have

          You could change this tree example to height of 5 and keep the same spacing and you'd basically do (2*3.14) + (3 *3.14) + .... + (6*3.14)

          Much easier to do with a computer program and a loop[/QUOTE]

          And that’s what I am trying to do, is build this as feature to an app.

          here is part of what has me perplexed. This is really calculating the circumference, but to do so you multiply radius*pi. Never really understood why this requested the diameter as the input, only to reduce it to radius in the background?

          For your example where do you get the middle equation? Are you simply extrapolating the middle of the tree diameter by taking the median of the top and bottom diameters?

          in my real world example if I have a tree that is 20’ base diameter
          3’ near top diameter
          22’ height
          6” (0.5’) spacing between wraps.

          Comment


            #6
            Top Diameter is being used to find the Circumference of the Top (Ct)
            Bottom Diameter is being used to find the Circumference of the Bottom (Cb)

            Like above, 2*Pi*r = Ct and 2*Pi*r = Cb With a Diameter plugged in you are getting 2*Pi*(1/2 * D) = Ct and 2*Pi*(1/2 * D) = Cb as the calc.

            That is giving you the top wrap around distance (Ct) and the bottom wrap around distance (Cb), so we start a running total of Ct + Cb + .......+...... = Total feet needed of lights


            The Height is being used to tell you how many wraps between Ct and Cb. Think of it like Height divided by their spacing entry gives you the number of wraps. So we will be doing Ct + Cb + Cts1 + Cts2.....+ ....= Total feet of lights, where ts1 and ts2 just means top circumference plus 1 spacing down (adding 1 spacing unit to the diameter), then top circumference plus 2 spacings down.

            The way that it is working right now is more linear in thought so it is just saying that whatever is plugged into spacing entry is the how much will be reduced from the bottom diameter until it equals to the top diameter (and again, each of those is being used to calculate a circumference).

            Ct + Cts1 + Cts2 + Cts3 + Cts4 +...Cb = Total feet needed.

            Height divided by spacing creates the number of wraps added to the diameter.


            Comment


              #7
              I click on the post only to discover I am not the math whizz I hoped I was.

              Comment


                #8
                Circumference is Pi * d or 2 * Pi * r
                Area is Pi * r ^2

                It's been 20 years since I've done anything like this but this would be my best guess as to what it would look like would be something like this

                BD = bottom diameter
                TD = top diameter
                H = Height
                S = Spacing

                DS = Diameter Spacing
                TF = Total Feet

                DS = (BD - TD) / ( (H - 1) / S) --- this answers you question about the middle equation.. it depends on how many

                for (i = 1, i < (H-1), i = i + S)
                TF = (BD * 3.14) + TF
                BD = BD - DS



                Comment


                  #9
                  Originally posted by kyleseipp View Post
                  Top Diameter is being used to find the Circumference of the Top (Ct)
                  Bottom Diameter is being used to find the Circumference of the Bottom (Cb)

                  Like above, 2*Pi*r = Ct and 2*Pi*r = Cb With a Diameter plugged in you are getting 2*Pi*(1/2 * D) = Ct and 2*Pi*(1/2 * D) = Cb as the calc.

                  That is giving you the top wrap around distance (Ct) and the bottom wrap around distance (Cb), so we start a running total of Ct + Cb + .......+...... = Total feet needed of lights


                  The Height is being used to tell you how many wraps between Ct and Cb. Think of it like Height divided by their spacing entry gives you the number of wraps. So we will be doing Ct + Cb + Cts1 + Cts2.....+ ....= Total feet of lights, where ts1 and ts2 just means top circumference plus 1 spacing down (adding 1 spacing unit to the diameter), then top circumference plus 2 spacings down.

                  The way that it is working right now is more linear in thought so it is just saying that whatever is plugged into spacing entry is the how much will be reduced from the bottom diameter until it equals to the top diameter (and again, each of those is being used to calculate a circumference).

                  Ct + Cts1 + Cts2 + Cts3 + Cts4 +...Cb = Total feet needed.

                  Height divided by spacing creates the number of wraps added to the diameter.

                  Originally posted by gumbl3 View Post
                  Circumference is Pi * d or 2 * Pi * r
                  Area is Pi * r ^2

                  It's been 20 years since I've done anything like this but this would be my best guess as to what it would look like would be something like this

                  BD = bottom diameter
                  TD = top diameter
                  H = Height
                  S = Spacing

                  DS = Diameter Spacing
                  TF = Total Feet

                  DS = (BD - TD) / ( (H - 1) / S) --- this answers you question about the middle equation.. it depends on how many

                  for (i = 1, i < (H-1), i = i + S)
                  TF = (BD * 3.14) + TF
                  BD = BD - DS


                  thanks, I think I understand how it’s being calculated, now I need to write it as an excel
                  formula so I can give it to our developers to implement

                  Comment


                    #10
                    Just start wrapping then go back to Walmart for more lights. Works for me.

                    Comment


                      #11
                      Originally posted by Monark View Post
                      Just start wrapping then go back to Walmart for more lights. Works for me.
                      Yeah but I’m supposed to be a professional 😂

                      Comment

                      Working...
                      X