title: How can i draw the spring motion in the gif file in golang?
body: <p><a href="https://hyosangkang.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F9f8492fa-bd42-4cb2-a3b7-4f77da365cc3%2Fgraph.gif?table=block&amp;id=cbd151ac-549f-46af-9d0c-100d6456b3dc&amp;spaceId=929754e5-3c74-481d-bc9d-233fe96a15bb&amp;userId=&amp;cache=v2" rel="nofollow noreferrer">Gif file that i have to make</a></p>
  <p>This gif file is what i have to make.
  I draw a mass circle like this</p>
  <pre><code>func (s *SpSim) circleXY(l, i int) [2]int {
      r := s.Ginfo.CR
      xi := int(float64(r) * math.Cos(2*math.Pi*float64(i)/100))
      xi += s.Ginfo.Pad + s.Ginfo.SprWidth/2
      yi := int(float64(r) * math.Sin(2*math.Pi*float64(i)/100))
      yi += l
      return [2]int{xi, yi}
  }
  </code></pre>
  <p>but I can't think how to draw the spring part for the gif file.
  How can I make a spring attached to the ceiling and the mass?
  I'm trying to make a function that draws the spring like this</p>
  <pre><code>func (s *SpSim) addSpring(c *image.Paletted, count int) {
  
  }
  </code></pre>
  <p>but I can't fill the function TT</p>